Bug 1160350

Summary: Neutron refuses to delete instance associated with multiple floating addresses
Product: Red Hat OpenStack Reporter: Sadique Puthen <sputhenp>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED ERRATA QA Contact: Toni Freger <tfreger>
Severity: high Docs Contact:
Priority: high    
Version: 5.0 (RHEL 7)CC: ajeain, chrisw, ihrachys, lpeer, majopela, mlopes, myllynen, nyechiel, yeylon
Target Milestone: z3Keywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-2014.1.3-11.el6ost openstack-neutron-2014.1.3-10.el7ost Doc Type: Bug Fix
Doc Text:
Previously, deleting a port with multiple fixed IP addresses would result in an exception error. Consequently, it wasn't possible to delete an instance with multiple floating IP addresses. This fix updates 'disassociate_floatingips' to disassociate all floating IPs associated with the port, allowing the delete operation to proceed as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-02 17:00:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sadique Puthen 2014-11-04 15:27:45 UTC
Description of problem:

This is same as https://bugs.launchpad.net/neutron/+bug/1302701

Deleting a vm with multiple floating ips fails. In neutron server.log,

2014-11-04 09:44:23.315 81731 ERROR neutron.api.v2.resource [req-fed9ecf6-e624-443d-bf3a-5d8ad9693954 None] delete failed
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource Traceback (most recent call last):
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 87, in resource
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource     result = method(request=request, **args)
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 449, in delete
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource     obj_deleter(request.context, id, **kwargs)
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/plugin.py", line 740, in delete_port
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource     context, id, do_notify=False)
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/site-packages/neutron/db/l3_db.py", line 766, in disassociate_floatingips
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource     % port_id)
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource Exception: Multiple floating IPs found for port dc7dcc28-24b9-4a77-a215-07f26e9aa3b4
2014-11-04 09:44:23.315 81731 TRACE neutron.api.v2.resource

This bug is to backport this patch to RHEL-OSP5.

How reproducible:

Always,

Steps to Reproduce:

Create an instance:

  nova boot ... --nic net-id=3ff9b903-e921-4752-a26f-cba8f1433992 --key-name lars test0

Add a second fixed ip address:

  nova add-fixed-ip test0 3ff9b903-e921-4752-a26f-cba8f1433992
  nova show test0 | grep network
  | net0 network | 10.0.0.4, 10.0.0.5 |

Associate a floating ip address with each fixed address:

  $ nova add-floating-ip --fixed-address 10.0.0.5 test0 192.168.200.7
  $ nova add-floating-ip --fixed-address 10.0.0.4 test0 192.168.200.6

Now attempt to delete the instance:

  $ nova delete test0
  $ nova list | grep test0
  | c36e277f-e354-4856-8f5b-9603e6c76b2e | test0 | ERROR ...

Neutron server fails with above error:

  Disassociating one of the floating ips allows the delete to complete successfully:

  nova floating-ip-disassociate test0 192.168.200.6
  nova delete test0

Comment 3 Ihar Hrachyshka 2014-11-13 16:13:55 UTC
The fix was not actually included.

Comment 4 Toni Freger 2014-11-16 13:53:26 UTC
The deletion of instance with two fixed IPs that associated to two Floating IPs works as expected.

Tested on RHel7 
AIO+ compute node
openstack-neutron-2014.1.3-10.el7ost.noarch

Comment 8 errata-xmlrpc 2014-12-02 17:00:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2014-1942.html