aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2019-05-17 15:55:05 +0200
committerPavel Moravec <pmoravec@redhat.com>2019-05-17 15:55:05 +0200
commit166f712eb447f54f0e2c5396ea25f5bc11e3f519 (patch)
treeb3c6b1af48e3ea944ec6567a0545cdeeae9e0c7e
parentd0dcb39ea94e647f97184f0691dfa2592d65b8ac (diff)
downloadsos-166f712eb447f54f0e2c5396ea25f5bc11e3f519.tar.gz
[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 <pmoravec@redhat.com>
-rw-r--r--sos/plugins/katello.py8
1 files changed, 7 insertions, 1 deletions
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"