Merge "Fix race condition updating routes"

This commit is contained in:
Jenkins 2016-09-08 19:51:42 +00:00 committed by Gerrit Code Review
commit fce9f673a0
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -0,0 +1,4 @@
---
fixes:
- Fixed race-condition in generic driver while updating
network routes in host.