Nova doesn't refresh network cache when transferring a floating IP address

Bug #1173227 reported by Phil Day
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Phil Day

Bug Description

When Nova associates of disassociates a floating IP address the network info cache is always refreshed (In both Nova net and Quantum) due to the @refresh_cache decorator

However if you (re)associate a floating IP which is already associated with another instance on a Quantum based system then the address is correcly disassociated first, but the refresh is not trigged for that instance. As a result Nova will show the same address for two instances until the periodic clean-up kicks in some minutes later.

Watch what happens with 15.184.41.5 in the following:

$nova list
+--------------------------------------+------------+--------+----------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+----------------------------------+
| 52e0533a-0399-4828-b9d7-f223c7e44aca | phil-natty | ACTIVE | philnet1=12.0.0.4, 15.184.41.5 |
| 8184e9a7-3f56-46bc-8a3a-4fba68f7ce78 | phil2 | ACTIVE | philnet1=12.0.0.3, 15.184.40.176 |
| 7ab2dff2-6a71-497a-b097-627833ebe680 | phil44 | ACTIVE | philnet1=12.0.0.5 |
+--------------------------------------+------------+--------+----------------------------------+

$quantum floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 29d844c4-78f8-45fd-ae28-d518ea6d41ef | 12.0.0.4 | 15.184.41.5 | 4770c516-6b07-44c2-a07b-eb13a873f80e |
| 9f0f7dfe-4e2f-4a60-8cfd-c7b8c7a10ea9 | 12.0.0.3 | 15.184.40.176 | 58cc4d39-7c20-4a36-bf5f-267a193f6f44 |
+--------------------------------------+------------------+---------------------+--------------------------------------+

$nova add-floating-ip 7ab2dff2-6a71-497a-b097-627833ebe680 15.184.41.5

$quantum floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 29d844c4-78f8-45fd-ae28-d518ea6d41ef | 12.0.0.5 | 15.184.41.5 | 3470b721-def6-48a9-8b19-16bd564dd795 |
| 9f0f7dfe-4e2f-4a60-8cfd-c7b8c7a10ea9 | 12.0.0.3 | 15.184.40.176 | 58cc4d39-7c20-4a36-bf5f-267a193f6f44 |
+--------------------------------------+------------------+---------------------+--------------------------------------+

$nova list
+--------------------------------------+------------+--------+----------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------+--------+----------------------------------+
| 52e0533a-0399-4828-b9d7-f223c7e44aca | phil-natty | ACTIVE | philnet1=12.0.0.4, 15.184.41.5 |
| 8184e9a7-3f56-46bc-8a3a-4fba68f7ce78 | phil2 | ACTIVE | philnet1=12.0.0.3, 15.184.40.176 |
| 7ab2dff2-6a71-497a-b097-627833ebe680 | phil44 | ACTIVE | philnet1=12.0.0.5, 15.184.41.5 |
+--------------------------------------+------------+--------+----------------------------------+

Nova Networking has specific handling for this case in its associate_floating_ip() method, which relies on the floating_manager returning the instance uuid of the original instance. It doesn't look like the quantum client does this, so the quantumv2/api code will probably need to work this out for itself.

Michael Still (mikal)
Changed in nova:
status: New → Confirmed
importance: Undecided → High
Phil Day (philip-day)
Changed in nova:
assignee: nobody → Phil Day (philip-day)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/33054

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/33054
Committed: http://github.com/openstack/nova/commit/49fdad5b6d1e0878438571c2e9c0421bc522cb2e
Submitter: Jenkins
Branch: master

commit 49fdad5b6d1e0878438571c2e9c0421bc522cb2e
Author: Phil Day <email address hidden>
Date: Fri Jun 14 14:26:51 2013 +0100

    Refresh network cache when reassigning a floating IP in Neutron

    When Nova associates or disassociates a floating IP address
    the network info cache is always refreshed due to the
    @refresh_cache decorator

    However if you (re)associate a floating IP which is already
    associated with another instance on a Neutron based system then
    the address is correcly disassociated first, but the cache refresh
    is not trigged for the original instance. As a result Nova will
    show the same address for two instances until the periodic
    clean-up kicks in some minutes later.

    Fixed bug: 1173227

    Change-Id: Iea81532911478026b9b2c0578a1eda7a97b09d80

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.