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.
Reviewed: https:/ /review. openstack. org/25085 github. com/openstack/ quantum/ commit/ 4c53186e5a5349c aa0fd3c5f21c1dd 8c98debec2
Committed: http://
Submitter: Jenkins
Branch: milestone-proposed
commit 4c53186e5a5349c aa0fd3c5f21c1dd 8c98debec2
Author: Aaron Rosen <email address hidden>
Date: Wed Mar 20 18:19:04 2013 -0700
Fix race condition in dhcp agent
This patch fixes a race condition that can happen in the dhcp agent when dhcp_helper( ) where self.enable_ dhcp_helper( ) gets called twice put(network) . This same race synchronized( ) is
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_
since the first call had not completed self.cache.
condition can also occur in the other events so lockutils.
added to synchronize those code segments as well.
Fixes bug 1155748
Change-Id: I2ff52adc3dfebd dd6d9c15d5dc79a a65be107179