addFloatingIp with empty IP address should raise a 404 not a 200

Bug #1190242 reported by Jordan Pittier
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Unassigned

Bug Description

With Quantum the following request is valid and returns a 202 Accepted : POST http://10.1.59.157:8774/v2/$PROJECT_ID/servers/$server_id/action -d '{"addFloatingIp": {"address": ""}}'

Notice the empty IP Address. Quantum here associates the first free floating IP address in the pool.

But with Nova Network, the exact same request returns a 404 Not Found, as the empty IP address is not found in the pool.

There's a mismatch in the 2 API which causes the Tempest test tempest.api.compute.floating_ips.test_floating_ips_actions:FloatingIPsTestJSON.test_associate_ip_to_server_without_passing_floating_ip to fail.

I am working on a patch for Quantum that will return a 404 if the floating IP address is empty.

Jordan

Tags: api nova
Revision history for this message
Jordan Pittier (jordan-pittier) wrote :

This bug makes the Tempest test tempest.api.compute.floating_ips.test_floating_ips_actions:FloatingIPsTestJSON.test_associate_ip_to_server_without_passing_floating_ip fail

Changed in quantum:
assignee: nobody → Jordan Pittier (jordan-pittier)
tags: added: nova
tags: added: api
Changed in neutron:
assignee: Jordan Pittier (jordan-pittier) → nobody
Changed in neutron:
assignee: nobody → Justin Hammond (justin-hammond)
Revision history for this message
Justin Hammond (justin-hammond) wrote :

$ curl -i http://172.16.207.227:8774/v2/486ef08727e5408db372bab7bcc3c8ce/servers/c548092c-da73-43ad-bd03-9d06abd81412/action -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: <token>" -d '{"addFloatingIp": {"address": ""}}'
HTTP/1.1 404 Not Found
Content-Length: 67
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-996f9ef4-cc9c-4d96-a05f-bec3b2f45b30
Date: Tue, 10 Sep 2013 20:16:18 GMT

{"itemNotFound": {"message": "floating ip not found", "code": 404}}jhammond at ubuntu in /opt/stack/neutron on master*

I do not appear to have the same issue. Jordan, care to check if this bug is still valid?

Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :
Changed in neutron:
status: New → Fix Committed
tags: added: grizzly-backport-potential
Revision history for this message
Justin Hammond (justin-hammond) wrote :

Thank you mapleoin! Good catch.

Changed in neutron:
milestone: none → havana-rc1
Changed in neutron:
assignee: Justin Hammond (justin-hammond) → nobody
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc1 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
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.