Nicira plugin: dissasociate floating IP does not dissassociate router

Bug #1223902 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Salvatore Orlando

Bug Description

As a consequence, it is not possible to clear the gateway for the router where the floating IP was attached, as shown below.

A workaround would be to associate the floating IP to a different 'blackhole' router, but, because of the same bug, this would cause IPs to not be handled correctly on NVP lrouters, thus resulting on the same IP being configured on multiple lrouters.

nicira@Ubuntu1204Server:~/devstack$ neutron router-list
\+--------------------------------------+---------+-----------------------------------------------------------------------------+
| id | name | external_gateway_info |
+--------------------------------------+---------+-----------------------------------------------------------------------------+
| 5021f6ad-a600-4d60-94a5-f5860e84d20a | router2 | {"network_id": "cf66d525-6292-453e-b1ed-f84c30957549", "enable_snat": true} |
| bbbd289b-eb3b-477f-ba8c-435700f88147 | router1 | {"network_id": "cf66d525-6292-453e-b1ed-f84c30957549", "enable_snat": true} |
+--------------------------------------+---------+-----------------------------------------------------------------------------+
nicira@Ubuntu1204Server:~/devstack$ neutron floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 9ce0ab4c-298a-44bf-ad82-23fbfda596d5 | 10.0.10.3 | 172.24.4.227 | 4cfba62a-0841-4fbd-960d-7a6129d16b28 |
+--------------------------------------+------------------+---------------------+--------------------------------------+
nicira@Ubuntu1204Server:~/devstack$ neutron floatingip-show 9ce0ab4c-298a-44bf-ad82-23fbfda596d5
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| fixed_ip_address | 10.0.10.3 |
| floating_ip_address | 172.24.4.227 |
| floating_network_id | cf66d525-6292-453e-b1ed-f84c30957549 |
| id | 9ce0ab4c-298a-44bf-ad82-23fbfda596d5 |
| port_id | 4cfba62a-0841-4fbd-960d-7a6129d16b28 |
| router_id | bbbd289b-eb3b-477f-ba8c-435700f88147 |
| tenant_id | 8731a739d73e4c41a0315d532bf322f0 |
+---------------------+--------------------------------------+
nicira@Ubuntu1204Server:~/devstack$ neutron floatingip-disassociate 9ce0ab4c-298a-44bf-ad82-23fbfda596d5
Disassociated floatingip 9ce0ab4c-298a-44bf-ad82-23fbfda596d5
nicira@Ubuntu1204Server:~/devstack$ neutron floatingip-show 9ce0ab4c-298a-44bf-ad82-23fbfda596d5
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| fixed_ip_address | |
| floating_ip_address | 172.24.4.227 |
| floating_network_id | cf66d525-6292-453e-b1ed-f84c30957549 |
| id | 9ce0ab4c-298a-44bf-ad82-23fbfda596d5 |
| port_id | |
| router_id | bbbd289b-eb3b-477f-ba8c-435700f88147 |
| tenant_id | 8731a739d73e4c41a0315d532bf322f0 |
+---------------------+--------------------------------------+
nicira@Ubuntu1204Server:~/devstack$ neutron router-gateway-clear router1
Gateway cannot be updated for router bbbd289b-eb3b-477f-ba8c-435700f88147, since a gateway to external network cf66d525-6292-453e-b1ed-f84c30957549 is required by one or more floating IPs.

Tags: nicira
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

Reviewed: https://review.openstack.org/46078
Committed: http://github.com/openstack/neutron/commit/e68617c141c8a16a26bc4ade641aa4a5a809619d
Submitter: Jenkins
Branch: master

commit e68617c141c8a16a26bc4ade641aa4a5a809619d
Author: Salvatore Orlando <email address hidden>
Date: Wed Sep 11 07:19:28 2013 -0700

    Fix handling of floating IP association info in Nicira plugin

    Bug 1223902

    This patch fixes the _update_fix_assoc routine in the Nicira plugin,
    ensuring the association of a floating IP with a router is removed
    when the floating IP is disassociated.
    This patch also adds a unit test for validating behaviour when a floating
    IP is associated to a port on a different router, which was an
    uncovered use case. This new unit test required some refactoring in
    test_l3_plugin.py.

    Change-Id: Ibfd53a637f4d14a368b0aeff289c15f993df58dd

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc1 → 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.