diff options
author | Martin Schuppert <mschuppert@redhat.com> | 2017-07-09 15:22:30 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-10-10 10:41:22 +0100 |
commit | 55800f71bdcfdea22b1d6e1c68848e58eb087d1c (patch) | |
tree | 407ddee25a7ad03a2f9780e510d4bf42fb8e6343 | |
parent | d33c63a230092e94f966551968c51e8c5760742f (diff) | |
download | sos-55800f71bdcfdea22b1d6e1c68848e58eb087d1c.tar.gz |
[openstack plugins] Tripleo specific containerized services configs
Add Tripleo Pike opinionated config paths to be collected
for services, when running in containers. Each service has a
config dir in /var/lib/config-data/puppet-generated on the host
which gets bind mounted read only into the container.
Closes #1054
Signed-off-by: Martin Schuppert <mschuppe@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/gnocchi.py | 18 | ||||
-rw-r--r-- | sos/plugins/haproxy.py | 6 | ||||
-rw-r--r-- | sos/plugins/iscsi.py | 2 | ||||
-rw-r--r-- | sos/plugins/mongodb.py | 15 | ||||
-rw-r--r-- | sos/plugins/mysql.py | 5 | ||||
-rw-r--r-- | sos/plugins/openstack_ceilometer.py | 24 | ||||
-rw-r--r-- | sos/plugins/openstack_glance.py | 25 | ||||
-rw-r--r-- | sos/plugins/openstack_heat.py | 49 | ||||
-rw-r--r-- | sos/plugins/openstack_horizon.py | 48 | ||||
-rw-r--r-- | sos/plugins/openstack_keystone.py | 28 | ||||
-rw-r--r-- | sos/plugins/openstack_manila.py | 25 | ||||
-rw-r--r-- | sos/plugins/openstack_neutron.py | 27 | ||||
-rw-r--r-- | sos/plugins/openstack_nova.py | 37 | ||||
-rw-r--r-- | sos/plugins/openstack_sahara.py | 24 | ||||
-rw-r--r-- | sos/plugins/openstack_swift.py | 30 | ||||
-rw-r--r-- | sos/plugins/openstack_trove.py | 25 | ||||
-rw-r--r-- | sos/plugins/rabbitmq.py | 22 | ||||
-rw-r--r-- | sos/plugins/redis.py | 40 |
18 files changed, 345 insertions, 105 deletions
diff --git a/sos/plugins/gnocchi.py b/sos/plugins/gnocchi.py index 724e41bc..c7a97097 100644 --- a/sos/plugins/gnocchi.py +++ b/sos/plugins/gnocchi.py @@ -33,8 +33,17 @@ class GnocchiPlugin(Plugin, RedHatPlugin): requires_root = False + var_puppet_gen = "/var/lib/config-data/puppet-generated/gnocchi" + def setup(self): - self.add_copy_spec("/etc/gnocchi/") + self.add_copy_spec([ + "/etc/gnocchi/*", + self.var_puppet_gen + "/etc/gnocchi/*", + self.var_puppet_gen + "/etc/httpd/conf/*", + self.var_puppet_gen + "/etc/httpd/conf.d/*", + self.var_puppet_gen + "/etc/httpd/conf.modules.d/wsgi.conf", + self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf" + ]) self.limit = self.get_option("log_size") if self.get_option("all_logs"): @@ -76,5 +85,12 @@ class GnocchiPlugin(Plugin, RedHatPlugin): r"password=(.*)", r"password=*****", ) + self.do_file_sub( + self.var_puppet_gen + "/etc/gnocchi/" + "gnocchi.conf", + r"password=(.*)", + r"password=*****", + ) + # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/haproxy.py b/sos/plugins/haproxy.py index 6ec98d28..90845068 100644 --- a/sos/plugins/haproxy.py +++ b/sos/plugins/haproxy.py @@ -27,7 +27,11 @@ class HAProxy(Plugin, RedHatPlugin, DebianPlugin): packages = ('haproxy',) def setup(self): - self.add_copy_spec("/etc/haproxy/haproxy.cfg") + var_puppet_gen = "/var/lib/config-data/puppet-generated/haproxy" + self.add_copy_spec([ + "/etc/haproxy/haproxy.cfg", + var_puppet_gen + "/etc/haproxy/haproxy.cfg" + ]) self.add_copy_spec("/etc/haproxy/conf.d/*") self.add_cmd_output("haproxy -f /etc/haproxy/haproxy.cfg -c") diff --git a/sos/plugins/iscsi.py b/sos/plugins/iscsi.py index 7324b262..66aa632e 100644 --- a/sos/plugins/iscsi.py +++ b/sos/plugins/iscsi.py @@ -25,9 +25,11 @@ class Iscsi(Plugin): profiles = ('storage',) def setup(self): + var_puppet_gen = "/var/lib/config-data/puppet-generated/iscsid" self.add_copy_spec([ "/etc/iscsi/iscsid.conf", "/etc/iscsi/initiatorname.iscsi", + var_puppet_gen + "/etc/iscsi/initiatorname.iscsi", "/var/lib/iscsi" ]) self.add_cmd_output([ diff --git a/sos/plugins/mongodb.py b/sos/plugins/mongodb.py index 46b0251d..8c895179 100644 --- a/sos/plugins/mongodb.py +++ b/sos/plugins/mongodb.py @@ -25,11 +25,18 @@ class MongoDb(Plugin, DebianPlugin, UbuntuPlugin): profiles = ('services',) packages = ('mongodb-server',) - files = ('/etc/mongodb.conf',) + var_puppet_gen = "/var/lib/config-data/puppet-generated/mongodb" + + files = ( + '/etc/mongodb.conf', + var_puppet_gen + '/etc/mongod.conf' + ) def setup(self): self.add_copy_spec([ "/etc/mongodb.conf", + self.var_puppet_gen + "/etc/", + self.var_puppet_gen + "/etc/systemd/system/mongod.service.d/", "/var/log/mongodb/mongodb.log", "/var/log/containers/mongodb/mongodb.log" ]) @@ -41,6 +48,12 @@ class MongoDb(Plugin, DebianPlugin, UbuntuPlugin): r"mms-token = ********" ) + self.do_file_sub( + self.var_puppet_gen + "/etc/mongodb.conf", + r"(mms-token\s*=\s*.*)", + r"mms-token = ********" + ) + class RedHatMongoDb(MongoDb, RedHatPlugin): diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py index 7bf933ae..decca694 100644 --- a/sos/plugins/mysql.py +++ b/sos/plugins/mysql.py @@ -93,9 +93,10 @@ class RedHatMysql(Mysql, RedHatPlugin): super(RedHatMysql, self).setup() self.add_copy_spec([ "/etc/ld.so.conf.d/mysql-*.conf", - "/etc/ld.so.conf.d/mariadb-*.conf" + "/etc/ld.so.conf.d/mariadb-*.conf", + "/etc/my.cnf.d/*", + "/var/lib/config-data/puppet-generated/mysql/etc/my.cnf.d/*" ]) - self.add_copy_spec("/etc/my.cnf.d/*") class DebianMysql(Mysql, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py index 2c3a8094..b3c6bd8e 100644 --- a/sos/plugins/openstack_ceilometer.py +++ b/sos/plugins/openstack_ceilometer.py @@ -27,19 +27,25 @@ class OpenStackCeilometer(Plugin): profiles = ('openstack', 'openstack_controller', 'openstack_compute') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated/ceilometer" def setup(self): # Ceilometer self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/ceilometer/", - "/var/log/containers/ceilometer/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/ceilometer/*", + "/var/log/containers/ceilometer/*" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/ceilometer/*.log", - "/var/log/containers/ceilometer/*.log"], - sizelimit=self.limit) - self.add_copy_spec("/etc/ceilometer/") + self.add_copy_spec([ + "/var/log/ceilometer/*.log", + "/var/log/containers/ceilometer/*.log" + ], sizelimit=self.limit) + self.add_copy_spec([ + "/etc/ceilometer/*", + self.var_puppet_gen + "/etc/ceilometer/*" + ]) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -54,6 +60,10 @@ class OpenStackCeilometer(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/ceilometer/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/ceilometer/*", + regexp, r"\1*********" + ) class DebianCeilometer(OpenStackCeilometer, DebianPlugin, diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py index 6202c495..0a2bdc1b 100644 --- a/sos/plugins/openstack_glance.py +++ b/sos/plugins/openstack_glance.py @@ -28,6 +28,7 @@ class OpenStackGlance(Plugin): profiles = ('openstack', 'openstack_controller') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated/glance_api" def setup(self): # Glance @@ -38,15 +39,21 @@ class OpenStackGlance(Plugin): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/glance/", - "/var/log/containers/glance/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/glance/", + "/var/log/containers/glance/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/glance/*.log", - "/var/log/containers/glance/*.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/glance/*.log", + "/var/log/containers/glance/*.log" + ], sizelimit=self.limit) - self.add_copy_spec("/etc/glance/") + self.add_copy_spec([ + "/etc/glance/", + self.var_puppet_gen + "/etc/glance/", + self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf" + ]) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -73,6 +80,10 @@ class OpenStackGlance(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/glance/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/glance/*", + regexp, r"\1*********" + ) class DebianGlance(OpenStackGlance, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py index 0f457d9d..a73916b2 100644 --- a/sos/plugins/openstack_heat.py +++ b/sos/plugins/openstack_heat.py @@ -26,6 +26,7 @@ class OpenStackHeat(Plugin): profiles = ('openstack', 'openstack_controller') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated/heat" def setup(self): # Heat @@ -49,15 +50,31 @@ class OpenStackHeat(Plugin): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/heat/", - "/var/log/containers/heat/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/heat/", + "/var/log/containers/heat/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/heat/*.log", - "/var/log/containers/heat/*.log"], - sizelimit=self.limit) - - self.add_copy_spec("/etc/heat/") + self.add_copy_spec([ + "/var/log/heat/*.log", + "/var/log/containers/heat/*.log" + ], sizelimit=self.limit) + + self.add_copy_spec([ + "/etc/heat/", + self.var_puppet_gen + "/etc/heat/", + self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf", + self.var_puppet_gen + "_api/etc/heat/", + self.var_puppet_gen + "_api/etc/httpd/conf/", + self.var_puppet_gen + "_api/etc/httpd/conf.d/", + self.var_puppet_gen + "_api/etc/httpd/conf.modules.d/*.conf", + self.var_puppet_gen + "_api/var/spool/cron/heat", + self.var_puppet_gen + "_api_cfn/etc/heat/", + self.var_puppet_gen + "_api_cfn/etc/httpd/conf/", + self.var_puppet_gen + "_api_cfn/etc/httpd/conf.d/", + self.var_puppet_gen + "_api_cfn/etc/httpd/conf.modules.d/*.conf", + self.var_puppet_gen + "_api_cfn/var/spool/cron/heat", + ]) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -69,7 +86,21 @@ class OpenStackHeat(Plugin): ] regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) - self.do_path_regex_sub("/etc/heat/*", regexp, r"\1*********") + self.do_path_regex_sub( + "/etc/heat/*", + regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/heat/*", + regexp, r"\1*********" + ) + self.do_path_regex_sub( + self.var_puppet_gen + "_api/etc/heat/*", + regexp, r"\1*********" + ) + self.do_path_regex_sub( + self.var_puppet_gen + "_api_cfn/etc/heat/*", + regexp, r"\1*********" + ) class DebianHeat(OpenStackHeat, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py index 75ad3ce1..a9a7fab3 100644 --- a/sos/plugins/openstack_horizon.py +++ b/sos/plugins/openstack_horizon.py @@ -27,36 +27,58 @@ class OpenStackHorizon(Plugin): plugin_name = "openstack_horizon" profiles = ('openstack', 'openstack_controller') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated" def setup(self): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/horizon/", - "/var/log/containers/horizon/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/horizon/", + "/var/log/containers/horizon/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/horizon/*.log", - "/var/log/containers/horizon/*.log"], - sizelimit=self.limit) - - self.add_copy_spec("/etc/openstack-dashboard/") + self.add_copy_spec([ + "/var/log/horizon/*.log", + "/var/log/containers/horizon/*.log" + ], sizelimit=self.limit) + + self.add_copy_spec([ + "/etc/openstack-dashboard/", + self.var_puppet_gen + "/horizon/etc/openstack-dashboard/", + self.var_puppet_gen + "/horizon/etc/httpd/conf/", + self.var_puppet_gen + "/horizon/etc/httpd/conf.d/", + self.var_puppet_gen + "/horizon/etc/httpd/conf.modules.d/*.conf", + self.var_puppet_gen + "/memcached/etc/sysconfig/memcached" + ]) self.add_forbidden_path("*.py[co]") if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) def postproc(self): + var_puppet_gen = self.var_puppet_gen + "/horizon" protect_keys = [ "SECRET_KEY", "EMAIL_HOST_PASSWORD" ] regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) - self.do_path_regex_sub("/etc/openstack-dashboard/.*\.json", - regexp, r"\1*********") - self.do_path_regex_sub("/etc/openstack-dashboard/local_settings/ + \ - .*\.conf.*", - regexp, r"\1*********") + self.do_path_regex_sub( + "/etc/openstack-dashboard/.*\.json", + regexp, r"\1*********" + ) + self.do_path_regex_sub( + var_puppet_gen + "/etc/openstack-dashboard/.*\.json", + regexp, r"\1*********" + ) + self.do_path_regex_sub( + "/etc/openstack-dashboard/local_settings/.*\.conf.*", + regexp, r"\1*********" + ) + self.do_path_regex_sub( + var_puppet_gen + "/etc/openstack-dashboard/.*\.conf.*", + regexp, r"\1*********" + ) class DebianHorizon(OpenStackHorizon, DebianPlugin): diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py index 82e987ab..bdcb61d1 100644 --- a/sos/plugins/openstack_keystone.py +++ b/sos/plugins/openstack_keystone.py @@ -26,24 +26,34 @@ class OpenStackKeystone(Plugin): profiles = ('openstack', 'openstack_controller') option_list = [("nopw", "dont gathers keystone passwords", "slow", True)] + var_puppet_gen = "/var/lib/config-data/puppet-generated/keystone" def setup(self): self.add_copy_spec([ "/etc/keystone/default_catalog.templates", "/etc/keystone/keystone.conf", "/etc/keystone/logging.conf", - "/etc/keystone/policy.json" + "/etc/keystone/policy.json", + self.var_puppet_gen + "/etc/keystone/*.conf", + self.var_puppet_gen + "/etc/keystone/*.json", + self.var_puppet_gen + "/etc/httpd/conf/", + self.var_puppet_gen + "/etc/httpd/conf.d/", + self.var_puppet_gen + "/etc/httpd/conf.modules.d/*.conf", + self.var_puppet_gen + "/var/spool/cron/", + self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf" ]) self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/keystone/", - "/var/log/containers/keystone/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/keystone/", + "/var/log/containers/keystone/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/keystone/*.log", - "/var/log/containers/keystone/*.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/keystone/*.log", + "/var/log/containers/keystone/*.log" + ], sizelimit=self.limit) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -71,6 +81,10 @@ class OpenStackKeystone(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/keystone/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/keystone/*", + regexp, r"\1*********" + ) class DebianKeystone(OpenStackKeystone, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_manila.py b/sos/plugins/openstack_manila.py index c1e66093..92bca6fa 100644 --- a/sos/plugins/openstack_manila.py +++ b/sos/plugins/openstack_manila.py @@ -24,18 +24,25 @@ class OpenStackManila(Plugin): profiles = ('openstack', 'openstack_controller') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated/manila" + def setup(self): - self.add_copy_spec("/etc/manila/") + self.add_copy_spec([ + "/etc/manila/", + self.var_puppet_gen + "/etc/manila/" + ]) self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/manila/*", - "/var/log/containers/manila/*"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/manila/*", + "/var/log/containers/manila/*" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/manila/*.log", - "/var/log/containers/manila/*.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/manila/*.log", + "/var/log/containers/manila/*.log" + ], sizelimit=self.limit) def postproc(self): protect_keys = [ @@ -47,6 +54,10 @@ class OpenStackManila(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/manila/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/manila/*", + regexp, r"\1*********" + ) class DebianManila(OpenStackManila, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py index d2bfe6b8..b6116c73 100644 --- a/sos/plugins/openstack_neutron.py +++ b/sos/plugins/openstack_neutron.py @@ -25,19 +25,26 @@ class OpenStackNeutron(Plugin): plugin_name = "openstack_neutron" profiles = ('openstack', 'openstack_controller', 'openstack_compute') + var_puppet_gen = "/var/lib/config-data/puppet-generated/neutron" + def setup(self): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/neutron/", - "/var/log/containers/neutron/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/neutron/", + "/var/log/containers/neutron/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/neutron/*.log", - "/var/log/containers/neutron/*.log"], - sizelimit=self.limit) - - self.add_copy_spec("/etc/neutron/") + self.add_copy_spec([ + "/var/log/neutron/*.log", + "/var/log/containers/neutron/*.log" + ], sizelimit=self.limit) + + self.add_copy_spec([ + "/etc/neutron/", + self.var_puppet_gen + "/etc/neutron/" + ]) self.add_copy_spec("/var/lib/neutron/") if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -75,6 +82,10 @@ class OpenStackNeutron(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/neutron/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/neutron/*", + regexp, r"\1*********" + ) class DebianNeutron(OpenStackNeutron, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py index c0e8109f..75dd3725 100644 --- a/sos/plugins/openstack_nova.py +++ b/sos/plugins/openstack_nova.py @@ -29,6 +29,8 @@ class OpenStackNova(Plugin): plugin_name = "openstack_nova" profiles = ('openstack', 'openstack_controller', 'openstack_compute') + var_puppet_gen = "/var/lib/config-data/puppet-generated/nova" + def setup(self): # commands we do not need to source the environment file self.add_cmd_output("nova-manage db version") @@ -67,15 +69,28 @@ class OpenStackNova(Plugin): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/nova/", - "/var/log/containers/nova/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/nova/", + "/var/log/containers/nova/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/nova/*.log", - "/var/log/containers/nova/*.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/nova/*.log", + "/var/log/containers/nova/*.log" + ], sizelimit=self.limit) - self.add_copy_spec("/etc/nova/") + self.add_copy_spec([ + "/etc/nova/", + self.var_puppet_gen + "/etc/nova/", + self.var_puppet_gen + "/etc/my.cnf.d/tripleo.cnf", + self.var_puppet_gen + "_placement/var/spool/cron/nova", + self.var_puppet_gen + "_placement/etc/nova/", + self.var_puppet_gen + "_placement/etc/httpd/conf/", + self.var_puppet_gen + "_placement/etc/httpd/conf.d/", + self.var_puppet_gen + "_placement/etc/httpd/conf.modules.d/*.conf", + self.var_puppet_gen + "_placement/etc/my.cnf.d/tripleo.cnf", + self.var_puppet_gen + "/../memcached/etc/sysconfig/memcached" + ]) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -92,6 +107,14 @@ class OpenStackNova(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/nova/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/nova/*", + regexp, r"\1*********" + ) + self.do_path_regex_sub( + self.var_puppet_gen + "_placement/etc/nova/*", + regexp, r"\1*********" + ) class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_sahara.py b/sos/plugins/openstack_sahara.py index adaedf9a..68cf0b38 100644 --- a/sos/plugins/openstack_sahara.py +++ b/sos/plugins/openstack_sahara.py @@ -23,22 +23,28 @@ class OpenStackSahara(Plugin): profiles = ('openstack', 'openstack_controller') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated/sahara" def setup(self): - self.add_copy_spec("/etc/sahara/") + self.add_copy_spec([ + "/etc/sahara/", + self.var_puppet_gen + "/etc/sahara/" + ]) self.add_journal(units="openstack-sahara-all") self.add_journal(units="openstack-sahara-api") self.add_journal(units="openstack-sahara-engine") self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/sahara/", - "/var/log/containers/sahara/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/sahara/", + "/var/log/containers/sahara/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/sahara/*.log", - "/var/log/containers/sahara/*.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/sahara/*.log", + "/var/log/containers/sahara/*.log" + ], sizelimit=self.limit) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -52,6 +58,10 @@ class OpenStackSahara(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/sahara/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/sahara/*", + regexp, r"\1*********" + ) class DebianSahara(OpenStackSahara, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_swift.py b/sos/plugins/openstack_swift.py index 9906b947..1cfff2b8 100644 --- a/sos/plugins/openstack_swift.py +++ b/sos/plugins/openstack_swift.py @@ -27,19 +27,29 @@ class OpenStackSwift(Plugin): option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated" + def setup(self): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/swift/", - "/var/log/containers/swift/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/swift/", + "/var/log/containers/swift/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/swift/*.log", - "/var/log/containers/swift/*.log"], - sizelimit=self.limit) - - self.add_copy_spec("/etc/swift/") + self.add_copy_spec([ + "/var/log/swift/*.log", + "/var/log/containers/swift/*.log" + ], sizelimit=self.limit) + + self.add_copy_spec([ + "/etc/swift/", + self.var_puppet_gen + "/swift/etc/*", + self.var_puppet_gen + "/swift/etc/swift/*", + self.var_puppet_gen + "/swift/etc/xinetd.d/*", + self.var_puppet_gen + "/memcached/etc/sysconfig/memcached" + ]) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -54,6 +64,10 @@ class OpenStackSwift(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/swift/.*\.conf.*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/swift/etc/swift/.*\.conf.*", + regexp, r"\1*********" + ) class DebianSwift(OpenStackSwift, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/openstack_trove.py b/sos/plugins/openstack_trove.py index 5183ad15..093e5d58 100644 --- a/sos/plugins/openstack_trove.py +++ b/sos/plugins/openstack_trove.py @@ -26,19 +26,26 @@ class OpenStackTrove(Plugin): profiles = ('openstack', 'openstack_controller') option_list = [] + var_puppet_gen = "/var/lib/config-data/puppet-generated/trove" + def setup(self): self.limit = self.get_option("log_size") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/trove/", - "/var/log/containers/trove/"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/trove/", + "/var/log/containers/trove/" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/trove/*.log", - "/var/log/containers/trove/*.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/trove/*.log", + "/var/log/containers/trove/*.log" + ], sizelimit=self.limit) - self.add_copy_spec('/etc/trove/') + self.add_copy_spec([ + '/etc/trove/', + self.var_puppet_gen + '/etc/trove/' + ]) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) @@ -53,6 +60,10 @@ class OpenStackTrove(Plugin): regexp = r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys) self.do_path_regex_sub("/etc/trove/*", regexp, r"\1*********") + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/trove/*", + regexp, r"\1*********" + ) class DebianTrove(OpenStackTrove, DebianPlugin, UbuntuPlugin): diff --git a/sos/plugins/rabbitmq.py b/sos/plugins/rabbitmq.py index 8d73835f..2c7e428a 100644 --- a/sos/plugins/rabbitmq.py +++ b/sos/plugins/rabbitmq.py @@ -20,7 +20,11 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """ plugin_name = 'rabbitmq' profiles = ('services',) - files = ('/etc/rabbitmq/rabbitmq.conf',) + var_puppet_gen = "/var/lib/config-data/puppet-generated/rabbitmq" + files = ( + '/etc/rabbitmq/rabbitmq.conf', + var_puppet_gen + '/etc/rabbitmq/rabbitmq.config' + ) packages = ('rabbitmq-server',) def setup(self): @@ -28,8 +32,16 @@ class RabbitMQ(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): self.add_cmd_output("rabbitmqctl cluster_status") self.add_cmd_output("rabbitmqctl list_policies") - self.add_copy_spec("/etc/rabbitmq/*") - self.add_copy_spec(["/var/log/rabbitmq/*", - "/var/log/containers/rabbitmq/*"], - sizelimit=self.get_option('log_size')) + self.add_copy_spec([ + "/etc/rabbitmq/*", + self.var_puppet_gen + "/etc/rabbitmq/*", + self.var_puppet_gen + "/etc/security/limits.d/", + self.var_puppet_gen + "/etc/systemd/" + ]) + self.add_copy_spec([ + "/var/log/rabbitmq/*", + "/var/log/containers/rabbitmq/*" + ], sizelimit=self.get_option('log_size')) + + # vim: set et ts=4 sw=4 : diff --git a/sos/plugins/redis.py b/sos/plugins/redis.py index 9ac2397e..088a9a28 100644 --- a/sos/plugins/redis.py +++ b/sos/plugins/redis.py @@ -1,4 +1,5 @@ # Copyright (C) 2015 Red Hat, Inc., Abhijeet Kasurde <akasurde@redhat.com> +# Copyright (C) 2017 Red Hat, Inc., Martin Schuppert <mschuppe@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,20 +26,32 @@ class Redis(Plugin, RedHatPlugin): profiles = ('services',) packages = ('redis',) - files = ('/etc/redis.conf', '/var/log/redis') + var_puppet_gen = "/var/lib/config-data/puppet-generated/redis" + files = ( + '/etc/redis.conf', + '/var/log/redis', + var_puppet_gen + '/etc/redis.conf' + ) def setup(self): - self.add_copy_spec("/etc/redis.conf") + self.add_copy_spec([ + "/etc/redis.conf", + self.var_puppet_gen + "/etc/redis*", + self.var_puppet_gen + "/etc/redis/", + self.var_puppet_gen + "/etc/security/limits.d/" + ]) self.limit = self.get_option("log_size") self.add_cmd_output("redis-cli info") if self.get_option("all_logs"): - self.add_copy_spec(["/var/log/redis/redis.log*", - "/var/log/containers/redis/redis.log*"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/redis/redis.log*", + "/var/log/containers/redis/redis.log*" + ], sizelimit=self.limit) else: - self.add_copy_spec(["/var/log/redis/redis.log", - "/var/log/containers/redis/redis.log"], - sizelimit=self.limit) + self.add_copy_spec([ + "/var/log/redis/redis.log", + "/var/log/containers/redis/redis.log" + ], sizelimit=self.limit) def postproc(self): self.do_file_sub( @@ -51,5 +64,16 @@ class Redis(Plugin, RedHatPlugin): r"(requirepass\s).*", r"\1********" ) + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/redis.conf*", + r"(masterauth\s).*", + r"\1*********" + ) + self.do_path_regex_sub( + self.var_puppet_gen + "/etc/redis.conf*", + r"(requirepass\s).*", + r"\1*********" + ) + # vim: set et ts=4 sw=4 : |