]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix race condition in dhcp agent
authorAaron Rosen <arosen@nicira.com>
Thu, 21 Mar 2013 01:19:04 +0000 (18:19 -0700)
committerAaron Rosen <arosen@nicira.com>
Thu, 21 Mar 2013 21:39:04 +0000 (14:39 -0700)
commit885cc41ff033a24191e93d40cd39d858e108f1d8
tree43d8920dcfc3ac366a71dc70a47c9e076e8febde
parentc6bf10d86c2b2d8f66fc07183b9300fb99a89ba5
Fix race condition in dhcp agent

This patch fixes a race condition that can happen in the dhcp agent when
a subnet is created and then a host route is then immediately added to that
subnet following a subnet.update.end notification. The race condition occurs
in refresh_dhcp_helper() where self.enable_dhcp_helper() gets called twice
since the first call had not completed self.cache.put(network). This same race
condition can also occur in the other events so lockutils.synchronized() is
added to synchronize those code segments as well.

Fixes bug 1155748

Change-Id: I2ff52adc3dfebddd6d9c15d5dc79aa65be107179
quantum/agent/dhcp_agent.py