Bug 1008165

Summary: The floating IP's port ID reported in "floatingip-list" and "floatingip-show" outputs is wrong
Product: Red Hat OpenStack Reporter: Rami Vaknin <rvaknin>
Component: openstack-neutronAssignee: Jakub Libosvar <jlibosva>
Status: CLOSED NOTABUG QA Contact: Ofer Blaut <oblaut>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0CC: chrisw, hateya, lpeer, oblaut, yeylon
Target Milestone: ---   
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-14 16:23:16 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:

Description Rami Vaknin 2013-09-15 11:45:25 UTC
Version:
Grizzly on rhel6.4
openstack-quantum-2013.1.3-1.el6ost + ovs
puddle 2013-09-06.2


Description:
The port_id value as appears in the output of "quantum floatingip-list" and "quantum floatingip-show" is wrong, this is actually the fixed ip port_id of the instance that assigned with the floating ip.

# quantum port-list | grep 10.35.170.103
| a1eb3994-0538-4ab1-8ff7-a3c6a92b1598 |      | fa:16:3e:b6:95:f2 | {"subnet_id": "a1063c61-6f68-451e-98bc-d340ce2294a9", "ip_address": "10.35.170.103"} |     


# quantum floatingip-list 
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id                                   | fixed_ip_address | floating_ip_address | port_id                              |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 355f3a07-4d56-41a3-a990-192ae92fb4f3 | 10.35.211.4      | 10.35.170.104       | 158e7769-236c-4346-b7fa-db5e2ae0ac9d |
| 47caeb08-aadc-48ef-965d-aef261c940c8 | 10.35.214.4      | 10.35.170.110       | 45afa118-4a16-4da1-9fa0-0736e5048fa3 |
| 485e0837-bb1d-4a44-8842-2a25e84a13f4 | 10.35.213.2      | 10.35.170.107       | 198a6f62-8d3b-4780-a16d-54ab48ca3cf1 |
| 5bb34c88-7bab-42e4-a80c-d2c2fc74f309 | 10.35.213.4      | 10.35.170.108       | 6b6d9a63-ff06-4c9b-ace4-b99cee27b1b2 |
| d2a42c18-f21e-4ffd-a67b-44bae12c593f | 10.35.212.2      | 10.35.170.105       | 34cdb035-e763-418e-88ee-de3a262a8e4f |
| f3573066-235a-4896-9502-dac8f8dcb0a7 | 10.35.211.3      | 10.35.170.103       | e8db1657-d6b9-43b3-bc6e-f37a333251cd |
| f567fd14-c63f-46f9-9c9a-39ac12788fcb | 10.35.214.2      | 10.35.170.109       | 28dc6dfd-eed3-477b-ad47-1f89f37116f7 |
| f57db2a6-8d67-4053-93af-345f8fea9856 | 10.35.212.4      | 10.35.170.106       | 4780455c-9a7b-4845-b090-5168c64050cf |
+--------------------------------------+------------------+---------------------+--------------------------------------+


# quantum floatingip-show f3573066-235a-4896-9502-dac8f8dcb0a7
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| fixed_ip_address    | 10.35.211.3                          |
| floating_ip_address | 10.35.170.103                        |
| floating_network_id | c733a64d-1389-45e9-95c8-3bccf2ba556f |
| id                  | f3573066-235a-4896-9502-dac8f8dcb0a7 |
| port_id             | e8db1657-d6b9-43b3-bc6e-f37a333251cd |
| router_id           | 2540bb59-d224-4d01-8bec-1f0e0a9e7ed1 |
| tenant_id           | 943b28f7d7684c0eb9387832515973e7     |
+---------------------+--------------------------------------+

*** We expect this above output to show port_id = a1eb3994-0538-4ab1-8ff7-a3c6a92b1598 instead of port_id = e8db1657-d6b9-43b3-bc6e-f37a333251cd


# quantum port-show e8db1657-d6b9-43b3-bc6e-f37a333251cd
+----------------------+------------------------------------------------------------------------------------+
| Field                | Value                                                                              |
+----------------------+------------------------------------------------------------------------------------+
| admin_state_up       | True                                                                               |
| binding:capabilities | {"port_filter": true}                                                              |
| binding:vif_type     | ovs                                                                                |
| device_id            | 409c24c8-caf2-42c6-b9a5-3c88a70cedb8                                               |
| device_owner         | compute:None                                                                       |
| fixed_ips            | {"subnet_id": "01086bbf-bb81-4ceb-86f4-34591aa39709", "ip_address": "10.35.211.3"} |
| id                   | e8db1657-d6b9-43b3-bc6e-f37a333251cd                                               |
| mac_address          | fa:16:3e:fb:2b:57                                                                  |
| name                 |                                                                                    |
| network_id           | 56ba9ec4-36f4-47f3-9a73-fcb7c8d2d21d                                               |
| security_groups      | 0c83a667-791e-449a-a269-4af6647d5671                                               |
| status               | ACTIVE                                                                             |
| tenant_id            | 943b28f7d7684c0eb9387832515973e7                                                   |
+----------------------+------------------------------------------------------------------------------------+


# quantum port-show a1eb3994-0538-4ab1-8ff7-a3c6a92b1598
+----------------------+--------------------------------------------------------------------------------------+
| Field                | Value                                                                                |
+----------------------+--------------------------------------------------------------------------------------+
| admin_state_up       | True                                                                                 |
| binding:capabilities | {"port_filter": true}                                                                |
| binding:vif_type     | ovs                                                                                  |
| device_id            | f3573066-235a-4896-9502-dac8f8dcb0a7                                                 |
| device_owner         | network:floatingip                                                                   |
| fixed_ips            | {"subnet_id": "a1063c61-6f68-451e-98bc-d340ce2294a9", "ip_address": "10.35.170.103"} |
| id                   | a1eb3994-0538-4ab1-8ff7-a3c6a92b1598                                                 |
| mac_address          | fa:16:3e:b6:95:f2                                                                    |
| name                 |                                                                                      |
| network_id           | c733a64d-1389-45e9-95c8-3bccf2ba556f                                                 |
| security_groups      |                                                                                      |
| status               | DOWN                                                                                 |
| tenant_id            |                                                                                      |
+----------------------+--------------------------------------------------------------------------------------+

Comment 2 Jakub Libosvar 2013-11-14 16:23:16 UTC
I discussed this issue upstream with PTL and this behavior is by design. Ports for floating ips are sort of fake and shouldn't be exposed to the user (you can see them with no user but admin, these ports have also empty tenant id).