aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Carter <kecarter@redhat.com>2020-11-09 15:26:08 -0600
committerJake Hunsaker <jhunsake@redhat.com>2020-11-17 11:10:33 -0500
commit7c88d13ee1780c8f351b9cd26df2401c153ccaad (patch)
tree8ba4f8f4a74978bf9297a49f19a48e4f38c88f3e
parent4eef30fa8e5cfbc1a154a669396c0635fb36a5ad (diff)
downloadsos-7c88d13ee1780c8f351b9cd26df2401c153ccaad.tar.gz
[openstack_tripleo] Add new path for log collection
This change essentially adds /var/lib/tripleo to the collection path. All of the collection targets have been moved into a class object which is easily shared across methods. This will alow us to easily collect more in the future and ensure all of our collected objects are sanitized. Resolves: #2300 Signed-off-by: Kevin Carter <kecarter@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/openstack_tripleo.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/sos/report/plugins/openstack_tripleo.py b/sos/report/plugins/openstack_tripleo.py
index 9863fae9..8df80781 100644
--- a/sos/report/plugins/openstack_tripleo.py
+++ b/sos/report/plugins/openstack_tripleo.py
@@ -23,12 +23,14 @@ class OpenStackTripleO(Plugin, IndependentPlugin):
def setup(self):
# Notes: recursion is max 2 for container-puppet and tripleo-config
# Those directories are present on all OpenStack nodes
- self.add_copy_spec([
+ self.tripleo_log_paths = [
'/var/log/paunch.log',
'/var/lib/container-puppet/',
'/var/lib/tripleo-config/',
+ '/var/lib/tripleo/',
'/etc/puppet/hieradata/'
- ])
+ ]
+ self.add_copy_spec(self.tripleo_log_paths)
def postproc(self):
# Ensures we do not leak passwords from the tripleo-config and
@@ -38,10 +40,7 @@ class OpenStackTripleO(Plugin, IndependentPlugin):
r'([":\s]+)(.*[^"])([",]+)'
rgxp = re.compile(secrets, re.IGNORECASE)
- self.do_path_regex_sub('/var/lib/tripleo-config/',
- rgxp, r'\1\3*********\5')
- self.do_path_regex_sub('/etc/puppet/hieradata/',
- rgxp, r'\1\3*********\5')
-
+ for path in self.tripleo_log_paths:
+ self.do_path_regex_sub(path, rgxp, r'\1\3*********\5')
# vim: set et ts=4 sw=4 :