diff --git a/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py b/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py index ea5e7847..a8be4c71 100644 --- a/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py +++ b/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py @@ -38,7 +38,8 @@ LOG = logging.getLogger(__name__) # LOG.setLevel(logging.DEBUG) # logging.basicConfig(level=logging.DEBUG) -OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Load_Balancer"] +OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Load_Balancer", + "Chassis_Private", "Logical_DP_Group"] class OVNBGPDriver(driver_api.AgentDriverBase): @@ -98,30 +99,12 @@ class OVNBGPDriver(driver_api.AgentDriverBase): events += (event_class(self),) self._post_fork_event.clear() - # TODO(lucasagomes): The OVN package in the ubuntu LTS is old - # and does not support Chassis_Private. Once the package is updated - # we can remove this fallback mode. - try: - try: - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES + ["Chassis_Private", - "Logical_DP_Group"], - events=events).start() - except AssertionError: - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES + ["Chassis_Private"], - events=events).start() - except AssertionError: - events.remove("ChassisPrivateCreateEvent") - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES, - events=events).start() + + self.sb_idl = ovn.OvnSbIdl( + self.ovn_remote, + chassis=self.chassis, + tables=OVN_TABLES, + events=events).start() # Now IDL connections can be safely used self._post_fork_event.set() diff --git a/ovn_bgp_agent/drivers/openstack/ovn_evpn_driver.py b/ovn_bgp_agent/drivers/openstack/ovn_evpn_driver.py index 94b08241..d767aa8d 100644 --- a/ovn_bgp_agent/drivers/openstack/ovn_evpn_driver.py +++ b/ovn_bgp_agent/drivers/openstack/ovn_evpn_driver.py @@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__) # LOG.setLevel(logging.DEBUG) # logging.basicConfig(level=logging.DEBUG) -OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding"] +OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Chassis_Private"] EVPN_INFO = collections.namedtuple( 'EVPNInfo', ['vrf_name', 'lo_name', 'bridge_name', 'vxlan_name', 'veth_vrf', 'veth_ovs', 'vlan_name']) @@ -78,22 +78,12 @@ class OVNEVPNDriver(driver_api.AgentDriverBase): events += (event_class(self),) self._post_fork_event.clear() - # TODO(lucasagomes): The OVN package in the ubuntu LTS is old - # and does not support Chassis_Private. Once the package is updated - # we can remove this fallback mode. - try: - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES + ["Chassis_Private"], - events=events).start() - except AssertionError: - events.remove("ChassisPrivateCreateEvent") - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES, - events=events).start() + + self.sb_idl = ovn.OvnSbIdl( + self.ovn_remote, + chassis=self.chassis, + tables=OVN_TABLES, + events=events).start() # Now IDL connections can be safely used self._post_fork_event.set() diff --git a/ovn_bgp_agent/drivers/openstack/ovn_stretched_l2_bgp_driver.py b/ovn_bgp_agent/drivers/openstack/ovn_stretched_l2_bgp_driver.py index 807c2885..0ff6fe73 100644 --- a/ovn_bgp_agent/drivers/openstack/ovn_stretched_l2_bgp_driver.py +++ b/ovn_bgp_agent/drivers/openstack/ovn_stretched_l2_bgp_driver.py @@ -36,7 +36,7 @@ from ovn_bgp_agent.utils import linux_net CONF = cfg.CONF LOG = logging.getLogger(__name__) -OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding"] +OVN_TABLES = ["Port_Binding", "Chassis", "Datapath_Binding", "Chassis_Private"] @dataclasses.dataclass(frozen=True, eq=True) @@ -93,23 +93,13 @@ class OVNBGPStretchedL2Driver(driver_api.AgentDriverBase): events += (event_class(self),) self._post_fork_event.clear() - # TODO(lucasagomes): The OVN package in the ubuntu LTS is old - # and does not support Chassis_Private. Once the package is updated - # we can remove this fallback mode. - try: - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES + ["Chassis_Private"], - events=events, - ).start() - except AssertionError: - self.sb_idl = ovn.OvnSbIdl( - self.ovn_remote, - chassis=self.chassis, - tables=OVN_TABLES, - events=events, - ).start() + + self.sb_idl = ovn.OvnSbIdl( + self.ovn_remote, + chassis=self.chassis, + tables=OVN_TABLES, + events=events, + ).start() # Now IDL connections can be safely used self._post_fork_event.set()