Exception while associating a floating ip

Bug #1038962 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
dan wendlandt

Bug Description

[Originally reported from garyk]

The l3 plugin is unable to create and associate a floating IP in the same step. Doing it in two separate steps does not cause any exception.

The following command causes the exception:
FIP2_ID=`quantum floatingip-create $PUB_NET_ID --port_id $VM2_PORT_ID | grep ' id' | awk '{ print $4 }'`

The following two command work:
FIP2_ID=`quantum floatingip-create $PUB_NET_ID | grep ' id' | awk '{ print $4 }'`
quantum floatingip-associate $FIP2_ID $VM2_PORT_ID

Traceback available at http://paste.openstack.org/show/20375/

Revision history for this message
dan wendlandt (danwent) wrote :

yes, I just started seeing this recently with my test scrip... I will look into it (seems like this identifies a gap I thought I had covered in my unit tests).

Changed in quantum:
importance: Medium → High
assignee: Salvatore Orlando (salvatore-orlando) → dan wendlandt (danwent)
status: Confirmed → In Progress
Revision history for this message
dan wendlandt (danwent) wrote :

Looks like this was the result of a miscommunication when Salvatore pitched in to help my patch across the finish line. I'm posting a review.

Revision history for this message
dan wendlandt (danwent) wrote :

also, this case is already covered fairly well with unit tests. An odd quirk of the bug actually let it still pass on simple testing scenarios (particularly when there were a small number of 'internal subnets', and the setup happened in a particular order).

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

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

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Yep, I told GaryK on IRC that I introduced this bug while fixing the other bug he spotted on floating IP creation.

Revision history for this message
dan wendlandt (danwent) wrote :

ok, could you do me a favor and check that my review doesn't undo the fix you were adding?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/11695
Committed: http://github.com/openstack/quantum/commit/4cb85bf3fdb5f86f909bc81a538453724d64a733
Submitter: Jenkins
Branch: master

commit 4cb85bf3fdb5f86f909bc81a538453724d64a733
Author: Dan Wendlandt <email address hidden>
Date: Mon Aug 20 22:42:23 2012 -0700

    fix associating a floating IP during floating IP creation.

    bug 1038962

    also add check to make sure that floating IP's are only associated if
    the upstream router has a external network gateway to the appropriate
    external network.

    Change-Id: Ie4cb632296ce4a1cb989242eb894d73a7488cdb3

Changed in quantum:
status: In Progress → Fix Committed
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

I checked and approved.
The check for validating at least an IP was available for setting floating_ip_address was not touched by your patch, and that was what solved the issue first found by gary

Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-rc1 → 2012.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.