From 166f712eb447f54f0e2c5396ea25f5bc11e3f519 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Fri, 17 May 2019 15:55:05 +0200 Subject: [PATCH] [katello] support both locations of qpid SSL certs Newer katello versions deploy certs for qpid to /etc/pki/pulp/qpid/client.crt certs instead of /etc/pki/katello/qpid_client_striped.crt . Sosreport should use either of the location that exists, to successfully run few qpid-stat commands. Resolves: #1680 Signed-off-by: Pavel Moravec --- sos/plugins/katello.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sos/plugins/katello.py b/sos/plugins/katello.py index 0794fb4c..1ea52da8 100644 --- a/sos/plugins/katello.py +++ b/sos/plugins/katello.py @@ -10,6 +10,7 @@ from sos.plugins import Plugin, RedHatPlugin from pipes import quote +import os.path class Katello(Plugin, RedHatPlugin): @@ -24,7 +25,12 @@ class Katello(Plugin, RedHatPlugin): "/var/log/httpd/katello-reverse-proxy_error_ssl.log*" ]) - cert = "/etc/pki/katello/qpid_client_striped.crt" + # certificate file location relies on katello version, it can be either + # /etc/pki/katello/qpid_client_striped.crt (for older versions) or + # /etc/pki/pulp/qpid/client.crt (for newer versions) + cert = "/etc/pki/pulp/qpid/client.crt" + if not os.path.isfile(cert): + cert = "/etc/pki/katello/qpid_client_striped.crt" self.add_cmd_output([ "qpid-stat -%s --ssl-certificate=%s -b amqps://localhost:5671" % (opt, cert) for opt in "quc" -- 2.17.2