neutron port-list with device-id of router does not include the gateway's port

Bug #1462678 reported by Vedamurthy Joshi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Won't Fix
Medium
Hampapur Ajay
Trunk
New
Medium
Hampapur Ajay

Bug Description

R2.20 43 Ubuntu 12.04.3 single node setup

Below , neutron port-list with filter of device-id is listing only the left-network's port. The gateway port too has device-id of the router, but is not shown.

Further, when we do port-list with network-id of gateway (test2 below) and device-id of router, we get port of left-vn(test1) instead.

root@nodeb5:~# neutron router-list
neutron
root@nodeb5:~# neutron router-create rtr1
neuCreated a new router:
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | rtr1 |
| external_gateway_info | |
| id | 6999d8a8-e49d-4fce-b470-4bfc26c2c733 |
| name | rtr1 |
| status | ACTIVE |
| tenant_id | 7b218da7c88e4aae960b6bced5448ff3 |
+-----------------------+--------------------------------------+
root@nodeb5:~# neutron net-create test1
neuCreated a new network:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | test1 |
| contrail:instance_count | 0 |
| id | 563f3020-a823-45e5-9971-5c8d0349051e |
| name | test1 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 7b218da7c88e4aae960b6bced5448ff3 |
+-------------------------+--------------------------------------+
root@nodeb5:~# neutron subnet-create test1 100.1.1.0/24
neuCreated a new subnet:
+------------------+----------------------------------------------+
| Field | Value |
+------------------+----------------------------------------------+
| allocation_pools | {"start": "100.1.1.2", "end": "100.1.1.254"} |
| cidr | 100.1.1.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 100.1.1.1 |
| host_routes | |
| id | 086def98-1fd1-464b-ad1c-06af6d673cf0 |
| ip_version | 4 |
| name | |
| network_id | 563f3020-a823-45e5-9971-5c8d0349051e |
| tenant_id | 7b218da7c88e4aae960b6bced5448ff3 |
+------------------+----------------------------------------------+
troot@nodeb5:~# neutronnet-create test2
Created a new network:
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | test2 |
| contrail:instance_count | 0 |
| id | 363a9201-c8cb-4ab9-9b1d-74849cce6d82 |
| name | test2 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 7b218da7c88e4aae960b6bced5448ff3 |
+-------------------------+--------------------------------------+
root@nodeb5:~# neutron subnet-create test2 200.1.1.0/24
nCreated a new subnet:
+------------------+----------------------------------------------+
| Field | Value |
+------------------+----------------------------------------------+
| allocation_pools | {"start": "200.1.1.2", "end": "200.1.1.254"} |
| cidr | 200.1.1.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 200.1.1.1 |
| host_routes | |
| id | f05b5e57-e07d-4acd-a760-0837b590a73d |
| ip_version | 4 |
| name | |
| network_id | 363a9201-c8cb-4ab9-9b1d-74849cce6d82 |
| tenant_id | 7b218da7c88e4aae960b6bced5448ff3 |
+------------------+----------------------------------------------+
eroot@nodeb5:~# neutron net-update test2 --router:external
Updated network: test2
root@nodeb5:~# neutron router-interface-add rtr1 086def98-1fd1-464b-ad1c-06af6d673cf0
Added interface 0910a260-5c4a-4e1d-88c8-08bc930270c5 to router rtr1.
root@nodeb5:~# neutron router-gateway-set rtr1 363a9201-c8cb-4ab9-9b1d-74849cce6d82
Set gateway for router rtr1
root@nodeb5:~# neutron port-list
+--------------------------------------+-----------------------------------------------------------------------------+-------------------+-----------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+-----------------------------------------------------------------------------+-------------------+-----------------------------------------------------------------------------------+
| 0910a260-5c4a-4e1d-88c8-08bc930270c5 | 0910a260-5c4a-4e1d-88c8-08bc930270c5 | 02:09:10:a2:60:5c | {"subnet_id": "086def98-1fd1-464b-ad1c-06af6d673cf0", "ip_address": "100.1.1.1"} |
| ccf9ac01-57e7-4c64-b9cc-97d1f859fb24 | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__1__left__2 | 02:41:3b:70:30:4e | {"subnet_id": "b6bbb13f-ad6c-4868-9ca0-b159b61d666a", "ip_address": "100.64.0.4"} |
| 65f6a321-ec00-4d70-9baf-198ff5ccabe8 | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__1__right__1 | 02:9c:1b:5e:55:ac | {"subnet_id": "f05b5e57-e07d-4acd-a760-0837b590a73d", "ip_address": "200.1.1.3"} |
| 35f999be-34ae-46fa-9f8b-6ab7e4d2787d | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__2__left__2 | 02:41:3b:70:30:4e | {"subnet_id": "b6bbb13f-ad6c-4868-9ca0-b159b61d666a", "ip_address": "100.64.0.4"} |
| 6ab58d55-9797-41a4-89d8-367c4a119f50 | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__2__right__1 | 02:9c:1b:5e:55:ac | {"subnet_id": "f05b5e57-e07d-4acd-a760-0837b590a73d", "ip_address": "200.1.1.3"} |
+--------------------------------------+-----------------------------------------------------------------------------+-------------------+-----------------------------------------------------------------------------------+
root@nodeb5:~# neutron port-list --network-id 363a9201-c8cb-4ab9-9b1d-74849cce6d82 --device-id 6999d8a8-e49d-4fce-b470-4bfc26c2c733
+--------------------------------------+--------------------------------------+-------------------+----------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+--------------------------------------+-------------------+----------------------------------------------------------------------------------+
| 0910a260-5c4a-4e1d-88c8-08bc930270c5 | 0910a260-5c4a-4e1d-88c8-08bc930270c5 | 02:09:10:a2:60:5c | {"subnet_id": "086def98-1fd1-464b-ad1c-06af6d673cf0", "ip_address": "100.1.1.1"} |
+--------------------------------------+--------------------------------------+-------------------+----------------------------------------------------------------------------------+
root@nodeb5:~# neutron port-show 6ab58d55-9797-41a4-89d8-367c4a119f50
+---------------------+----------------------------------------------------------------------------------+
| Field | Value |
+---------------------+----------------------------------------------------------------------------------+
| admin_state_up | True |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | vrouter |
| device_id | 6999d8a8-e49d-4fce-b470-4bfc26c2c733 |
| device_owner | network:router_gateway |
| fixed_ips | {"subnet_id": "f05b5e57-e07d-4acd-a760-0837b590a73d", "ip_address": "200.1.1.3"} |
| id | 6ab58d55-9797-41a4-89d8-367c4a119f50 |
| mac_address | 02:9c:1b:5e:55:ac |
| name | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__2__right__1 |
| network_id | 363a9201-c8cb-4ab9-9b1d-74849cce6d82 |
| security_groups | 16f05d56-0582-424a-8e84-5bfb1d7fa4d7 |
| status | ACTIVE |
| tenant_id | 7b218da7c88e4aae960b6bced5448ff3 |
+---------------------+----------------------------------------------------------------------------------+
root@nodeb5:~# neutron port-list --network-id 363a9201-c8cb-4ab9-9b1d-74849cce6d82
+--------------------------------------+-----------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+-----------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------------+
| 65f6a321-ec00-4d70-9baf-198ff5ccabe8 | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__1__right__1 | 02:9c:1b:5e:55:ac | {"subnet_id": "f05b5e57-e07d-4acd-a760-0837b590a73d", "ip_address": "200.1.1.3"} |
| 6ab58d55-9797-41a4-89d8-367c4a119f50 | default-domain__admin__si_6999d8a8-e49d-4fce-b470-4bfc26c2c733__2__right__1 | 02:9c:1b:5e:55:ac | {"subnet_id": "f05b5e57-e07d-4acd-a760-0837b590a73d", "ip_address": "200.1.1.3"} |
+--------------------------------------+-----------------------------------------------------------------------------+-------------------+----------------------------------------------------------------------------------+
root@nodeb5:~# neutron port-list --device-id 6999d8a8-e49d-4fce-b470-4bfc26c2c733
+--------------------------------------+--------------------------------------+-------------------+----------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+--------------------------------------+-------------------+----------------------------------------------------------------------------------+
| 0910a260-5c4a-4e1d-88c8-08bc930270c5 | 0910a260-5c4a-4e1d-88c8-08bc930270c5 | 02:09:10:a2:60:5c | {"subnet_id": "086def98-1fd1-464b-ad1c-06af6d673cf0", "ip_address": "100.1.1.1"} |
+--------------------------------------+--------------------------------------+-------------------+----------------------------------------------------------------------------------+
root@nodeb5:~#

Tags: config
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.