aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHemanth Nakkina <hemanth.nakkina@canonical.com>2022-02-04 07:57:59 +0530
committerJake Hunsaker <jhunsake@redhat.com>2022-02-07 08:38:36 -0500
commit21fc376d97a5f74743e2b7cf7069349e874b979e (patch)
treeea4072104e4d33bc871fbfc9b5fcf6f78c8ff29a
parent6ced41538652895ca7ff828547179c0b28488716 (diff)
downloadsos-21fc376d97a5f74743e2b7cf7069349e874b979e.tar.gz
[ovn-central] collect NB/SB ovsdb-server cluster status
Add commands to collect cluster status of Northbound and Southbound ovsdb servers. Resolves: #2840 Signed-off-by: Hemanth Nakkina hemanth.nakkina@canonical.com
-rw-r--r--sos/report/plugins/ovn_central.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
index 0f947d4c..2f0438df 100644
--- a/sos/report/plugins/ovn_central.py
+++ b/sos/report/plugins/ovn_central.py
@@ -84,6 +84,14 @@ class OVNCentral(Plugin):
else:
self.add_copy_spec("/var/log/ovn/*.log")
+ # ovsdb nb/sb cluster status commands
+ ovsdb_cmds = [
+ 'ovs-appctl -t {} cluster/status OVN_Northbound'.format(
+ self.ovn_nbdb_sock_path),
+ 'ovs-appctl -t {} cluster/status OVN_Southbound'.format(
+ self.ovn_sbdb_sock_path),
+ ]
+
# Some user-friendly versions of DB output
nbctl_cmds = [
'ovn-nbctl show',
@@ -109,7 +117,8 @@ class OVNCentral(Plugin):
self.add_database_output(nb_tables, nbctl_cmds, 'ovn-nbctl')
- cmds = nbctl_cmds
+ cmds = ovsdb_cmds
+ cmds += nbctl_cmds
# Can only run sbdb commands if we are the leader
co = {'cmd': "ovs-appctl -t {} cluster/status OVN_Southbound".
@@ -148,10 +157,12 @@ class OVNCentral(Plugin):
class RedHatOVNCentral(OVNCentral, RedHatPlugin):
packages = ('openvswitch-ovn-central', 'ovn.*-central', )
+ ovn_nbdb_sock_path = '/var/run/openvswitch/ovnnb_db.ctl'
ovn_sbdb_sock_path = '/var/run/openvswitch/ovnsb_db.ctl'
class DebianOVNCentral(OVNCentral, DebianPlugin, UbuntuPlugin):
packages = ('ovn-central', )
+ ovn_nbdb_sock_path = '/var/run/ovn/ovnnb_db.ctl'
ovn_sbdb_sock_path = '/var/run/ovn/ovnsb_db.ctl'