Sandro Bonazzola has uploaded a new change for review.

Change subject: sos: re-enable all_logs collection on sos >= 3.0
......................................................................

sos: re-enable all_logs collection on sos >= 3.0

Adding back all logs collection, removed in
I47fb7817727ed88a1b9c7bb91cb5055a2e8d7565

Change-Id: I9d1f703aec6748133cf9152dc0da3b00edeb9a95
Bug-Url: https://bugzilla.redhat.com/1088172
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/__main__.py
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-log-collector 
refs/changes/50/27850/1

diff --git a/src/__main__.py b/src/__main__.py
index e4fb588..c1a4d86 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -678,8 +678,8 @@
         cmd = """%(ssh_cmd)s "
 VERSION=`/bin/rpm -q --qf '[%%{{VERSION}}]' sos | /bin/sed 's/\.//'`;
 if [ "$VERSION" -ge "30" ]; then
-    /usr/sbin/sosreport {option} --batch \
-        -o %(reports)s
+    /usr/sbin/sosreport {option} --batch -k logs.all_logs=True \
+        -o logs,%(reports)s
 elif [ "$VERSION" -ge "22" ]; then
     /usr/sbin/sosreport {option} --batch -k general.all_logs=True \
         -o %(reports)s
@@ -827,6 +827,8 @@
         if sos.__version__.replace('.', '') < '30':
             opts.append('--report')
             opts.append("-k general.all_logs=True")
+        else:
+            opts.append("-k logs.all_logs=True")
 
         return " ".join(opts)
 
@@ -849,6 +851,8 @@
             "ovirt_engine_dwh",
             "ovirt_engine_reports",
         ))
+        if sos.__version__.replace('.', '') > '30':
+            self.configuration['reports'] += ',logs'
         self.configuration["sos_options"] = self.build_options()
         self.caller.call(
             "sosreport --batch --build \


-- 
To view, visit http://gerrit.ovirt.org/27850
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d1f703aec6748133cf9152dc0da3b00edeb9a95
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-log-collector
Gerrit-Branch: ovirt-log-collector-3.4
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to