]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix dhcp_release lease race condition
authorAaron Rosen <arosen@nicira.com>
Tue, 8 Oct 2013 19:24:21 +0000 (12:24 -0700)
committerAaron Rosen <arosen@nicira.com>
Tue, 8 Oct 2013 19:41:07 +0000 (12:41 -0700)
commit39b4c89353a0f7b942a2b3c849c43410a5d203ec
tree5cb56503eb82ec138dec22432c4b79f52b05749f
parentc7db907ba614d33ddad60122e72b24fbf2ba379e
Fix dhcp_release lease race condition

There is a possible race condition when delete or updating fixed_ips
on ports where an instance could renew its ip address again after
dhcp_release has already been executed. To fix this, the order of
reload_allocation and release_lease need to be switched. This way an
instance will not be able to renew it's ip address after it is
removed from the host file.

Fixes bug: 1237028

Change-Id: If05ec2be507378c634f5c1856dab0fbd396f43cc
neutron/agent/dhcp_agent.py
neutron/tests/unit/test_dhcp_agent.py