Unable to create/allocate specific floating ip

Bug #1138730 reported by Christoph Thiel
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
neutron
Expired
Wishlist
Unassigned

Bug Description

http://docs.openstack.org/api/openstack-network/2.0/content/floatingip_create.html mentions:

An address for the floating ip will be automatically allocated, unless the floating_ip_address attribute is specified in the request body. If the requested floating IP address does not fall in the external network's subnet range, a 400 error will be returned. If the requested floating IP address is already in use, a 409 error code will be returned.

This is also described in https://wiki.openstack.org/wiki/Quantum/APIv2-specification

However, the quantum code reads differently :( I'll propose a fix to quantum and quantumclient shortly.

Tags: l3-ipam-dhcp
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/23327

Changed in quantum:
assignee: nobody → Christoph Thiel (cthiel-suse)
status: New → In Progress
tags: added: l3-ipam-dhcp
Changed in quantum:
importance: Undecided → Wishlist
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/70286

Changed in neutron:
assignee: Christoph Thiel (cthiel-suse) → fujioka yuuichi (fujioka-yuuichi-d)
Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

Patch https://review.openstack.org/70286 has been merged, and I have pulled it into a Juno installation. But it does not work. I get the following in Neutron's server.log:

2015-01-21 10:04:39.265 16040 ERROR neutron.api.v2.resource [req-4b09ceb9-86f1-42d4-b1f9-117ae6ed9026 None] create failed
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource Traceback (most recent call last):
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/resource.py", line 87, in resource
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource result = method(request=request, **args)
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 379, in create
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource allow_bulk=self._allow_bulk)
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource File "/usr/lib/python2.6/site-packages/neutron/api/v2/base.py", line 618, in prepare_request_body
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource raise webob.exc.HTTPBadRequest(msg)
2015-01-21 10:04:39.265 16040 TRACE neutron.api.v2.resource HTTPBadRequest: Attribute 'floating_ip_address' not allowed in POST

The request was from user=admin tenant=admin.

Also, I am surprised at the following part of the patch:

786 + if fip.get('floating_ip_address'):
787 + port['fixed_ips'] = [
788 + {'ip_address': fip['floating_ip_address']}]

Is there a confusion there between floating and fixed?

Are there any tempest tests of this functionality?

Revision history for this message
fujioka yuuichi (fujioka-yuuichi-d) wrote :

did you modify "neutron/db/l3_db.py" only? "neutron/extensions/l3.py" should be fixed as the same as https://review.openstack.org/#/c/70286/22/.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

Yes, I applied the whole patch. I looked in neutron/db/l3_db.py and saw that it has the revised code in it.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

I must have goofed up my testing somehow. Now it is working for me.

Revision history for this message
fujioka yuuichi (fujioka-yuuichi-d) wrote :

"create_floatingip:floating_ip_address": "rule:admin_only" is included in "/etc/neutron/policy.json" ?
https://review.openstack.org/#/c/70286/22/etc/policy.json

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 172 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: fujioka yuuichi (fujioka-yuuichi-d) → nobody
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.