NSX|V: ensure that FW rule updates on edge are locked
If this opertaion happens concurrently then therecould be a exception on the edge. Change-Id: I33542ee956b35b3616748b8d44017eb74d439bfa
This commit is contained in:
parent
ca33b1bfcf
commit
03d62f94e3
@ -104,7 +104,10 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
|
||||
router_db = self.plugin._get_router(context, router_id)
|
||||
nexthop = self.plugin._get_external_attachment_info(
|
||||
context, router_db)[2]
|
||||
self.plugin._update_subnets_and_dnat_firewall(context, router_db)
|
||||
with locking.LockManager.get_lock(self._get_edge_id(context,
|
||||
router_id)):
|
||||
self.plugin._update_subnets_and_dnat_firewall(context,
|
||||
router_db)
|
||||
md_gw_data = self._get_metadata_gw_data(context, router_id)
|
||||
self._update_routes(context, router_id, nexthop, md_gw_data)
|
||||
if 'admin_state_up' in r:
|
||||
|
@ -60,7 +60,10 @@ class RouterExclusiveDriver(router_driver.RouterBaseDriver):
|
||||
router_db = self.plugin._get_router(context, router_id)
|
||||
nexthop = self.plugin._get_external_attachment_info(
|
||||
context, router_db)[2]
|
||||
self.plugin._update_subnets_and_dnat_firewall(context, router_db)
|
||||
with locking.LockManager.get_lock(
|
||||
self._get_router_edge_id(context, router_id)):
|
||||
self.plugin._update_subnets_and_dnat_firewall(context,
|
||||
router_db)
|
||||
self.update_routes(context, router_id, nexthop)
|
||||
if 'admin_state_up' in r:
|
||||
self.plugin._update_router_admin_state(
|
||||
|
@ -1385,6 +1385,7 @@ class EdgeManager(object):
|
||||
|
||||
self.plugin.metadata_proxy_handler.configure_router_edge(
|
||||
context, resource_id)
|
||||
with locking.LockManager.get_lock(str(dhcp_edge_id)):
|
||||
self.plugin.setup_dhcp_edge_fw_rules(
|
||||
context, self.plugin, resource_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user