aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShatadru Bandyopadhyay <shatadru1@gmail.com>2017-10-29 20:06:14 +0530
committerBryn M. Reeves <bmr@redhat.com>2018-04-30 15:28:04 +0100
commit27cc86200dd241ef9815487d55e1c2cd081529dc (patch)
tree663f8beac05e7020aef373ced29e4a20e9260149
parent7ea55338417e7d60bd67ca7788ecabfc5da47b56 (diff)
downloadsos-27cc86200dd241ef9815487d55e1c2cd081529dc.tar.gz
[openstack_*, gnocchi] Fix collection of openstack logs
with --all-logs option openstack plugins now collects respective logs from /var/log/httpd/ without --all-logs, plugins only captures related .log file from /var/log/httpd Changes are made in following plugins : gnocchi, openstack_aodh, openstack_ceilometer, openstack_horizon and openstack_keystone to ensure all openstack specific logs are collected from /var/log/httpd/ Fixes : #1131 Resolves: #1132 Signed-off-by: Shatadru Bandyopadhyay <shatadru1@gmail.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/gnocchi.py12
-rw-r--r--sos/plugins/openstack_aodh.py2
-rw-r--r--sos/plugins/openstack_ceilometer.py11
-rw-r--r--sos/plugins/openstack_horizon.py9
-rw-r--r--sos/plugins/openstack_keystone.py12
5 files changed, 39 insertions, 7 deletions
diff --git a/sos/plugins/gnocchi.py b/sos/plugins/gnocchi.py
index d2eda47e..d69e5431 100644
--- a/sos/plugins/gnocchi.py
+++ b/sos/plugins/gnocchi.py
@@ -49,17 +49,17 @@ class GnocchiPlugin(Plugin, RedHatPlugin):
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/gnocchi/*",
+ "/var/log/httpd/gnocchi*",
"/var/log/containers/gnocchi/*",
- "/var/log/containers/httpd/gnocchi-api/*"],
- sizelimit=self.limit
- )
+ "/var/log/containers/httpd/gnocchi-api/*"
+ ], sizelimit=self.limit)
else:
self.add_copy_spec([
"/var/log/gnocchi/*.log",
+ "/var/log/httpd/gnocchi*.log",
"/var/log/containers/gnocchi/*.log",
- "/var/log/containers/httpd/gnocchi-api/*log"],
- sizelimit=self.limit
- )
+ "/var/log/containers/httpd/gnocchi-api/*log"
+ ], sizelimit=self.limit)
vars_all = [p in os.environ for p in [
'OS_USERNAME', 'OS_PASSWORD']]
diff --git a/sos/plugins/openstack_aodh.py b/sos/plugins/openstack_aodh.py
index b14b1c2f..5e6dcbd7 100644
--- a/sos/plugins/openstack_aodh.py
+++ b/sos/plugins/openstack_aodh.py
@@ -50,12 +50,14 @@ class OpenStackAodh(Plugin, RedHatPlugin):
if self.get_option("all_logs"):
self.add_copy_spec([
"/var/log/aodh/*",
+ "/var/log/httpd/aodh*",
"/var/log/containers/aodh/*",
"/var/log/containers/httpd/aodh-api/*"
], sizelimit=self.limit)
else:
self.add_copy_spec([
"/var/log/aodh/*.log",
+ "/var/log/httpd/aodh*.log",
"/var/log/containers/aodh/*.log",
"/var/log/containers/httpd/aodh-api/*log"
], sizelimit=self.limit)
diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py
index b3c6bd8e..1015a060 100644
--- a/sos/plugins/openstack_ceilometer.py
+++ b/sos/plugins/openstack_ceilometer.py
@@ -92,4 +92,15 @@ class RedHatCeilometer(OpenStackCeilometer, RedHatPlugin):
'python-ceilometerclient'
)
+ def setup(self):
+ super(RedHatCeilometer, self).setup()
+ if self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/httpd/ceilometer*",
+ ], sizelimit=self.limit)
+ else:
+ self.add_copy_spec([
+ "/var/log/httpd/ceilometer*.log",
+ ], sizelimit=self.limit)
+
# vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/openstack_horizon.py b/sos/plugins/openstack_horizon.py
index 90634d4f..f9b8b33b 100644
--- a/sos/plugins/openstack_horizon.py
+++ b/sos/plugins/openstack_horizon.py
@@ -119,7 +119,14 @@ class RedHatHorizon(OpenStackHorizon, RedHatPlugin):
def setup(self):
super(RedHatHorizon, self).setup()
self.add_copy_spec("/etc/httpd/conf.d/openstack-dashboard.conf")
- if self.get_option("log"):
+ if self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/httpd/horizon*",
+ ], sizelimit=self.limit)
+ else:
+ self.add_copy_spec([
+ "/var/log/httpd/horizon*.log"
+ ], sizelimit=self.limit)
self.add_copy_spec("/var/log/httpd/")
# vim: set et ts=4 sw=4 :
diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py
index 631e02b2..bcbd01dc 100644
--- a/sos/plugins/openstack_keystone.py
+++ b/sos/plugins/openstack_keystone.py
@@ -121,4 +121,16 @@ class RedHatKeystone(OpenStackKeystone, RedHatPlugin):
'python-keystoneclient'
)
+ def setup(self):
+ super(RedHatKeystone, self).setup()
+ if self.get_option("all_logs"):
+ self.add_copy_spec([
+ "/var/log/httpd/keystone*",
+ ], sizelimit=self.limit)
+ else:
+ self.add_copy_spec([
+ "/var/log/httpd/keystone*.log",
+ ], sizelimit=self.limit)
+
+
# vim: set et ts=4 sw=4 :