Blame SOURCES/sos-bz1596494-cds-on-rhui3.patch

b72d26
From 62f4affbc9fb6da06dd5707e9aa659d206352e87 Mon Sep 17 00:00:00 2001
b72d26
From: Pavel Moravec <pmoravec@redhat.com>
b72d26
Date: Tue, 3 Jul 2018 13:02:09 +0200
b72d26
Subject: [PATCH] [rhui] Fix detection of CDS for RHUI3
b72d26
b72d26
Detection of CDS node on RHUI 3 cant rely on deprecated pulp-cds package
b72d26
but rather on rhui-mirrorlist one.
b72d26
b72d26
Resolves: #1375
b72d26
b72d26
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
b72d26
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
b72d26
---
b72d26
 sos/plugins/rhui.py | 6 +++++-
b72d26
 1 file changed, 5 insertions(+), 1 deletion(-)
b72d26
b72d26
diff --git a/sos/plugins/rhui.py b/sos/plugins/rhui.py
b72d26
index 2b1e2baa7..459a89831 100644
b72d26
--- a/sos/plugins/rhui.py
b72d26
+++ b/sos/plugins/rhui.py
b72d26
@@ -22,7 +22,11 @@ class Rhui(Plugin, RedHatPlugin):
b72d26
     files = [rhui_debug_path]
b72d26
 
b72d26
     def setup(self):
b72d26
-        if self.is_installed("pulp-cds"):
b72d26
+        cds_installed = [
b72d26
+            self.is_installed("pulp-cds"),
b72d26
+            self.is_installed("rhui-mirrorlist")
b72d26
+        ]
b72d26
+        if any(cds_installed):
b72d26
             cds = "--cds"
b72d26
         else:
b72d26
             cds = ""