From 211475ce45719b7c330452e31906a1162f3729cb Mon Sep 17 00:00:00 2001 From: Yedidyah Bar David Date: Tue, 6 Mar 2018 15:53:40 +0200 Subject: [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 Signed-off-by: Bryn M. Reeves --- sos/plugins/ovirt_hosted_engine.py | 14 +------------- 1 file changed, 1 insertion(+), 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', ]) -- cgit