1
0
forked from rpms/sos
sos/sos-openvswitch-collect-logs-db-bridges.patch
Bryn M. Reeves 89b86368f8 Update spec file for sos-3.2-1
Update sos in rawhide to the upstream 3.2 release and additional
patches including the fix for CVE-2015-7529.
2015-12-16 15:53:30 +00:00

159 lines
5.5 KiB
Diff

From 775b2bbfb28701ec2e687f0ece68a4558cef8740 Mon Sep 17 00:00:00 2001
From: Lee Yarwood <lyarwood@redhat.com>
Date: Tue, 17 Feb 2015 14:51:00 +0000
Subject: [PATCH] [openvswitch] Capture additional output for OVS bridges.
This includes `dump-flows` and `fdb/show` output useful for debugging
Openstack tenant and L3 networking issues.
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
---
sos/plugins/openvswitch.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index 3611671..5200563 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -32,6 +32,14 @@ class OpenVSwitch(Plugin):
# to the Open vSwitch server, avoiding hangs when running sosreport.
self.add_cmd_output("ovs-vsctl -t 5 show")
+ # Gather additional output for each OVS bridge on the host.
+ br_list_result = self.call_ext_prog("ovs-vsctl list-br")
+ if br_list_result['status'] == 0:
+ for br in br_list_result['output'].splitlines():
+ self.add_cmd_output("ovs-ofctl show %s" % br)
+ self.add_cmd_output("ovs-ofctl dump-flows %s" % br)
+ self.add_cmd_output("ovs-appctl fdb/show %s" % br)
+
class RedHatOpenVSwitch(OpenVSwitch, RedHatPlugin):
--
1.8.3.1
From 21aff64a58a3e0f3fc5065b2e18ca3d489e16a51 Mon Sep 17 00:00:00 2001
From: Flavio Leitner <fbl@redhat.com>
Date: Fri, 19 Jun 2015 21:55:56 -0300
Subject: [PATCH] [openvswitch] capture the logs
Both ovs-vswitchd.log and ovsdb-server.log are useful
for troubleshooting.
Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
sos/plugins/openvswitch.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index fbf3a90..1d75608 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -24,6 +24,10 @@ class OpenVSwitch(Plugin):
profiles = ('network', 'virt')
def setup(self):
+ self.add_copy_spec([
+ "/var/log/openvswitch/ovs-vswitchd.log",
+ "/var/log/openvswitch/ovsdb-server.log"
+ ])
# The '-s' option enables dumping of packet counters on the
# ports.
self.add_cmd_output("ovs-dpctl -s show")
--
1.8.3.1
From f92205495113a8403066e911baeb4f5ee59c2101 Mon Sep 17 00:00:00 2001
From: Flavio Leitner <fbl@redhat.com>
Date: Fri, 19 Jun 2015 22:05:52 -0300
Subject: [PATCH] [openvswitch] dump and capture the database
The database contains all the vswitch configuration and
is essential to understand and replicate the environment.
Signed-off-by: Flavio Leitner <fbl@redhat.com>
---
sos/plugins/openvswitch.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index 1d75608..4dd15b2 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -44,6 +44,9 @@ class OpenVSwitch(Plugin):
self.add_cmd_output("ovs-ofctl dump-flows %s" % br)
self.add_cmd_output("ovs-appctl fdb/show %s" % br)
+ # Gather the database.
+ self.add_cmd_output("ovsdb-client dump")
+
class RedHatOpenVSwitch(OpenVSwitch, RedHatPlugin):
--
1.8.3.1
From 4a57c54216242acb009fdb107d52712decfdfc1e Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 6 Jul 2015 17:31:44 +0100
Subject: [PATCH] [openvswitch] consolidate self.add_cmd_output() calls
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/openvswitch.py | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/sos/plugins/openvswitch.py b/sos/plugins/openvswitch.py
index 4dd15b2..8d691dc 100644
--- a/sos/plugins/openvswitch.py
+++ b/sos/plugins/openvswitch.py
@@ -24,28 +24,32 @@ class OpenVSwitch(Plugin):
profiles = ('network', 'virt')
def setup(self):
+
self.add_copy_spec([
"/var/log/openvswitch/ovs-vswitchd.log",
"/var/log/openvswitch/ovsdb-server.log"
])
- # The '-s' option enables dumping of packet counters on the
- # ports.
- self.add_cmd_output("ovs-dpctl -s show")
- # The '-t 5' adds an upper bound on how long to wait to connect
- # to the Open vSwitch server, avoiding hangs when running sosreport.
- self.add_cmd_output("ovs-vsctl -t 5 show")
+ self.add_cmd_output([
+ # The '-s' option enables dumping of packet counters on the
+ # ports.
+ "ovs-dpctl -s show",
+ # The '-t 5' adds an upper bound on how long to wait to connect
+ # to the Open vSwitch server, avoiding hangs when running sos.
+ "ovs-vsctl -t 5 show",
+ # Gather the database.
+ "ovsdb-client dump"
+ ])
# Gather additional output for each OVS bridge on the host.
br_list_result = self.call_ext_prog("ovs-vsctl list-br")
if br_list_result['status'] == 0:
for br in br_list_result['output'].splitlines():
- self.add_cmd_output("ovs-ofctl show %s" % br)
- self.add_cmd_output("ovs-ofctl dump-flows %s" % br)
- self.add_cmd_output("ovs-appctl fdb/show %s" % br)
-
- # Gather the database.
- self.add_cmd_output("ovsdb-client dump")
+ self.add_cmd_output([
+ "ovs-ofctl show %s" % br,
+ "ovs-ofctl dump-flows %s" % br,
+ "ovs-appctl fdb/show %s" % br
+ ])
class RedHatOpenVSwitch(OpenVSwitch, RedHatPlugin):
--
1.8.3.1