Only process provider lbs associated with local cr-lrps
This extra checking got (wrongly) dropped at [1]. This patch re-adds it with the adaptation to the new DB field [1] https://review.opendev.org/c/x/ovn-bgp-agent/+/868332 Change-Id: Ida98871610536f51b924cc79de0433b53b9139e9
This commit is contained in:
parent
6d20db44fd
commit
56103bffa9
@ -700,9 +700,17 @@ class OVNBGPDriver(driver_api.AgentDriverBase):
|
||||
|
||||
def _process_ovn_lb(self, ovn_lb, cr_lrp_port, exposed_ips=[],
|
||||
ovn_ip_rules={}):
|
||||
# assumes the cr_lrp_port is in this node, so no need for extra
|
||||
# checking as get_ovn_lb_on_provider_datapath already checks the
|
||||
# are at least 2 datapaths associated to the loadbalancer
|
||||
if hasattr(ovn_lb, 'datapath_group'):
|
||||
ovn_lb_datapaths = ovn_lb.datapath_group[0].datapaths
|
||||
else:
|
||||
ovn_lb_datapaths = ovn_lb.datapaths
|
||||
for ovn_dp in ovn_lb_datapaths:
|
||||
if ovn_dp in self.ovn_local_cr_lrps[
|
||||
cr_lrp_port]['subnets_datapath'].values():
|
||||
break
|
||||
else:
|
||||
return
|
||||
|
||||
for vip in ovn_lb.vips.keys():
|
||||
ip = driver_utils.parse_vip_from_lb_table(vip)
|
||||
self._expose_ovn_lb_on_provider(ovn_lb.name, ip, cr_lrp_port)
|
||||
|
Loading…
Reference in New Issue
Block a user