From 4374436c286086006568487dcc71b9e1ccb0bedb Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Mon, 2 Oct 2017 16:56:57 +0200 Subject: [openvswitch] Collect all logs Do not collect just 2 logfiles but all from the log directory. Resolves: #1116 Signed-off-by: Pavel Moravec --- sos/plugins/openvswitch.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py index e50111ac..b3bc4054 100644 --- a/sos/plugins/openvswitch.py +++ b/sos/plugins/openvswitch.py @@ -25,9 +25,17 @@ class OpenVSwitch(Plugin): def setup(self): + all_logs = self.get_option("all_logs") + limit = self.get_option("log_size") + + if not all_logs: + self.add_copy_spec("/var/log/openvswitch/*.log", + sizelimit=limit) + else: + self.add_copy_spec("/var/log/openvswitch/", + sizelimit=limit) + self.add_copy_spec([ - "/var/log/openvswitch/ovs-vswitchd.log", - "/var/log/openvswitch/ovsdb-server.log", "/var/run/openvswitch/ovsdb-server.pid", "/var/run/openvswitch/ovs-vswitchd.pid" ]) -- cgit