Bug 896586

Summary: A floating ip can be attached to an instance without allocating that ip
Product: Red Hat OpenStack Reporter: Rami Vaknin <rvaknin>
Component: openstack-novaAssignee: Nikola Dipanov <ndipanov>
Status: CLOSED NOTABUG QA Contact: Yaniv Kaul <ykaul>
Severity: high Docs Contact:
Priority: medium    
Version: 2.0 (Folsom)CC: eglynn, jkt, ndipanov, oblaut, yeylon
Target Milestone: snapshot4Keywords: Triaged
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-26 16:21:20 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 Rami Vaknin 2013-01-17 15:08:29 UTC
Version:
Folsom on RHEL6.4
openstack-nova-2012.2.2-5.el6ost.noarch
openstack-nova-network-2012.2.2-5.el6ost.noarch

Scenario:
A floating ip from the floating ips pool (appears in "nova-manage floating list") can be attached to an instance without allocating that ip using "nova floating-ip-create ip_address".

Expected Results:
The ip attachment to the instance should fail.

Example:
[root@puma10 ~(keystone_admin)]$ nova list
+--------------------------------------+------+--------+-------------------------+
| ID                                   | Name | Status | Networks                |
+--------------------------------------+------+--------+-------------------------+
| 482400a0-6286-48ba-b344-c1fbd5b91c6c | rami | ACTIVE | novanetwork=192.168.7.2 |
+--------------------------------------+------+--------+-------------------------+
[root@puma10 ~(keystone_admin)]$ nova floating-ip-list
+-------------+-------------+----------+------+
| Ip          | Instance Id | Fixed Ip | Pool |
+-------------+-------------+----------+------+
| 192.168.8.1 | None        | None     | nova |
+-------------+-------------+----------+------+
[root@puma10 ~(keystone_admin)]$ nova add-floating-ip 482400a0-6286-48ba-b344-c1fbd5b91c6c 192.168.8.10
[root@puma10 ~(keystone_admin)]$ nova floating-ip-list
+-------------+-------------+----------+------+
| Ip          | Instance Id | Fixed Ip | Pool |
+-------------+-------------+----------+------+
| 192.168.8.1 | None        | None     | nova |
+-------------+-------------+----------+------+
[root@puma10 ~(keystone_admin)]$ nova list
+--------------------------------------+------+--------+---------------------------------------+
| ID                                   | Name | Status | Networks                              |
+--------------------------------------+------+--------+---------------------------------------+
| 482400a0-6286-48ba-b344-c1fbd5b91c6c | rami | ACTIVE | novanetwork=192.168.7.2, 192.168.8.10 |
+--------------------------------------+------+--------+---------------------------------------+
[root@puma10 ~(keystone_admin)]$

Comment 3 Russell Bryant 2013-02-12 17:15:11 UTC
My gut reaction after reading this is that it is intended behavior.  It's worth looking at a bit closer before closing this, though.

Comment 4 Russell Bryant 2013-02-26 16:21:20 UTC
After looking at this again, I still think that this is good behavior and that we should not consider this a bug.  Feel free to reopen if you disagree and would like to discuss further.  Thanks!