diff options
-rw-r--r-- | sos/report/plugins/keepalived.py | 4 | ||||
-rw-r--r-- | sos/report/plugins/openstack_aodh.py | 20 | ||||
-rw-r--r-- | sos/report/plugins/openstack_cinder.py | 11 | ||||
-rw-r--r-- | sos/report/plugins/openstack_glance.py | 4 | ||||
-rw-r--r-- | sos/report/plugins/openstack_heat.py | 4 | ||||
-rw-r--r-- | sos/report/plugins/openstack_nova.py | 4 | ||||
-rw-r--r-- | sos/report/plugins/openstack_octavia.py | 13 | ||||
-rw-r--r-- | sos/report/plugins/openstack_placement.py | 8 | ||||
-rw-r--r-- | sos/report/plugins/salt.py | 11 | ||||
-rw-r--r-- | sos/report/plugins/saltmaster.py | 19 |
10 files changed, 80 insertions, 18 deletions
diff --git a/sos/report/plugins/keepalived.py b/sos/report/plugins/keepalived.py index 6eeb7d92..a20c2978 100644 --- a/sos/report/plugins/keepalived.py +++ b/sos/report/plugins/keepalived.py @@ -8,10 +8,10 @@ # # See the LICENSE file in the source distribution for further information. -from sos.report.plugins import Plugin, RedHatPlugin +from sos.report.plugins import Plugin, IndependentPlugin -class Keepalived(Plugin, RedHatPlugin): +class Keepalived(Plugin, IndependentPlugin): short_desc = 'Keepalived routing server' diff --git a/sos/report/plugins/openstack_aodh.py b/sos/report/plugins/openstack_aodh.py index 86d24ee2..45442002 100644 --- a/sos/report/plugins/openstack_aodh.py +++ b/sos/report/plugins/openstack_aodh.py @@ -10,16 +10,15 @@ # See the LICENSE file in the source distribution for further information. import os -from sos.report.plugins import Plugin, RedHatPlugin +from sos.report.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class OpenStackAodh(Plugin, RedHatPlugin): +class OpenStackAodh(Plugin): short_desc = 'OpenStack Alarm service' plugin_name = "openstack_aodh" profiles = ('openstack', 'openstack_controller') - packages = ('openstack-selinux',) var_puppet_gen = "/var/lib/config-data/puppet-generated/aodh" def setup(self): @@ -88,4 +87,19 @@ class OpenStackAodh(Plugin, RedHatPlugin): ) +class DebianOpenStackAodh(OpenStackAodh, DebianPlugin, UbuntuPlugin): + + packages = ( + 'aodh-api', + 'aodh-evaluator', + 'aodh-notifier', + 'aodh-listener', + 'python-aodhclient' + ) + + +class RedHatOpenStackAodh(OpenStackAodh, RedHatPlugin): + + packages = ('openstack-selinux',) + # vim: set et ts=4 sw=4 : diff --git a/sos/report/plugins/openstack_cinder.py b/sos/report/plugins/openstack_cinder.py index f9f568fb..4eb58a2e 100644 --- a/sos/report/plugins/openstack_cinder.py +++ b/sos/report/plugins/openstack_cinder.py @@ -30,7 +30,7 @@ class OpenStackCinder(Plugin): # check if either standalone (cinder-api) or httpd wsgi (cinder_wsgi) # is up and running - cinder_process = ["cinder_wsgi", "cinder-api"] + cinder_process = ["cinder_wsgi", "cinder-wsgi", "cinder-api"] in_ps = False for process in cinder_process: in_ps = self.check_process_by_name(process) @@ -48,6 +48,7 @@ class OpenStackCinder(Plugin): suggest_filename="cinder_db_version" ) + self.add_forbidden_path('/etc/cinder/volumes') self.add_copy_spec([ "/etc/cinder/", self.var_puppet_gen + "/etc/cinder/", @@ -117,6 +118,14 @@ class DebianCinder(OpenStackCinder, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianCinder, self).setup() + if self.get_option("all_logs"): + self.add_copy_spec([ + "/var/log/apache/cinder*", + ]) + else: + self.add_copy_spec([ + "/var/log/apache/cinder*.log", + ]) class RedHatCinder(OpenStackCinder, RedHatPlugin): diff --git a/sos/report/plugins/openstack_glance.py b/sos/report/plugins/openstack_glance.py index 88df58b0..e590e783 100644 --- a/sos/report/plugins/openstack_glance.py +++ b/sos/report/plugins/openstack_glance.py @@ -24,6 +24,7 @@ class OpenStackGlance(Plugin): option_list = [] var_puppet_gen = "/var/lib/config-data/puppet-generated/glance_api" + service_name = "openstack-glance-api.service" def setup(self): if self.get_option("all_logs"): @@ -45,7 +46,7 @@ class OpenStackGlance(Plugin): # is running in_container = self.container_exists('glance_api') - if self.is_service_running('openstack-glance-api') or in_container: + if self.is_service_running(self.service_name) or in_container: glance_config = "" # if containerized we need to pass the config to the cont. if in_container: @@ -107,6 +108,7 @@ class DebianGlance(OpenStackGlance, DebianPlugin, UbuntuPlugin): 'glance-registry', 'python-glance' ) + service_name = 'glance-api.service' class RedHatGlance(OpenStackGlance, RedHatPlugin): diff --git a/sos/report/plugins/openstack_heat.py b/sos/report/plugins/openstack_heat.py index ac2ed737..17b24b71 100644 --- a/sos/report/plugins/openstack_heat.py +++ b/sos/report/plugins/openstack_heat.py @@ -21,6 +21,7 @@ class OpenStackHeat(Plugin): option_list = [] var_puppet_gen = "/var/lib/config-data/puppet-generated/heat" + service_name = "openstack-heat-api.service" def setup(self): @@ -28,7 +29,7 @@ class OpenStackHeat(Plugin): # is running in_container = self.container_exists('.*heat_api') - if self.is_service_running('openstack-heat-api') or in_container: + if self.is_service_running(self.service_name) or in_container: heat_config = "" # if containerized we need to pass the config to the cont. if in_container: @@ -126,6 +127,7 @@ class DebianHeat(OpenStackHeat, DebianPlugin, UbuntuPlugin): 'python-heat', 'python-heatclient' ) + service_name = 'heat-api.service' class RedHatHeat(OpenStackHeat, RedHatPlugin): diff --git a/sos/report/plugins/openstack_nova.py b/sos/report/plugins/openstack_nova.py index c254c765..88586515 100644 --- a/sos/report/plugins/openstack_nova.py +++ b/sos/report/plugins/openstack_nova.py @@ -24,6 +24,7 @@ class OpenStackNova(Plugin): profiles = ('openstack', 'openstack_controller', 'openstack_compute') var_puppet_gen = "/var/lib/config-data/puppet-generated/nova" + service_name = "openstack-nova-api.service" def setup(self): @@ -31,7 +32,7 @@ class OpenStackNova(Plugin): # is running in_container = self.container_exists('.*nova_api') - if self.is_service_running('openstack-nova-api') or in_container: + if self.is_service_running(self.service_name) or in_container: nova_config = "" # if containerized we need to pass the config to the cont. if in_container: @@ -184,6 +185,7 @@ class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin): 'python-novaclient', 'python-novnc' ) + service_name = "nova-api.service" def setup(self): super(DebianNova, self).setup() diff --git a/sos/report/plugins/openstack_octavia.py b/sos/report/plugins/openstack_octavia.py index c2171140..ba9e0118 100644 --- a/sos/report/plugins/openstack_octavia.py +++ b/sos/report/plugins/openstack_octavia.py @@ -107,7 +107,18 @@ class OpenStackOctavia(Plugin): class DebianOctavia(OpenStackOctavia, DebianPlugin, UbuntuPlugin): - packages = ('octavia-common',) + packages = ('octavia-common', 'octavia-api', ) + + def setup(self): + super(DebianOctavia, self).setup() + if self.get_option("all_logs"): + self.add_copy_spec([ + "/var/log/apache2/octavia*", + ]) + else: + self.add_copy_spec([ + "/var/log/apache2/octavia*.log", + ]) class RedHatOctavia(OpenStackOctavia, RedHatPlugin): diff --git a/sos/report/plugins/openstack_placement.py b/sos/report/plugins/openstack_placement.py index 052bf51e..642b07ff 100644 --- a/sos/report/plugins/openstack_placement.py +++ b/sos/report/plugins/openstack_placement.py @@ -18,6 +18,7 @@ class OpenStackPlacement(Plugin): profiles = ('openstack', 'openstack_controller') var_puppet_gen = "/var/lib/config-data/puppet-generated/placement" + service_name = 'openstack-placement-api' def setup(self): @@ -26,7 +27,7 @@ class OpenStackPlacement(Plugin): in_container = self.container_exists('.*placement_api') - if self.is_service_running('openstack-placement-api') or in_container: + if self.is_service_running(self.service_name) or in_container: placement_config = "" # if containerized we need to pass the config to the cont. if in_container: @@ -84,9 +85,14 @@ class OpenStackPlacement(Plugin): class DebianPlacement(OpenStackPlacement, DebianPlugin, UbuntuPlugin): packages = ('placement') + service_name = 'placement-api' def setup(self): super(DebianPlacement, self).setup() + if self.get_option("all_logs"): + self.add_copy_spec("/var/log/apache2/placement*") + else: + self.add_copy_spec("/var/log/apache2/placement*.log") class RedHatPlacement(OpenStackPlacement, RedHatPlugin): diff --git a/sos/report/plugins/salt.py b/sos/report/plugins/salt.py index 962a9187..c2a830b0 100644 --- a/sos/report/plugins/salt.py +++ b/sos/report/plugins/salt.py @@ -6,17 +6,17 @@ # # See the LICENSE file in the source distribution for further information. -from sos.report.plugins import Plugin, RedHatPlugin, DebianPlugin +from sos.report.plugins import Plugin, IndependentPlugin -class Salt(Plugin, RedHatPlugin, DebianPlugin): +class Salt(Plugin, IndependentPlugin): short_desc = 'Salt' plugin_name = 'salt' profiles = ('sysmgmt',) - packages = ('salt',) + packages = ('salt', 'salt-minion', 'salt-common',) def setup(self): all_logs = self.get_option("all_logs") @@ -29,4 +29,9 @@ class Salt(Plugin, RedHatPlugin, DebianPlugin): self.add_copy_spec("/etc/salt") self.add_forbidden_path("/etc/salt/pki/*/*.pem") + def postproc(self): + regexp = r'((?m)^\s+.*(pass|secret|(?<![A-z])key(?![A-z])).*:\ ).+$' + subst = r'\1******' + self.do_path_regex_sub("/etc/salt/*", regexp, subst) + # vim: set et ts=4 sw=4 : diff --git a/sos/report/plugins/saltmaster.py b/sos/report/plugins/saltmaster.py index 6e9bd552..3e3997fc 100644 --- a/sos/report/plugins/saltmaster.py +++ b/sos/report/plugins/saltmaster.py @@ -6,20 +6,31 @@ # # See the LICENSE file in the source distribution for further information. -from sos.report.plugins import Plugin, RedHatPlugin, DebianPlugin +from sos.report.plugins import Plugin, IndependentPlugin -class SaltMaster(Plugin, RedHatPlugin, DebianPlugin): +class SaltMaster(Plugin, IndependentPlugin): short_desc = 'Salt Master' plugin_name = 'saltmaster' profiles = ('sysmgmt',) - packages = ('salt-master',) + packages = ('salt-master', 'salt-api',) def setup(self): - self.add_copy_spec("/var/log/salt/master") + if self.get_option("all_logs"): + self.add_copy_spec("/var/log/salt") + else: + self.add_copy_spec("/var/log/salt/master") + + self.add_copy_spec("/etc/salt") + self.add_forbidden_path("/etc/salt/pki/*/*.pem") self.add_cmd_output("salt-key --list all") + def postproc(self): + regexp = r'((?m)^\s+.*(pass|secret|(?<![A-z])key(?![A-z])).*:\ ).+$' + subst = r'$1******' + self.do_path_regex_sub("/etc/salt/*", regexp, subst) + # vim: set et ts=4 sw=4 : |