]> 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>
Thu, 10 Oct 2013 18:10:45 +0000 (11:10 -0700)
commitba99783a80ee0f92135dcfd562f3cfc9dad46d86
tree77bfa948e706c9a89f4b91e48fe84cb647707cd9
parent18645314ea8687835436c52f937ede2b4ae9cbca
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