aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Conole <aconole@redhat.com>2020-05-07 10:40:36 -0400
committerJake Hunsaker <jhunsake@redhat.com>2020-05-26 14:16:58 -0400
commiteb145d9484cae850f6fc4984e2e229486241c833 (patch)
tree637fb7f7fbefefca9caa0fbe68920207a976e9a8
parent798fc4a5c204b59cbe39ae7aca194642e3d78faa (diff)
downloadsos-eb145d9484cae850f6fc4984e2e229486241c833.tar.gz
[openvswitch] capture all datapath data
This includes flows, ct stats, frag stats, and conntrack information for all of the datapath types that are active. Additionally, pull the tunnel information for datapaths. Stop using 'ovs-dpctl' in favor of 'ovs-appctl dpctl/*' - for multiple reasons. The 'ovs-dpctl' command doesn't support the userspace datapath. 'ovs-dpctl' cannot pull all attribute types (including type=offloaded) in newer OVS versions. Also, the default attribute type is 'all' so adding type=offloaded is redundant. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/openvswitch.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/sos/report/plugins/openvswitch.py b/sos/report/plugins/openvswitch.py
index b374dad8..c6c96149 100644
--- a/sos/report/plugins/openvswitch.py
+++ b/sos/report/plugins/openvswitch.py
@@ -48,13 +48,6 @@ class OpenVSwitch(Plugin):
])
self.add_cmd_output([
- # The '-s' option enables dumping of packet counters on the
- # ports.
- "ovs-dpctl -s show",
- # Capture the in-kernel flow information if it exists
- "ovs-dpctl dump-flows -m",
- # Capture the flow information also for offloaded rules
- "ovs-dpctl dump-flows type=offloaded -m",
# 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",
@@ -91,16 +84,14 @@ class OpenVSwitch(Plugin):
"ovs-vsctl list interface",
# Capture OVS detailed information from all the bridges
"ovs-vsctl list bridge",
- # Capture DPDK datapath packet counters and config
- "ovs-appctl dpctl/show -s",
- # Capture DPDK datapath flows
- "ovs-appctl dpctl/dump-flows",
# Capture DPDK queue to pmd mapping
"ovs-appctl dpif-netdev/pmd-rxq-show",
# Capture DPDK pmd stats
"ovs-appctl dpif-netdev/pmd-stats-show",
# Capture DPDK pmd performance counters
- "ovs-appctl dpif-netdev/pmd-perf-show"
+ "ovs-appctl dpif-netdev/pmd-perf-show",
+ # Capture ofproto tunnel configs
+ "ovs-appctl ofproto/list-tunnels"
])
# Gather systemd services logs
@@ -109,6 +100,18 @@ class OpenVSwitch(Plugin):
self.add_journal(units="ovs-vswitchd")
self.add_journal(units="ovsdb-server")
+ # Gather the datapath information for each datapath
+ dp_list_result = self.collect_cmd_output('ovs-appctl dpctl/dump-dps')
+ if dp_list_result['status'] == 0:
+ for dp in dp_list_result['output'].splitlines():
+ self.add_cmd_output([
+ "ovs-appctl dpctl/show -s %s" % dp,
+ "ovs-appctl dpctl/dump-flows -m %s" % dp,
+ "ovs-appctl dpctl/dump-conntrack -m %s" % dp,
+ "ovs-appctl dpctl/ct-stats-show -m %s" % dp,
+ "ovs-appctl dpctl/ipf-get-status %s" % dp,
+ ])
+
# Gather additional output for each OVS bridge on the host.
br_list_result = self.collect_cmd_output("ovs-vsctl -t 5 list-br")
if br_list_result['status'] == 0: