Should not allow assign floating IPs that are already assigned to another port

Bug #1659215 reported by Zhenyu Zheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Zhenyu Zheng
neutron
Invalid
Undecided
zhaobo

Bug Description

While associate floating ip to instance, we did not check the floating IP is already assigned to
another port or not:
http://git.openstack.org/cgit/openstack/nova/tree/nova/network/neutronv2/api.py#n1684
It is understandable to allow re-assign to the same port, but we should not re-assgin
if it is already assigned to other ports.

Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
zhaobo (zhaobo6)
Changed in neutron:
assignee: nobody → zhaobo (zhaobo6)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
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/425563

Changed in neutron:
status: New → In Progress
Revision history for this message
Miguel Lavalle (minsel) wrote :

This is not a bug, this is the expected behavior of the floating ip API in Neutron. Please look at this Tempest test case failure that was triggered by the proposed fix (https://review.openstack.org/#/c/425563/):

http://logs.openstack.org/63/425563/1/check/gate-tempest-dsvm-neutron-linuxbridge-ubuntu-xenial/4601f1d/console.html#_2017-01-26_08_51_05_811634

The source of this test is the following:

https://github.com/openstack/tempest/blob/master/tempest/api/network/test_floating_ips.py#L65

We are clearly saying in this test case's code that we allow to change a floating ip association without disassociating if before

Changed in neutron:
status: In Progress → Invalid
Revision history for this message
Miguel Lavalle (minsel) wrote :
Changed in nova:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by ZhaoBo (<email address hidden>) on branch: master
Review: https://review.openstack.org/425563

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Zhenyu Zheng (<email address hidden>) on branch: master
Review: https://review.openstack.org/425077

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.