Associate an already associated Floating IP to server is returning 500 error code

Bug #1000571 reported by Rajalakshmi Ganesan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned

Bug Description

Association of a floating IP to server where floating IP is already associated to another server is returning 500 error code

Steps to reproduce:

1. Create two instances 'a' and 'b' (wait till they are ACTIVE)
2. Create a floating IP
3. Associate floating IP to instance 'a'
4. Associate the same floating IP to instance 'b'

Expected result:
The error message should state that "This acction is not allowed as floating IP is already associted to 'a'." and should return 400 as it is a BadRequest.

Actual Result:
ERROR: Associate floating ip failed (HTTP 500)

LOG:

[muralik@openstack27 ~/tempest_16may/tempest/tempest/tests]$nova list
+--------------------------------------+--------+--------+--------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+--------+--------+--------------------------------+
| 9cc6e27b-9cc8-4b9d-b116-5470773cc286 | test-2 | ACTIVE | private=10.0.0.4 |
| ff0b8b93-6377-485b-9c42-59d8e7d1cfec | test-1 | ACTIVE | private=10.0.0.2, 172.24.4.225 |
+--------------------------------------+--------+--------+--------------------------------+
[muralik@openstack27 ~/tempest_16may/tempest/tempest/tests]$nova add-floating-ip 9cc6e27b-9cc8-4b9d-b116-5470773cc286 172.24.4.225

REQ: curl -i http://10.233.52.27:8774/v2/732001bbd21942f1bec893c67c850066/servers/9cc6e27b-9cc8-4b9d-b116-5470773cc286/action -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 68b79689a0234e009df67e281af4c266"

REQ BODY: {"addFloatingIp": {"address": "172.24.4.225"}}

RESP:{'date': 'Thu, 17 May 2012 11:13:13 GMT', 'status': '500', 'content-length': '74', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-2d9d9f2c-8304-48dc-bc17-626925ac1003'} {"computeFault": {"message": "Associate floating ip failed", "code": 500}}

ERROR: Associate floating ip failed (HTTP 500)

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Dan Smith (danms) wrote :

This looks to be fixed in nova at this point. When I try to reproduce, I get:

dan@devstack:~/devstack$ nova add-floating-ip efec3700-95ce-4cd9-933e-2d1ab3f61879 172.24.4.225
ERROR: floating ip is already associated (HTTP 400) (Request-ID: req-6bbb14d0-b7d9-48dc-8b81-eaa900025108)

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-2 → 2012.2
Revision history for this message
David Kranz (david-kranz) wrote :

I'm a little confused about this. It seems that the current behavior is that no error is returned but that the floating ip is moved from the old to new server, and that there is a tempest test for exactly that. Any one know what the story is?

Revision history for this message
Rajalakshmi Ganesan (rajalakshmi-ganesan) wrote :

Hi Kranz,

Earlier the tempest test was written expecting "Bad Request when Association of an already associated Floating IP to server " happens. Please go through Bug #1029911 for more clarity on this.

Revision history for this message
Rajalakshmi Ganesan (rajalakshmi-ganesan) wrote :

Following are the stages that this scenario came across.

1. It Returned 500 error code.
2. Returned 400 code.
3. Finally concluded that the it should return 202 and association to next server should happen without exception.(Bug #1029911)

Hence now the tempest test is such that " no error is returned but that the floating ip is moved from the old to new server"

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.