From 88ce36aee6e53aecb608b1db7c84a52a843474f2 Mon Sep 17 00:00:00 2001 From: Suraj Patil Date: Fri, 14 Aug 2026 00:29:56 +0530 Subject: [PATCH] [ovn_central,ovn_host] Declare the OVN units in the services tuple Both plugins call add_journal() for their unit - ovn-northd and ovn-controller respectively - but neither declares a services tuple, and neither collects the service status. An sosreport from a host where the daemon has failed to start therefore has the journal but nothing showing whether the unit is loaded, enabled or running. Plugin._collect_services() runs each entry of the tuple through is_service() and calls both add_service_status() and add_journal(), so declaring the unit adds the missing status and replaces the explicit call. It also gives both plugins an enablement trigger beyond the package name, which matters here because they are written for deployments where OVN runs in containers: the package names differ between distributions and are frequently absent on a containerised host, while the unit name is the same. The tuples are declared on the shared base classes so they apply to both distribution subclasses. Signed-off-by: Suraj Patil --- sos/report/plugins/ovn_central.py | 3 +-- sos/report/plugins/ovn_host.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sos/report/plugins/ovn_central.py b/sos/report/plugins/ovn_central.py index c9dc73910d..273c253345 100644 --- a/sos/report/plugins/ovn_central.py +++ b/sos/report/plugins/ovn_central.py @@ -25,6 +25,7 @@ class OVNCentral(Plugin): short_desc = 'OVN Northd' plugin_name = "ovn_central" profiles = ('network', 'virt') + services = ('ovn-northd',) containers = ('ovn-dbs-bundle.*', 'ovn_cluster_north_db_server') container_name = "" ovn_nbdb_socket = "" @@ -223,8 +224,6 @@ def setup(self): if ovs_dbdir: self.add_copy_spec(self.path_join(ovs_dbdir, dbfile)) - self.add_journal(units="ovn-northd") - class RedHatOVNCentral(OVNCentral, RedHatPlugin): diff --git a/sos/report/plugins/ovn_host.py b/sos/report/plugins/ovn_host.py index 64f1c598f7..6545759ea8 100644 --- a/sos/report/plugins/ovn_host.py +++ b/sos/report/plugins/ovn_host.py @@ -17,6 +17,7 @@ class OVNHost(Plugin): short_desc = 'OVN Controller' plugin_name = "ovn_host" profiles = ('network', 'virt', 'openstack_edpm') + services = ('ovn-controller',) pidfile = 'ovn-controller.pid' pid_paths = [ '/var/lib/openvswitch/ovn', @@ -45,8 +46,6 @@ def setup(self): f'{self.ovs_cmd_pre}ovs-vsctl list Open_vSwitch', ]) - self.add_journal(units="ovn-controller") - # Collect Certificate Validity Dates for path in ['/etc/ovn/ovn-chassis.crt', '/etc/ovn/cert_host']: if self.path_exists(path):