Fix race condition updating routes
Generic driver updates routes on host according to the tap interfaces created for use by share servers. That code should be within a lock to prevent a thread failing to delete a route previously listed and already deleted by another thread. This change moves an existing lock to the function that performs route changes while also covering the function that had the lock before. Closes-bug: #1617461 Change-Id: I798e5d9b0bc9ebefc8661d0ade720c60303cf484
This commit is contained in:
parent
7a16eb685b
commit
3e96712c47
@ -948,6 +948,8 @@ class NeutronNetworkHelper(BaseNetworkhelper):
|
||||
device.route.clear_outdated_routes(subnet['cidr'])
|
||||
self._plug_interface_in_host(interface_name, device, port)
|
||||
|
||||
@utils.synchronized("service_instance_plug_interface_in_host",
|
||||
external=True)
|
||||
def _plug_interface_in_host(self, interface_name, device, port):
|
||||
|
||||
self.vif_driver.plug(interface_name, port['id'], port['mac_address'])
|
||||
@ -966,8 +968,6 @@ class NeutronNetworkHelper(BaseNetworkhelper):
|
||||
# here we are checking for garbage devices from removed service port
|
||||
self._remove_outdated_interfaces(device)
|
||||
|
||||
@utils.synchronized(
|
||||
"service_instance_remove_outdated_interfaces", external=True)
|
||||
def _remove_outdated_interfaces(self, device):
|
||||
"""Finds and removes unused network device."""
|
||||
device_cidr_set = self._get_set_of_device_cidrs(device)
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixed race-condition in generic driver while updating
|
||||
network routes in host.
|
Loading…
Reference in New Issue
Block a user