aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2023-05-10 16:10:52 +0100
committerJake Hunsaker <jhunsake@redhat.com>2023-05-26 11:49:56 -0400
commit30bffd42c34f0c91670f26ae75e65a0ad0574507 (patch)
treea64d24c6e817a51c1fca62f370078bf2c7b01390
parentaeaa7e7080f778d4765e181717bdc628f3c42b1b (diff)
downloadsos-30bffd42c34f0c91670f26ae75e65a0ad0574507.tar.gz
[openstack_*][ubuntu] Update paths and collections
Update the apache plugin to only collect the defaults and update the openstack bits to collect specifics for their service move gnocchi.py to openstack_gnocchi.py Closes: #2525 Signed-off-by: Arif Ali <arif.ali@canonical.com>
-rw-r--r--sos/report/plugins/apache.py16
-rw-r--r--sos/report/plugins/openstack_aodh.py10
-rw-r--r--sos/report/plugins/openstack_ceilometer.py3
-rw-r--r--sos/report/plugins/openstack_cinder.py19
-rw-r--r--sos/report/plugins/openstack_glance.py3
-rw-r--r--sos/report/plugins/openstack_gnocchi.py (renamed from sos/report/plugins/gnocchi.py)12
-rw-r--r--sos/report/plugins/openstack_heat.py2
-rw-r--r--sos/report/plugins/openstack_horizon.py3
-rw-r--r--sos/report/plugins/openstack_keystone.py13
-rw-r--r--sos/report/plugins/openstack_manila.py23
-rw-r--r--sos/report/plugins/openstack_neutron.py2
-rw-r--r--sos/report/plugins/openstack_nova.py12
-rw-r--r--sos/report/plugins/openstack_octavia.py6
-rw-r--r--sos/report/plugins/openstack_placement.py27
-rw-r--r--sos/report/plugins/openstack_sahara.py2
-rw-r--r--sos/report/plugins/openstack_swift.py3
-rw-r--r--sos/report/plugins/openstack_trove.py3
17 files changed, 95 insertions, 64 deletions
diff --git a/sos/report/plugins/apache.py b/sos/report/plugins/apache.py
index 64f08cf9..f0d6f4e9 100644
--- a/sos/report/plugins/apache.py
+++ b/sos/report/plugins/apache.py
@@ -50,9 +50,12 @@ class Apache(Plugin):
'ceilometer',
'cinder',
'foreman',
+ 'gnocchi',
'horizon',
'keystone',
+ 'manila',
'nova',
+ 'octavia',
'placement',
'pulp'
]
@@ -131,7 +134,7 @@ class RedHatApache(Apache, RedHatPlugin):
class DebianApache(Apache, DebianPlugin, UbuntuPlugin):
files = ('/etc/apache2/apache2.conf',)
- apachepkg = 'apache'
+ apachepkg = 'apache2'
def setup(self):
super(DebianApache, self).setup()
@@ -144,10 +147,15 @@ class DebianApache(Apache, DebianPlugin, UbuntuPlugin):
# collect only the current log set by default
self.add_copy_spec([
- "/var/log/apache2/access_log",
- "/var/log/apache2/error_log",
+ "/var/log/apache2/access.log",
+ "/var/log/apache2/error.log",
+ "/var/log/apache2/ssl_access.log",
+ "/var/log/apache2/ssl_error.log",
+ "/var/log/apache2/other_vhosts_access.log",
])
if self.get_option("log") or self.get_option("all_logs"):
- self.add_copy_spec("/var/log/apache2/*")
+ self.add_copy_spec([
+ "/var/log/apache2",
+ ])
# vim: set et ts=4 sw=4 :
diff --git a/sos/report/plugins/openstack_aodh.py b/sos/report/plugins/openstack_aodh.py
index 8f99653f..3688706b 100644
--- a/sos/report/plugins/openstack_aodh.py
+++ b/sos/report/plugins/openstack_aodh.py
@@ -34,12 +34,12 @@ class OpenStackAodh(Plugin):
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/aodh/*",
- "/var/log/httpd/aodh*",
+ "/var/log/{}*/aodh*".format(self.apachepkg),
])
else:
self.add_copy_spec([
"/var/log/aodh/*.log",
- "/var/log/httpd/aodh*.log",
+ "/var/log/{}*/aodh*.log".format(self.apachepkg),
])
vars_all = [p in os.environ for p in [
@@ -92,17 +92,21 @@ class OpenStackAodh(Plugin):
class DebianOpenStackAodh(OpenStackAodh, DebianPlugin, UbuntuPlugin):
+ apachepkg = "apache2"
packages = (
'aodh-api',
+ 'aodh-common',
'aodh-evaluator',
'aodh-notifier',
'aodh-listener',
- 'python-aodhclient'
+ 'python-aodh',
+ 'python3-aodh',
)
class RedHatOpenStackAodh(OpenStackAodh, RedHatPlugin):
+ apachepkg = "httpd"
packages = ('openstack-selinux',)
def setup(self):
diff --git a/sos/report/plugins/openstack_ceilometer.py b/sos/report/plugins/openstack_ceilometer.py
index 784ecbb2..0031afd2 100644
--- a/sos/report/plugins/openstack_ceilometer.py
+++ b/sos/report/plugins/openstack_ceilometer.py
@@ -76,10 +76,11 @@ class DebianCeilometer(OpenStackCeilometer, DebianPlugin,
'ceilometer-api',
'ceilometer-agent-central',
'ceilometer-agent-compute',
+ 'ceilometer-agent-notification',
'ceilometer-collector',
'ceilometer-common',
'python-ceilometer',
- 'python-ceilometerclient'
+ 'python3-ceilometer',
)
diff --git a/sos/report/plugins/openstack_cinder.py b/sos/report/plugins/openstack_cinder.py
index bc58a2a9..23483a8d 100644
--- a/sos/report/plugins/openstack_cinder.py
+++ b/sos/report/plugins/openstack_cinder.py
@@ -63,12 +63,12 @@ class OpenStackCinder(Plugin):
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/cinder/",
- "/var/log/httpd/cinder*",
+ "/var/log/{}*/cinder*".format(self.apachepkg),
])
else:
self.add_copy_spec([
"/var/log/cinder/*.log",
- "/var/log/httpd/cinder*.log",
+ "/var/log/{}*/cinder*.log".format(self.apachepkg),
])
def apply_regex_sub(self, regexp, subst):
@@ -107,6 +107,7 @@ class OpenStackCinder(Plugin):
class DebianCinder(OpenStackCinder, DebianPlugin, UbuntuPlugin):
cinder = False
+ apachepkg = 'apache2'
packages = (
'cinder-api',
'cinder-backup',
@@ -114,24 +115,14 @@ class DebianCinder(OpenStackCinder, DebianPlugin, UbuntuPlugin):
'cinder-scheduler',
'cinder-volume',
'python-cinder',
- 'python-cinderclient'
+ 'python3-cinder',
)
- 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):
cinder = False
+ apachepkg = 'httpd'
packages = ('openstack-selinux',)
def setup(self):
diff --git a/sos/report/plugins/openstack_glance.py b/sos/report/plugins/openstack_glance.py
index dbc8a992..ec0feee6 100644
--- a/sos/report/plugins/openstack_glance.py
+++ b/sos/report/plugins/openstack_glance.py
@@ -114,7 +114,8 @@ class DebianGlance(OpenStackGlance, DebianPlugin, UbuntuPlugin):
'glance-client',
'glance-common',
'glance-registry',
- 'python-glance'
+ 'python-glance',
+ 'python3-glance',
)
service_name = 'glance-api.service'
diff --git a/sos/report/plugins/gnocchi.py b/sos/report/plugins/openstack_gnocchi.py
index 7b1091a2..88c63c1e 100644
--- a/sos/report/plugins/gnocchi.py
+++ b/sos/report/plugins/openstack_gnocchi.py
@@ -16,7 +16,7 @@ from sos.report.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
class Gnocchi(Plugin):
short_desc = 'Gnocchi - Metric as a service'
- plugin_name = "gnocchi"
+ plugin_name = "openstack_gnocchi"
profiles = ('openstack', 'openstack_controller')
@@ -97,11 +97,15 @@ class RedHatGnocchi(Gnocchi, RedHatPlugin):
class DebianGnocchi(Gnocchi, DebianPlugin, UbuntuPlugin):
- apachepkg = 'apache'
+ apachepkg = 'apache2'
packages = (
- 'gnocchi-api', 'gnocchi-metricd', 'gnocchi-common'
- 'gnocchi-statsd', 'python3-gnocchiclient'
+ 'gnocchi-api',
+ 'gnocchi-metricd',
+ 'gnocchi-common',
+ 'gnocchi-statsd',
+ 'python-gnocchi',
+ 'python3-gnocchi',
)
# vim: set et ts=4 sw=4 :
diff --git a/sos/report/plugins/openstack_heat.py b/sos/report/plugins/openstack_heat.py
index e1b08a5a..28e20ad2 100644
--- a/sos/report/plugins/openstack_heat.py
+++ b/sos/report/plugins/openstack_heat.py
@@ -128,7 +128,7 @@ class DebianHeat(OpenStackHeat, DebianPlugin, UbuntuPlugin):
'heat-common',
'heat-engine',
'python-heat',
- 'python-heatclient'
+ 'python3-heat',
)
service_name = 'heat-api.service'
diff --git a/sos/report/plugins/openstack_horizon.py b/sos/report/plugins/openstack_horizon.py
index e429ac8c..167b377a 100644
--- a/sos/report/plugins/openstack_horizon.py
+++ b/sos/report/plugins/openstack_horizon.py
@@ -75,8 +75,9 @@ class UbuntuHorizon(OpenStackHorizon, UbuntuPlugin):
packages = (
'python-django-horizon',
+ 'python3-django-horizon',
'openstack-dashboard',
- 'openstack-dashboard-ubuntu-theme'
+ 'openstack-dashboard-ubuntu-theme',
)
def setup(self):
diff --git a/sos/report/plugins/openstack_keystone.py b/sos/report/plugins/openstack_keystone.py
index 872103a6..378d359c 100644
--- a/sos/report/plugins/openstack_keystone.py
+++ b/sos/report/plugins/openstack_keystone.py
@@ -44,10 +44,12 @@ class OpenStackKeystone(Plugin):
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/keystone/",
+ "/var/log/{}*/keystone*".format(self.apachepkg),
])
else:
self.add_copy_spec([
"/var/log/keystone/*.log",
+ "/var/log/{}*/keystone*.log".format(self.apachepkg),
])
# collect domain config directory, if specified
@@ -115,23 +117,18 @@ class OpenStackKeystone(Plugin):
class DebianKeystone(OpenStackKeystone, DebianPlugin, UbuntuPlugin):
+ apachepkg = 'apache2'
packages = (
'keystone',
'python-keystone',
- 'python-keystoneclient'
+ 'python3-keystone',
)
class RedHatKeystone(OpenStackKeystone, RedHatPlugin):
+ apachepkg = 'httpd'
packages = ('openstack-selinux',)
- def setup(self):
- super(RedHatKeystone, self).setup()
- if self.get_option("all_logs"):
- self.add_copy_spec("/var/log/httpd/keystone*")
- else:
- self.add_copy_spec("/var/log/httpd/keystone*.log")
-
# vim: set et ts=4 sw=4 :
diff --git a/sos/report/plugins/openstack_manila.py b/sos/report/plugins/openstack_manila.py
index c3a65a50..3c0e49c2 100644
--- a/sos/report/plugins/openstack_manila.py
+++ b/sos/report/plugins/openstack_manila.py
@@ -82,9 +82,21 @@ class DebianManila(OpenStackManila, DebianPlugin, UbuntuPlugin):
'manila-common',
'manila-api',
'manila-share',
- 'manila-scheduler'
+ 'manila-scheduler',
+ 'python3-manila',
)
+ def setup(self):
+ super(DebianManila, self).setup()
+ if self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/apache2/manila*",
+ ])
+ else:
+ self.add_copy_spec([
+ "/var/log/apache2/manila*.log",
+ ])
+
class RedHatManila(OpenStackManila, RedHatPlugin):
@@ -95,5 +107,14 @@ class RedHatManila(OpenStackManila, RedHatPlugin):
super(RedHatManila, self).setup()
self.add_copy_spec("/etc/sudoers.d/manila")
+ if self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/containers/manila/*"
+ ])
+ else:
+ self.add_copy_spec([
+ "/var/log/containers/manila/*.log"
+ ])
+
# vim: et ts=4 sw=4
diff --git a/sos/report/plugins/openstack_neutron.py b/sos/report/plugins/openstack_neutron.py
index e95892ed..a9f2e637 100644
--- a/sos/report/plugins/openstack_neutron.py
+++ b/sos/report/plugins/openstack_neutron.py
@@ -111,7 +111,7 @@ class DebianNeutron(OpenStackNeutron, DebianPlugin, UbuntuPlugin):
'neutron-plugin-ryu-agent',
'neutron-server',
'python-neutron',
- 'python-neutronclient'
+ 'python3-neutron',
)
def check_enabled(self):
diff --git a/sos/report/plugins/openstack_nova.py b/sos/report/plugins/openstack_nova.py
index 0d556527..8bdcb1c6 100644
--- a/sos/report/plugins/openstack_nova.py
+++ b/sos/report/plugins/openstack_nova.py
@@ -92,6 +92,7 @@ class OpenStackNova(Plugin):
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/nova/",
+ "/var/log/{}*/nova*".format(self.apachepkg),
])
else:
novadir = '/var/log/nova/'
@@ -106,6 +107,9 @@ class OpenStackNova(Plugin):
]
for novalog in novalogs:
self.add_copy_spec(self.path_join(novadir, novalog))
+ self.add_copy_spec([
+ "/var/log/{}*/nova*.log".format(self.apachepkg),
+ ])
pp = ['', '_libvirt', '_metadata', '_placement']
sp = [
@@ -162,6 +166,7 @@ class OpenStackNova(Plugin):
class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin):
+ apachepkg = "apache2"
nova = False
packages = (
'nova-api-ec2',
@@ -183,8 +188,8 @@ class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin):
'nova-volume',
'novnc',
'python-nova',
- 'python-novaclient',
- 'python-novnc'
+ 'python-novnc',
+ 'python3-nova',
)
service_name = "nova-api.service"
@@ -198,6 +203,7 @@ class DebianNova(OpenStackNova, DebianPlugin, UbuntuPlugin):
class RedHatNova(OpenStackNova, RedHatPlugin):
+ apachepkg = "httpd"
nova = False
packages = ('openstack-selinux',)
@@ -212,12 +218,10 @@ class RedHatNova(OpenStackNova, RedHatPlugin):
])
if self.get_option("all_logs"):
self.add_copy_spec([
- "/var/log/httpd/nova*",
"/var/log/httpd/placement*",
])
else:
self.add_copy_spec([
- "/var/log/httpd/nova*.log",
"/var/log/httpd/placement*.log",
])
diff --git a/sos/report/plugins/openstack_octavia.py b/sos/report/plugins/openstack_octavia.py
index c6695dd2..45d68635 100644
--- a/sos/report/plugins/openstack_octavia.py
+++ b/sos/report/plugins/openstack_octavia.py
@@ -128,7 +128,11 @@ class OpenStackOctavia(Plugin):
class DebianOctavia(OpenStackOctavia, DebianPlugin, UbuntuPlugin):
- packages = ('octavia-common', 'octavia-api', )
+ packages = (
+ 'octavia-common',
+ 'octavia-api',
+ 'python3-octavia',
+ )
def setup(self):
super(DebianOctavia, self).setup()
diff --git a/sos/report/plugins/openstack_placement.py b/sos/report/plugins/openstack_placement.py
index fe953a04..637b95fd 100644
--- a/sos/report/plugins/openstack_placement.py
+++ b/sos/report/plugins/openstack_placement.py
@@ -43,13 +43,15 @@ class OpenStackPlacement(Plugin):
self.add_copy_spec([
"/var/log/placement/",
"/var/log/containers/placement/",
- "/var/log/containers/httpd/placement-api/"
+ "/var/log/containers/httpd/placement-api/",
+ "/var/log/{}*/placement*".format(self.apachepkg),
])
else:
self.add_copy_spec([
"/var/log/placement/*.log",
"/var/log/containers/placement/*.log",
"/var/log/containers/httpd/placement-api/*log",
+ "/var/log/{}*/placement*.log".format(self.apachepkg),
])
self.add_copy_spec([
@@ -85,26 +87,17 @@ 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")
+ apachepkg = "apache2"
+ packages = (
+ 'placement-common',
+ 'placement-api',
+ 'python3-placement',
+ )
class RedHatPlacement(OpenStackPlacement, RedHatPlugin):
+ apachepkg = "httpd"
packages = ('openstack-selinux',)
- def setup(self):
- super(RedHatPlacement, self).setup()
- if self.get_option("all_logs"):
- self.add_copy_spec("/var/log/httpd/placement*")
- else:
- self.add_copy_spec("/var/log/httpd/placement*.log")
-
# vim: set et ts=4 sw=4 :
diff --git a/sos/report/plugins/openstack_sahara.py b/sos/report/plugins/openstack_sahara.py
index 9d3beb9d..99361d7d 100644
--- a/sos/report/plugins/openstack_sahara.py
+++ b/sos/report/plugins/openstack_sahara.py
@@ -70,7 +70,7 @@ class DebianSahara(OpenStackSahara, DebianPlugin, UbuntuPlugin):
'sahara-common',
'sahara-engine',
'python-sahara',
- 'python-saharaclient',
+ 'python3-sahara',
)
def setup(self):
diff --git a/sos/report/plugins/openstack_swift.py b/sos/report/plugins/openstack_swift.py
index d7791d79..232a65ed 100644
--- a/sos/report/plugins/openstack_swift.py
+++ b/sos/report/plugins/openstack_swift.py
@@ -82,7 +82,8 @@ class DebianSwift(OpenStackSwift, DebianPlugin, UbuntuPlugin):
'swift-proxy',
'swauth',
'python-swift',
- 'python-swauth'
+ 'python-swauth',
+ 'python3-swift',
)
diff --git a/sos/report/plugins/openstack_trove.py b/sos/report/plugins/openstack_trove.py
index 2441f9bb..f617072b 100644
--- a/sos/report/plugins/openstack_trove.py
+++ b/sos/report/plugins/openstack_trove.py
@@ -67,7 +67,8 @@ class DebianTrove(OpenStackTrove, DebianPlugin, UbuntuPlugin):
'python-trove',
'trove-common',
'trove-api',
- 'trove-taskmanager'
+ 'trove-taskmanager',
+ 'python3-trove',
)
def setup(self):