Bug 890978 - removing fixed-ip from an Instance doesn't release it from quantum
Summary: removing fixed-ip from an Instance doesn't release it from quantum
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 2.0 (Folsom)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: snapshot2
: 2.1
Assignee: Gary Kotton
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-31 14:50 UTC by Ofer Blaut
Modified: 2019-09-09 15:37 UTC (History)
4 users (show)

Fixed In Version: openstack-nova-2012.2.2-9.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-14 18:24:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1099378 0 None None None Never
OpenStack gerrit 19627 0 None None None Never
Red Hat Product Errata RHBA-2013:0260 0 normal SHIPPED_LIVE Red Hat OpenStack 2.0 (Folsom) Preview bug fix and enhancement update 2013-02-14 23:21:02 UTC

Description Ofer Blaut 2012-12-31 14:50:03 UTC
Description of problem:
removing fixed-ip from an Instance doesn't release it from quantum.

I have remove fixed ip from an instance using nova remove-fixed-ip < instance > < ip address >

operation worked but Quantum still  assign the ip to the same VM

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.lunch new VM 
2.nova remove-fixed-ip < instance > < ip address that is assigned >
3.quantum port-list ( see which port is using the ip address )
4.quantum port-show < port ID - that is used for ip address from step 2)
5.check that owner of the port is Nova-Comute and device ID is still used 
example attached   
  
Actual results:


Expected results:


Additional info:

Comment 2 Gary Kotton 2012-12-31 15:24:10 UTC
Hi,
Please note that this has not been implemented yet in Nova:

    def add_fixed_ip_to_instance(self, context, instance, network_id):
         """Add a fixed ip to the instance from specified network."""
         raise NotImplementedError()
     def remove_fixed_ip_from_instance(self, context, instance, address):
         """Remove a fixed ip from the instance."""
         raise NotImplementedError()

Thanks
Gary

Comment 3 Ofer Blaut 2013-01-03 20:53:09 UTC
When the command is used, and user use service network restart on the instance it self.

The instance will not get an ip address, until add-fixed-ip is used.

On that time quantum will report the ip address is used by the instance

Comment 4 Gary Kotton 2013-01-15 13:45:25 UTC
Patch posted upstream - https://review.openstack.org/#/c/19627/

Comment 8 Ofer Blaut 2013-02-06 11:42:20 UTC
Tested 


openstack-quantum-2012.2.1-6.el6ost.noarch




[root@intg-vdsb ~(keystone_admin)]$ nova list
+--------------------------------------+------------+--------+------------------------+
| ID                                   | Name       | Status | Networks               |
+--------------------------------------+------------+--------+------------------------+
| 1359df12-08f0-4b91-9971-d32ab373644f | VM-FED17-2 | ACTIVE | NET-SHARE-1=34.34.34.3 |
| 23c43998-5d55-44a3-a5a9-3d5aaffce2b9 | VM-FED17-2 | ACTIVE | NET-SHARE-1=34.34.34.2 |
| a3860d2b-e2ea-472f-be65-71d4dc903e49 | VM-FED17-2 | ACTIVE | NET-SHARE-1=34.34.34.4 |
| 90a9aaa2-a76d-45f1-a672-485c4a821b10 | VM1        | ACTIVE | NET-SHARE-1=34.34.34.6 |
+--------------------------------------+------------+--------+------------------------+
[root@intg-vdsb ~(keystone_admin)]$ nova help remove-fixed-ip 
usage: nova remove-fixed-ip <server> <address>

Remove an IP address from a server.

Positional arguments:
  <server>   Name or ID of server.
  <address>  IP Address.

[root@intg-vdsb ~(keystone_admin)]$ nova remove-fixed-ip  90a9aaa2-a76d-45f1-a672-485c4a821b10 34.34.34.6
[root@intg-vdsb ~(keystone_admin)]$ nova list
+--------------------------------------+------------+--------+------------------------+
| ID                                   | Name       | Status | Networks               |
+--------------------------------------+------------+--------+------------------------+
| 1359df12-08f0-4b91-9971-d32ab373644f | VM-FED17-2 | ACTIVE | NET-SHARE-1=34.34.34.3 |
| 23c43998-5d55-44a3-a5a9-3d5aaffce2b9 | VM-FED17-2 | ACTIVE | NET-SHARE-1=34.34.34.2 |
| a3860d2b-e2ea-472f-be65-71d4dc903e49 | VM-FED17-2 | ACTIVE | NET-SHARE-1=34.34.34.4 |
| 90a9aaa2-a76d-45f1-a672-485c4a821b10 | VM1        | ACTIVE |                        |
+--------------------------------------+------------+--------+------------------------+
[root@intg-vdsb ~(keystone_admin)]$ quantum port-list
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                         |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
| d236108a-fe21-49d3-804d-e5dc4303f1cc |      | fa:16:3e:be:8f:d4 |                                                                                   |
| 180a8f2e-d7f6-410b-81af-55c13652ac0f |      | fa:16:3e:1f:22:21 | {"subnet_id": "509b1333-d13d-4128-9ca2-4b5972ce2b53", "ip_address": "34.34.34.2"} |
| e67c9e37-7a47-47ed-bdf5-be8c770677ee |      | fa:16:3e:21:fa:69 | {"subnet_id": "8260f96f-195d-4046-8f31-1d1d38a67dde", "ip_address": "32.32.32.1"} |
|                                      |      |                   | {"subnet_id": "509b1333-d13d-4128-9ca2-4b5972ce2b53", "ip_address": "34.34.34.5"} |
| dc76b188-d14d-4eca-9413-282a90a2f77f |      | fa:16:3e:60:82:79 | {"subnet_id": "509b1333-d13d-4128-9ca2-4b5972ce2b53", "ip_address": "34.34.34.4"} |
| 50fc0e21-eeb9-4107-b6a3-0d0823e66fd2 |      | fa:16:3e:f1:9e:b1 | {"subnet_id": "509b1333-d13d-4128-9ca2-4b5972ce2b53", "ip_address": "34.34.34.3"} |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
[root@intg-vdsb ~(keystone_admin)]$ quantum port-show d236108a-fe21-49d3-804d-e5dc4303f1cc
+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| admin_state_up | True                                 |
| device_id      | 90a9aaa2-a76d-45f1-a672-485c4a821b10 |
| device_owner   | compute:nova                         |
| fixed_ips      |                                      |
| id             | d236108a-fe21-49d3-804d-e5dc4303f1cc |
| mac_address    | fa:16:3e:be:8f:d4                    |
| name           |                                      |
| network_id     | 1d67c186-6ba9-4613-89ab-04efb6f1bc3e |
| status         | ACTIVE                               |
| tenant_id      | f2ab70e6773146b69c5d9ce5f4d7e8b8     |
+----------------+--------------------------------------+

Comment 10 errata-xmlrpc 2013-02-14 18:24:28 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.

http://rhn.redhat.com/errata/RHBA-2013-0260.html


Note You need to log in before you can comment on or make changes to this bug.