Blame SOURCES/sos-bz1814867-insights-archive.patch

a02485
From 0766cc739d424932e18c250c88f0227da06ecaed Mon Sep 17 00:00:00 2001
a02485
From: Pavel Moravec <pmoravec@redhat.com>
a02485
Date: Sun, 19 Apr 2020 16:38:50 +0200
a02485
Subject: [PATCH] [insights] collect insights-client dump
a02485
a02485
Collect data of "insights-client --offline" into
a02485
sos_commands/insights/insights-client-dump directory.
a02485
a02485
Resolves: #2030
a02485
a02485
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
a02485
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
a02485
---
a02485
 sos/plugins/insights.py | 4 ++++
a02485
 1 file changed, 4 insertions(+)
a02485
a02485
diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py
a02485
index a8fa4e5f..17b99980 100644
a02485
--- a/sos/plugins/insights.py
a02485
+++ b/sos/plugins/insights.py
a02485
@@ -31,6 +31,10 @@ class RedHatInsights(Plugin, RedHatPlugin):
a02485
         else:
a02485
             self.add_copy_spec("/var/log/insights-client/insights-client.log")
a02485
 
a02485
+        # Collect insights-client report data into given dump dir
a02485
+        path = self.get_cmd_output_path(name="insights-client-dump")
a02485
+        self.add_cmd_output("insights-client --offline --output-dir %s" % path)
a02485
+
a02485
     def postproc(self):
a02485
         for conf in self.config:
a02485
             self.do_file_sub(
a02485
-- 
a02485
2.21.3
a02485
a02485
From f41a12032d1b0caf962145ddd5026b3798931026 Mon Sep 17 00:00:00 2001
a02485
From: Pavel Moravec <pmoravec@redhat.com>
a02485
Date: Tue, 12 May 2020 09:58:26 +0200
a02485
Subject: [PATCH] [insights] collect insights dump output in deterministic
a02485
 filename
a02485
a02485
Currently, "insights-client --offline" stdout is stored in filename like
a02485
insights-client_--offline_--output-dir_.var.tmp.sos.cbl0ox16. (and so on)
a02485
a02485
Let make the filename unified and deterministic.
a02485
a02485
Also add the trailing vim expand tabs comment.
a02485
a02485
Resolves: #2058
a02485
a02485
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
a02485
Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
a02485
---
a02485
 sos/plugins/insights.py | 5 ++++-
a02485
 1 file changed, 4 insertions(+), 1 deletion(-)
a02485
a02485
diff --git a/sos/plugins/insights.py b/sos/plugins/insights.py
a02485
index 75d521bc..e50bc8fb 100644
a02485
--- a/sos/plugins/insights.py
a02485
+++ b/sos/plugins/insights.py
a02485
@@ -33,7 +33,8 @@ class RedHatInsights(Plugin, RedHatPlugin):
a02485
 
a02485
         # Collect insights-client report data into given dump dir
a02485
         path = self.get_cmd_output_path(name="insights-client-dump")
a02485
-        self.add_cmd_output("insights-client --offline --output-dir %s" % path)
a02485
+        self.add_cmd_output("insights-client --offline --output-dir %s" % path,
a02485
+                            suggest_filename="insights-client-dump.log")
a02485
 
a02485
     def postproc(self):
a02485
         for conf in self.config:
a02485
@@ -44,3 +45,5 @@ class RedHatInsights(Plugin, RedHatPlugin):
a02485
             self.do_file_sub(
a02485
                 conf, r'(proxy[\t\ ]*=.*)(:)(.*)(@.*)', r'\1\2********\4'
a02485
             )
a02485
+
a02485
+# vim: set et ts=4 sw=4 :
a02485
-- 
a02485
2.21.3
a02485