NSXv: Configure metadata when detaching from VDR
When a network is detached from VDR and attached to a new DHCP Edge, metadata LB should be configured on that Edge. Change-Id: I74e11526b74c0699d91ea0ba9e34db5b63ab0a16
This commit is contained in:
parent
eb8d2c313a
commit
fc45beeb03
@ -458,7 +458,7 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
|
||||
router_id)
|
||||
|
||||
# Reattach to regular DHCP Edge
|
||||
self.edge_manager.create_dhcp_edge_service(
|
||||
dhcp_id = self.edge_manager.create_dhcp_edge_service(
|
||||
context, network_id, subnet)
|
||||
|
||||
address_groups = (
|
||||
@ -466,6 +466,15 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
|
||||
network_id))
|
||||
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)
|
||||
if edge_id:
|
||||
with locking.LockManager.get_lock(str(edge_id)):
|
||||
md_proxy_handler = (
|
||||
self.plugin.metadata_proxy_handler)
|
||||
if md_proxy_handler:
|
||||
md_proxy_handler.configure_router_edge(dhcp_id)
|
||||
|
||||
return info
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user