NSX|V: fix distributed router interface deletion
Router interface deletion would not have the correct AZ. This would result in an exception with the DLR. Change-Id: Ic403692bf657a04a9bc60aa987f389b4dbbeafc5
This commit is contained in:
parent
01d33ffa65
commit
a7ba4590f5
|
@ -498,12 +498,12 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
|
|||
self.edge_manager.update_dhcp_edge_service(
|
||||
context, network_id, address_groups=address_groups)
|
||||
if dhcp_id:
|
||||
edge_id = self.plugin._get_edge_id_by_rtr_id(context,
|
||||
dhcp_id)
|
||||
edge_id, az_name = self.plugin._get_edge_id_and_az_by_rtr_id(
|
||||
context, dhcp_id)
|
||||
if edge_id:
|
||||
with locking.LockManager.get_lock(str(edge_id)):
|
||||
md_proxy_handler = (
|
||||
self.plugin.metadata_proxy_handler)
|
||||
self.plugin.get_metadata_proxy_handler(az_name))
|
||||
if md_proxy_handler:
|
||||
md_proxy_handler.configure_router_edge(
|
||||
context, dhcp_id)
|
||||
|
|
|
@ -2630,6 +2630,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||
|
||||
if binding:
|
||||
return binding['edge_id'], binding['availability_zone']
|
||||
return None, None
|
||||
|
||||
def _update_dhcp_service_new_edge(self, context, resource_id):
|
||||
edge_id, az_name = self._get_edge_id_and_az_by_rtr_id(
|
||||
|
|
Loading…
Reference in New Issue