nova/nova/cmd
Matt Riedemann 8c76902212 Check mac for instance before disassociate in release_fixed_ip
This is a follow on to change I8cf5483982085da57ee470fa2753b0d0aebc12b3.

In the case of a race to deallocate an instance which was previously
associated with a fixed IP that is now currently associated with a new
instance (with different VIFs and therefore different MAC addresses), we
check the mac address in release_fixed_ip to see if it's on the VIF that
is related to the instance that is associated to the fixed IP being
released.

If the currently associated instance on the fixed IP does not match the
instance associated with the old VIF (from the mac address passed in),
ignore the release request so we don't diassociate the fixed IP from the
new instance that is allocating network with that fixed IP.

Also fixes the method so that it doesn't attempt to update the fixed IP
in the database if it's not leased.

There were no existing unit tests for released_fixed_ip so a whole set
of new tests is added to cover the various conditions in the method.

Co-Authored-By: Dan Smith <dms@danplanet.com>

Closes-Bug: #1249065

Change-Id: I84fa2f0926f719bff33ac43b39e161a4eb412f44
2015-06-24 06:33:36 -07:00
..
__init__.py move eventlet GREENDNS override to top level 2014-12-08 17:41:03 -05:00
all.py Use oslo.log 2015-02-22 07:56:40 -05:00
api.py Use oslo.log 2015-02-22 07:56:40 -05:00
api_ec2.py Use oslo.log 2015-02-22 07:56:40 -05:00
api_metadata.py Use oslo.log 2015-02-22 07:56:40 -05:00
api_os_compute.py Use oslo.log 2015-02-22 07:56:40 -05:00
baseproxy.py Merge "Allow configuring proxy_host and proxy_port in nova.conf" 2015-03-03 22:28:46 +00:00
cells.py Use oslo.log 2015-02-22 07:56:40 -05:00
cert.py Convert service and servicegroup to objects 2015-04-13 19:05:55 +02:00
compute.py Use oslo.log 2015-02-22 07:56:40 -05:00
conductor.py Use oslo.log 2015-02-22 07:56:40 -05:00
console.py Convert service and servicegroup to objects 2015-04-13 19:05:55 +02:00
consoleauth.py Use oslo.log 2015-02-22 07:56:40 -05:00
dhcpbridge.py Check mac for instance before disassociate in release_fixed_ip 2015-06-24 06:33:36 -07:00
idmapshift.py Adds nova-idmapshift cli utility 2014-08-29 14:52:22 -04:00
manage.py Add flag to force experimental run of db contract 2015-06-22 08:30:37 -04:00
network.py Use oslo.log 2015-02-22 07:56:40 -05:00
novnc.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
novncproxy.py Allow configuring proxy_host and proxy_port in nova.conf 2015-02-23 15:07:11 +00:00
objectstore.py Use oslo.log 2015-02-22 07:56:40 -05:00
scheduler.py Use oslo.log 2015-02-22 07:56:40 -05:00
serialproxy.py Allow configuring proxy_host and proxy_port in nova.conf 2015-02-23 15:07:11 +00:00
spicehtml5proxy.py Allow configuring proxy_host and proxy_port in nova.conf 2015-02-23 15:07:11 +00:00
xvpvncproxy.py Use oslo.log 2015-02-22 07:56:40 -05:00