Blame SOURCES/sos-collector-temp-location.patch

c5b765
From ac9a24c90cdbaca79951854da1f37d8a10ac8cb9 Mon Sep 17 00:00:00 2001
c5b765
From: Jake Hunsaker <jhunsake@redhat.com>
c5b765
Date: Thu, 3 Oct 2019 11:58:04 -0400
c5b765
Subject: [PATCH 1/2] [soscollector] Enable --all-logs option
c5b765
c5b765
The --all-logs option, while exposed via sos-collector, was not actually
c5b765
being passed to sosreport on the remote nodes.
c5b765
c5b765
Now --all-logs is properly passed to sosreport as intended.
c5b765
c5b765
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
c5b765
---
c5b765
 soscollector/sos_collector.py | 2 ++
c5b765
 1 file changed, 2 insertions(+)
c5b765
c5b765
diff --git a/soscollector/sos_collector.py b/soscollector/sos_collector.py
c5b765
index 19dc368..55cd0ae 100644
c5b765
--- a/soscollector/sos_collector.py
c5b765
+++ b/soscollector/sos_collector.py
c5b765
@@ -502,6 +502,8 @@ this utility or remote systems that it connects to.
c5b765
                 quote(self.config['case_id']))
c5b765
         if self.config['alloptions']:
c5b765
             self.config['sos_cmd'] += ' --alloptions'
c5b765
+        if self.config['all_logs']:
c5b765
+            self.config['sos_cmd'] += ' --all-logs'
c5b765
         if self.config['verify']:
c5b765
             self.config['sos_cmd'] += ' --verify'
c5b765
         if self.config['log_size']:
c5b765
-- 
c5b765
2.21.0
c5b765
c5b765
c5b765
From 0f599189909a6f07e148e68aeee7048c12808e37 Mon Sep 17 00:00:00 2001
c5b765
From: Jake Hunsaker <jhunsake@redhat.com>
c5b765
Date: Thu, 3 Oct 2019 11:54:18 -0400
c5b765
Subject: [PATCH 2/2] [soscollector] Revert temp directory to /var/tmp
c5b765
c5b765
A previous commit inadvertantly changed the default temp directory to be
c5b765
created under /tmp instead of /var/tmp. This commit fixes that and
c5b765
returns the default location to /var/tmp.
c5b765
c5b765
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
c5b765
---
c5b765
 soscollector/configuration.py | 2 +-
c5b765
 soscollector/sos_collector.py | 2 +-
c5b765
 2 files changed, 2 insertions(+), 2 deletions(-)
c5b765
c5b765
diff --git a/soscollector/configuration.py b/soscollector/configuration.py
c5b765
index 1c8baa1..c6f1ce3 100644
c5b765
--- a/soscollector/configuration.py
c5b765
+++ b/soscollector/configuration.py
c5b765
@@ -45,7 +45,7 @@ class Configuration(dict):
c5b765
         self['ssh_key'] = None
c5b765
         self['sos_cmd'] = 'sosreport --batch'
c5b765
         self['no_local'] = False
c5b765
-        self['tmp_dir'] = None
c5b765
+        self['tmp_dir'] = '/var/tmp'
c5b765
         self['out_dir'] = '/var/tmp/'
c5b765
         self['nodes'] = []
c5b765
         self['debug'] = False
c5b765
diff --git a/soscollector/sos_collector.py b/soscollector/sos_collector.py
c5b765
index 55cd0ae..93048d9 100644
c5b765
--- a/soscollector/sos_collector.py
c5b765
+++ b/soscollector/sos_collector.py
c5b765
@@ -209,7 +209,7 @@ class SosCollector():
c5b765
         if self.config['verbose']:
c5b765
             self.console.debug(msg)
c5b765
 
c5b765
-    def create_tmp_dir(self, location='/tmp'):
c5b765
+    def create_tmp_dir(self, location='/var/tmp'):
c5b765
         '''Creates a temp directory to transfer sosreports to'''
c5b765
         tmpdir = tempfile.mkdtemp(prefix='sos-collector-', dir=location)
c5b765
         self.config['tmp_dir'] = tmpdir
c5b765
-- 
c5b765
2.21.0
c5b765