aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/report/plugins/ovn_central.py29
1 files changed, 17 insertions, 12 deletions
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
index 924880a3..e6a396ce 100644
--- a/sos/report/plugins/ovn_central.py
+++ b/sos/report/plugins/ovn_central.py
@@ -26,23 +26,20 @@ class OVNCentral(Plugin):
profiles = ('network', 'virt')
containers = ('ovn-dbs-bundle.*', 'ovn_cluster_north_db_server')
- def _find_ovn_controller_sock(self):
- _sfile = os.path.join(self.ovn_controller_sock_path,
- self.ovn_controller_sock_regex)
+ def _find_sock(self, path, regex_name):
+ _sfile = os.path.join(path, regex_name)
if self._container_name:
- res = self.exec_cmd("ls %s" % self.ovn_controller_sock_path,
- container=self._container_name)
+ res = self.exec_cmd("ls %s" % path, container=self._container_name)
if res['status'] != 0 or '\n' not in res['output']:
self._log_error(
"Could not retrieve ovn_controller socket path "
"from container %s" % self._container_name
)
else:
- pattern = re.compile(self.ovn_controller_sock_regex)
+ pattern = re.compile(regex_name)
for filename in res['output'].split('\n'):
if pattern.match(filename):
- return os.path.join(self.ovn_controller_sock_path,
- filename)
+ return os.path.join(path, filename)
# File not found, return the regex full path
return _sfile
@@ -110,7 +107,11 @@ class OVNCentral(Plugin):
else:
self.add_copy_spec("/var/log/ovn/*.log")
- ovn_controller_sock_path = self._find_ovn_controller_sock()
+ ovn_controller_sock_path = self._find_sock(
+ self.ovn_sock_path, self.ovn_controller_sock_regex)
+
+ northd_sock_path = self._find_sock(self.ovn_sock_path,
+ self.ovn_northd_sock_regex)
# ovsdb nb/sb cluster status commands
self.add_cmd_output(
@@ -119,7 +120,9 @@ class OVNCentral(Plugin):
self.ovn_nbdb_sock_path),
'ovs-appctl -t {} cluster/status OVN_Southbound'.format(
self.ovn_sbdb_sock_path),
- 'ovn-appctl -t ovn-northd status',
+ 'ovn-appctl -t {} status'.format(northd_sock_path),
+ 'ovn-appctl -t {} debug/chassis-features-list'.format(
+ northd_sock_path),
'ovn-appctl -t {} connection-status'.format(
ovn_controller_sock_path),
],
@@ -192,8 +195,9 @@ 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'
- ovn_controller_sock_path = '/var/run/openvswitch'
+ ovn_sock_path = '/var/run/openvswitch'
ovn_controller_sock_regex = 'ovn-controller.*.ctl'
+ ovn_northd_sock_regex = 'ovn-northd.*.ctl'
class DebianOVNCentral(OVNCentral, DebianPlugin, UbuntuPlugin):
@@ -201,5 +205,6 @@ 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'
- ovn_controller_sock_path = '/var/run/ovn'
+ ovn_sock_path = '/var/run/ovn'
ovn_controller_sock_regex = 'ovn-controller.*.ctl'
+ ovn_northd_sock_regex = 'ovn-northd.*.ctl'