Skip to content

Commit

Permalink
Fixes #36722 - restore Katello::Ping.packages (#10720)
Browse files Browse the repository at this point in the history
This was wrongly removed during katello-agent removal.

Instead of removing this, update the package list to not list qpid.

Fixes: ea06f3d
  • Loading branch information
evgeni authored Sep 7, 2023
1 parent 1248597 commit 5d2f049
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/models/katello/ping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Katello
class Ping
OK_RETURN_CODE = 'ok'.freeze
FAIL_RETURN_CODE = 'FAIL'.freeze
PACKAGES = %w(katello candlepin pulp foreman hammer).freeze

class << self
def services(capsule_id = nil)
Expand Down Expand Up @@ -142,6 +143,13 @@ def exception_watch(result)
result
end

# get package information for katello and its components
def packages
names = PACKAGES.join("|")
packages = `rpm -qa | egrep "#{names}"`
packages.split("\n").sort
end

def pulp_url(capsule_id)
proxy = fetch_proxy(capsule_id)
uri = URI.parse(proxy.pulp_url)
Expand Down

0 comments on commit 5d2f049

Please sign in to comment.