aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Runge <mrunge@redhat.com>2022-02-28 20:12:13 +0100
committerJake Hunsaker <jhunsake@redhat.com>2022-03-09 12:48:45 -0500
commit96af9a5f6d7b2ad1e77d9e2ef656d99f168f4bbf (patch)
tree548d592418f4a63bf5b8e99d3ddc3f8b9951b637
parent1682e78d2a63aa771a8209b46382c109bd78e84d (diff)
downloadsos-96af9a5f6d7b2ad1e77d9e2ef656d99f168f4bbf.tar.gz
[Plugins] Adjust paths for containerized setup
Red Hat OpenStack uses a container based setup, log files are found under /var/log/containers/<service>. Config files are located under /var/lib/config-data/puppet-generated/ Signed-off-by: Matthias Runge <mrunge@redhat.com>
-rw-r--r--sos/report/plugins/collectd.py7
-rw-r--r--sos/report/plugins/openstack_aodh.py13
-rw-r--r--sos/report/plugins/openstack_ceilometer.py4
3 files changed, 20 insertions, 4 deletions
diff --git a/sos/report/plugins/collectd.py b/sos/report/plugins/collectd.py
index 8584adf9..818f1568 100644
--- a/sos/report/plugins/collectd.py
+++ b/sos/report/plugins/collectd.py
@@ -21,14 +21,17 @@ class Collectd(Plugin, IndependentPlugin):
# or being inside Super Proviledged Container that does not have
# the package but logs to the host's logfile
packages = ('collectd',)
- files = ('/var/log/containers/collectd/collectd.log',)
+ files = ('/var/log/containers/collectd/collectd.log',
+ '/var/log/collectd/collectd.log')
def setup(self):
self.add_copy_spec([
'/etc/collectd.conf',
'/etc/collectd.d/*.conf',
'/var/log/containers/collectd/collectd.log',
- '/var/lib/config-data/collectd',
+ '/var/lib/config-data/puppet-generated/collectd/etc/collectd.conf',
+ '/var/lib/config-data/puppet-generated/collectd/etc/collectd.d/'
+ + '*.conf',
])
p = re.compile('^LoadPlugin.*')
diff --git a/sos/report/plugins/openstack_aodh.py b/sos/report/plugins/openstack_aodh.py
index 45442002..087a74db 100644
--- a/sos/report/plugins/openstack_aodh.py
+++ b/sos/report/plugins/openstack_aodh.py
@@ -102,4 +102,17 @@ class RedHatOpenStackAodh(OpenStackAodh, RedHatPlugin):
packages = ('openstack-selinux',)
+ def setup(self):
+ super(RedHatOpenStackAodh, self).setup()
+ if self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/containers/httpd/aodh-api/*",
+ "/var/log/containers/aodh/*"
+ ])
+ else:
+ self.add_copy_spec([
+ "/var/log/containers/httpd/aodh-api/*.log",
+ "/var/log/containers/aodh/*.log"
+ ])
+
# vim: set et ts=4 sw=4 :
diff --git a/sos/report/plugins/openstack_ceilometer.py b/sos/report/plugins/openstack_ceilometer.py
index cbedeadd..c66a427f 100644
--- a/sos/report/plugins/openstack_ceilometer.py
+++ b/sos/report/plugins/openstack_ceilometer.py
@@ -86,11 +86,11 @@ class RedHatCeilometer(OpenStackCeilometer, RedHatPlugin):
super(RedHatCeilometer, self).setup()
if self.get_option("all_logs"):
self.add_copy_spec([
- "/var/log/httpd/ceilometer*",
+ "/var/log/containers/ceilometer/*",
])
else:
self.add_copy_spec([
- "/var/log/httpd/ceilometer*.log",
+ "/var/log/containers/ceilometer/*.log",
])
# vim: set et ts=4 sw=4 :