aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYedidyah Bar David <didi@redhat.com>2018-03-06 15:53:40 +0200
committerBryn M. Reeves <bmr@redhat.com>2018-05-15 15:11:27 +0100
commit211475ce45719b7c330452e31906a1162f3729cb (patch)
treec8b773a01360f748a15f1c645ebea7003908fcea
parenta8e91485ad8d540e090d55e5aa213cd522cf5292 (diff)
downloadsos-211475ce45719b7c330452e31906a1162f3729cb.tar.gz
[ovirt_hosted_engine] Collect all setup logs
In oVirt 4.2.1 and later, setup also runs several ansible playbooks, each logging to its own file. Collect everything. There should not be many files usually, as if all goes well users run setup only once. Otherwise, it is useful for debugging to get older logs as well. Closes: #1243 Resolves: #1244 Signed-off-by: Yedidyah Bar David <didi@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/ovirt_hosted_engine.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/sos/plugins/ovirt_hosted_engine.py b/sos/plugins/ovirt_hosted_engine.py
index 3af8e649..ec9765ba 100644
--- a/sos/plugins/ovirt_hosted_engine.py
+++ b/sos/plugins/ovirt_hosted_engine.py
@@ -32,7 +32,6 @@ class OvirtHostedEngine(Plugin, RedHatPlugin):
plugin_name = 'ovirt_hosted_engine'
profiles = ('virt',)
- SETUP_LOG_GLOB = '/var/log/ovirt-hosted-engine-setup/*.log'
HA_LOG_GLOB = '/var/log/ovirt-hosted-engine-ha/*.log'
def setup(self):
@@ -56,19 +55,8 @@ class OvirtHostedEngine(Plugin, RedHatPlugin):
'/var/lib/ovirt-hosted-engine-ha/broker.conf',
])
- all_setup_logs = glob.glob(self.SETUP_LOG_GLOB)
- all_setup_logs.sort(reverse=True)
- if len(all_setup_logs):
- # Add latest ovirt-hosted-engine-setup log file
- self.add_copy_spec(all_setup_logs[0])
- # Add older ovirt-hosted-engine-setup log files only if requested
- if self.get_option('all_logs'):
- self.add_copy_spec(
- self.SETUP_LOG_GLOB,
- sizelimit=self.limit
- )
-
self.add_copy_spec([
+ '/var/log/ovirt-hosted-engine-setup',
'/var/log/ovirt-hosted-engine-ha/agent.log',
'/var/log/ovirt-hosted-engine-ha/broker.log',
])