1262863059
Resolves: bz2011537 bz2024893 bz2037350 bz2043488 Resolves: bz2054883 bz2055548 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
178 lines
6.7 KiB
Diff
178 lines
6.7 KiB
Diff
From 210b83e1d1164d29b1f6198675b8b596c4af8336 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Alvarez Sanchez <dalvarez@redhat.com>
|
|
Date: Thu, 20 Jan 2022 12:58:44 +0100
|
|
Subject: [PATCH] [ovn_central] Account for Red Hat ovn package naming
|
|
|
|
Previous ovn packages were 'ovn2xxx' and now they have
|
|
been renamed to 'ovn-2xxx'. This causes sos tool to not
|
|
recognize that the packages are installed and it won't
|
|
collect the relevant data.
|
|
|
|
This patch is changing the match to be compatible
|
|
with the previous and newer naming conventions.
|
|
|
|
Signed-off-by: Daniel Alvarez Sanchez <dalvarez@redhat.com>
|
|
---
|
|
sos/report/plugins/ovn_central.py | 2 +-
|
|
sos/report/plugins/ovn_host.py | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
|
|
index ddbf288da..0f947d4c5 100644
|
|
--- a/sos/report/plugins/ovn_central.py
|
|
+++ b/sos/report/plugins/ovn_central.py
|
|
@@ -147,7 +147,7 @@ def setup(self):
|
|
|
|
class RedHatOVNCentral(OVNCentral, RedHatPlugin):
|
|
|
|
- packages = ('openvswitch-ovn-central', 'ovn2.*-central', )
|
|
+ packages = ('openvswitch-ovn-central', 'ovn.*-central', )
|
|
ovn_sbdb_sock_path = '/var/run/openvswitch/ovnsb_db.ctl'
|
|
|
|
|
|
diff --git a/sos/report/plugins/ovn_host.py b/sos/report/plugins/ovn_host.py
|
|
index 78604a15a..25c38cccc 100644
|
|
--- a/sos/report/plugins/ovn_host.py
|
|
+++ b/sos/report/plugins/ovn_host.py
|
|
@@ -55,7 +55,7 @@ def check_enabled(self):
|
|
|
|
class RedHatOVNHost(OVNHost, RedHatPlugin):
|
|
|
|
- packages = ('openvswitch-ovn-host', 'ovn2.*-host', )
|
|
+ packages = ('openvswitch-ovn-host', 'ovn.*-host', )
|
|
|
|
|
|
class DebianOVNHost(OVNHost, DebianPlugin, UbuntuPlugin):
|
|
From 21fc376d97a5f74743e2b7cf7069349e874b979e Mon Sep 17 00:00:00 2001
|
|
From: Hemanth Nakkina <hemanth.nakkina@canonical.com>
|
|
Date: Fri, 4 Feb 2022 07:57:59 +0530
|
|
Subject: [PATCH] [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
|
|
---
|
|
sos/report/plugins/ovn_central.py | 13 ++++++++++++-
|
|
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
|
|
index 0f947d4c5..2f0438df3 100644
|
|
--- a/sos/report/plugins/ovn_central.py
|
|
+++ b/sos/report/plugins/ovn_central.py
|
|
@@ -84,6 +84,14 @@ def setup(self):
|
|
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 @@ def setup(self):
|
|
|
|
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 @@ def setup(self):
|
|
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'
|
|
From de9b020a72d1ceda39587db4c6d5acf72cd90da2 Mon Sep 17 00:00:00 2001
|
|
From: Fernando Royo <froyo@redhat.com>
|
|
Date: Tue, 15 Feb 2022 10:00:38 +0100
|
|
Subject: [PATCH] [ovn_central] Rename container responsable of Red Hat
|
|
ovn_central plugin
|
|
|
|
ovn_central plugin is running by container with
|
|
name 'ovn-dbs-bundle*', a typo has been identified and
|
|
this cause plugin ovn_central not enabled by default as it
|
|
does not recognize any container responsible of this.
|
|
|
|
This patch fix this container name match, searching schema db
|
|
keeping backward compatibility with openvswitch.
|
|
---
|
|
sos/report/plugins/ovn_central.py | 23 ++++++++++++-----------
|
|
1 file changed, 12 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py
|
|
index 2f0438df..2f34bff0 100644
|
|
--- a/sos/report/plugins/ovn_central.py
|
|
+++ b/sos/report/plugins/ovn_central.py
|
|
@@ -24,7 +24,7 @@ class OVNCentral(Plugin):
|
|
short_desc = 'OVN Northd'
|
|
plugin_name = "ovn_central"
|
|
profiles = ('network', 'virt')
|
|
- containers = ('ovs-db-bundle.*',)
|
|
+ containers = ('ovn-dbs-bundle.*',)
|
|
|
|
def get_tables_from_schema(self, filename, skip=[]):
|
|
if self._container_name:
|
|
@@ -66,7 +66,7 @@ class OVNCentral(Plugin):
|
|
cmds.append('%s list %s' % (ovn_cmd, table))
|
|
|
|
def setup(self):
|
|
- self._container_name = self.get_container_by_name('ovs-dbs-bundle.*')
|
|
+ self._container_name = self.get_container_by_name(self.containers[0])
|
|
|
|
ovs_rundir = os.environ.get('OVS_RUNDIR')
|
|
for pidfile in ['ovnnb_db.pid', 'ovnsb_db.pid', 'ovn-northd.pid']:
|
|
@@ -110,12 +110,11 @@ class OVNCentral(Plugin):
|
|
'ovn-sbctl get-connection',
|
|
]
|
|
|
|
- schema_dir = '/usr/share/openvswitch'
|
|
-
|
|
- nb_tables = self.get_tables_from_schema(self.path_join(
|
|
- schema_dir, 'ovn-nb.ovsschema'))
|
|
-
|
|
- self.add_database_output(nb_tables, nbctl_cmds, 'ovn-nbctl')
|
|
+ # backward compatibility
|
|
+ for path in ['/usr/share/openvswitch', '/usr/share/ovn']:
|
|
+ nb_tables = self.get_tables_from_schema(self.path_join(
|
|
+ path, 'ovn-nb.ovsschema'))
|
|
+ self.add_database_output(nb_tables, nbctl_cmds, 'ovn-nbctl')
|
|
|
|
cmds = ovsdb_cmds
|
|
cmds += nbctl_cmds
|
|
@@ -125,9 +124,11 @@ class OVNCentral(Plugin):
|
|
format(self.ovn_sbdb_sock_path),
|
|
"output": "Leader: self"}
|
|
if self.test_predicate(self, pred=SoSPredicate(self, cmd_outputs=co)):
|
|
- sb_tables = self.get_tables_from_schema(self.path_join(
|
|
- schema_dir, 'ovn-sb.ovsschema'), ['Logical_Flow'])
|
|
- self.add_database_output(sb_tables, sbctl_cmds, 'ovn-sbctl')
|
|
+ # backward compatibility
|
|
+ for path in ['/usr/share/openvswitch', '/usr/share/ovn']:
|
|
+ sb_tables = self.get_tables_from_schema(self.path_join(
|
|
+ path, 'ovn-sb.ovsschema'), ['Logical_Flow'])
|
|
+ self.add_database_output(sb_tables, sbctl_cmds, 'ovn-sbctl')
|
|
cmds += sbctl_cmds
|
|
|
|
# If OVN is containerized, we need to run the above commands inside
|
|
--
|
|
2.34.1
|
|
|