From 44cb26aa32e6143f1ae94bebfa1aa2b4ae2e063f Mon Sep 17 00:00:00 2001 From: Ihtisham ul Haq Date: Wed, 15 Mar 2023 15:43:04 +0100 Subject: [PATCH] Disable only connecting to SB leader As we are only doing read operations, we can connect to any Southbound cluster member, not necessarily only the leader. Change-Id: I3f528dd10736c71825983d1fb1ee8c621c08a745 --- ovn_bgp_agent/drivers/openstack/utils/ovn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ovn_bgp_agent/drivers/openstack/utils/ovn.py b/ovn_bgp_agent/drivers/openstack/utils/ovn.py index 8152b4f9..aa8b097c 100644 --- a/ovn_bgp_agent/drivers/openstack/utils/ovn.py +++ b/ovn_bgp_agent/drivers/openstack/utils/ovn.py @@ -30,8 +30,8 @@ LOG = logging.getLogger(__name__) class OvnIdl(connection.OvsdbIdl): - def __init__(self, driver, remote, schema): - super(OvnIdl, self).__init__(remote, schema) + def __init__(self, driver, remote, schema, **kwargs): + super(OvnIdl, self).__init__(remote, schema, **kwargs) self.driver = driver self.notify_handler = OvnDbNotifyHandler(driver) @@ -60,7 +60,7 @@ class OvnSbIdl(OvnIdl): for table in tables: helper.register_table(table) super(OvnSbIdl, self).__init__( - None, connection_string, helper) + None, connection_string, helper, leader_only=False) if chassis: table = ('Chassis_Private' if 'Chassis_Private' in tables else 'Chassis')