Merge "[L3] Switch order of processing added and removed router ports" into stable/rocky
This commit is contained in:
commit
3495f7db40
|
@ -571,6 +571,16 @@ class RouterInfo(object):
|
||||||
internal_ports)
|
internal_ports)
|
||||||
|
|
||||||
enable_ra = False
|
enable_ra = False
|
||||||
|
for p in old_ports:
|
||||||
|
self.internal_network_removed(p)
|
||||||
|
LOG.debug("removing port %s from internal_ports cache", p)
|
||||||
|
self.internal_ports.remove(p)
|
||||||
|
enable_ra = enable_ra or self._port_has_ipv6_subnet(p)
|
||||||
|
for subnet in p['subnets']:
|
||||||
|
if ipv6_utils.is_ipv6_pd_enabled(subnet):
|
||||||
|
self.agent.pd.disable_subnet(self.router_id, subnet['id'])
|
||||||
|
del self.pd_subnets[subnet['id']]
|
||||||
|
|
||||||
for p in new_ports:
|
for p in new_ports:
|
||||||
self.internal_network_added(p)
|
self.internal_network_added(p)
|
||||||
LOG.debug("appending port %s to internal_ports cache", p)
|
LOG.debug("appending port %s to internal_ports cache", p)
|
||||||
|
@ -586,16 +596,6 @@ class RouterInfo(object):
|
||||||
lib_constants.PROVISIONAL_IPV6_PD_PREFIX):
|
lib_constants.PROVISIONAL_IPV6_PD_PREFIX):
|
||||||
self.pd_subnets[subnet['id']] = subnet['cidr']
|
self.pd_subnets[subnet['id']] = subnet['cidr']
|
||||||
|
|
||||||
for p in old_ports:
|
|
||||||
self.internal_network_removed(p)
|
|
||||||
LOG.debug("removing port %s from internal_ports cache", p)
|
|
||||||
self.internal_ports.remove(p)
|
|
||||||
enable_ra = enable_ra or self._port_has_ipv6_subnet(p)
|
|
||||||
for subnet in p['subnets']:
|
|
||||||
if ipv6_utils.is_ipv6_pd_enabled(subnet):
|
|
||||||
self.agent.pd.disable_subnet(self.router_id, subnet['id'])
|
|
||||||
del self.pd_subnets[subnet['id']]
|
|
||||||
|
|
||||||
updated_cidrs = []
|
updated_cidrs = []
|
||||||
for p in updated_ports:
|
for p in updated_ports:
|
||||||
self._update_internal_ports_cache(p)
|
self._update_internal_ports_cache(p)
|
||||||
|
|
Loading…
Reference in New Issue