Avoid race condition at _process_lrp_port
There is a chance that a lrp port got just created when we discover it on a re-sync action and did not yet have the information about the peer. In that case the port should be skip until the information is ready. Another option was that the lrp port was being deleted. In that case it is also the right action to skip it. Change-Id: Iddc30a3bfc910fa3e2e390e54015c82f13f3fdfa
This commit is contained in:
parent
7be516a06f
commit
6f5fb86d8e
|
@ -746,6 +746,11 @@ class OVNBGPDriver(driver_api.AgentDriverBase):
|
|||
# This should not happen: subnet without CIDR
|
||||
return
|
||||
|
||||
if not lrp.options.get('peer'):
|
||||
# if there is no peer associated to the port we need to
|
||||
# 1) creation: wait for another re-sync to expose it
|
||||
# 2) deletion: no need to add it as it being removed
|
||||
return
|
||||
if not self._address_scope_allowed(lrp_ip, lrp.options['peer']):
|
||||
return
|
||||
subnet_datapath = self.sb_idl.get_port_datapath(
|
||||
|
|
Loading…
Reference in New Issue