Bug 890323

Summary: quantum port status is up inspite admin_state is down
Product: Red Hat OpenStack Reporter: Ofer Blaut <oblaut>
Component: openstack-quantumAssignee: Gary Kotton <gkotton>
Status: CLOSED ERRATA QA Contact: Ofer Blaut <oblaut>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0CC: gkotton, jhenner, twilson, ykaul
Target Milestone: snapshot4Keywords: Reopened, Triaged
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2012.2.3-5.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-21 15:04:23 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ofer Blaut 2012-12-26 07:15:51 EST
Description of problem:

When quantum port is turned to down by administrator (might be other reason),
the port status is still UP.

This is wrong when there are applications that monitor port status for HA ( like VRRP ) if admin-state is down port status must be down as well 

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


How reproducible:


Steps to Reproduce:

1. quantum port-list
2. quantum port-show <port-id>  ( check Admin status and port status )
3. quantum port-update <port-id> --admin_state_up False
4. quantum port-show <port-id>( check Admin status and port status ) 
  
Actual results:

admin-state is down port status is up  
Expected results:

if admin-state is down port status must be down as well 
Additional info:
Comment 2 Gary Kotton 2012-12-26 07:51:07 EST
Hi,
Please see http://wiki.openstack.org/QuantumV2APIIntro#Port.
The port is still ACTIVE, it just does not forward packets.
I am tending to feel like this is not a bug.
Thanks
Gary
Comment 3 Gary Kotton 2013-01-03 15:28:40 EST
Taking the issue upstream for additional input
Comment 4 Gary Kotton 2013-01-20 09:36:57 EST
Upstream patch is in review. https://review.openstack.org/#/c/19570/
Comment 6 Alan Pevec 2013-01-23 05:43:32 EST
(In reply to comment #4)
> Upstream patch is in review. https://review.openstack.org/#/c/19570/

FWIW this links to lp 1099065 for linuxbridge plugin while lp 1099099 in "External Trackers" links to https://review.openstack.org/19575 and is for OVS.
Comment 14 Ofer Blaut 2013-03-19 03:49:39 EDT
tested on openstack-quantum-2012.2.3-8.el6ost.noarch

working port of a VM was moved to admin_up false and ping wasn't working.
later port was moved back to admin_up true to see it works again 


[root@puma34 ~(keystone_admin_tenant1)]$ ping 88.66.66.3
PING 88.66.66.3 (88.66.66.3) 56(84) bytes of data.
64 bytes from 88.66.66.3: icmp_seq=1 ttl=64 time=0.165 ms
64 bytes from 88.66.66.3: icmp_seq=2 ttl=64 time=0.133 ms
^C
--- 88.66.66.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1118ms
rtt min/avg/max/mdev = 0.133/0.149/0.165/0.016 ms
[root@puma34 ~(keystone_admin_tenant1)]$ quantum port-show 9c030321-8396-42d4-9233-190f5a28135f
+----------------+-----------------------------------------------------------------------------------+
| Field          | Value                                                                             |
+----------------+-----------------------------------------------------------------------------------+
| admin_state_up | True                                                                              |
| device_id      | 3ca361b0-ce35-422a-bf26-0f9a5b17df1d                                              |
| device_owner   | compute:nova                                                                      |
| fixed_ips      | {"subnet_id": "8f943b84-4310-463c-b597-8975364bac3e", "ip_address": "88.66.66.3"} |
| id             | 9c030321-8396-42d4-9233-190f5a28135f                                              |
| mac_address    | fa:16:3e:bf:69:9f                                                                 |
| name           |                                                                                   |
| network_id     | 5be0bbb9-b830-421a-ba2d-449067eb88ce                                              |
| status         | ACTIVE                                                                            |
| tenant_id      | 61ad71706c964d4992e68d10dbecb12d                                                  |
+----------------+-----------------------------------------------------------------------------------+
[root@puma34 ~(keystone_admin_tenant1)]$ quantum port-update 9c030321-8396-42d4-9233-190f5a28135f --admin_state_up False
Updated port: 9c030321-8396-42d4-9233-190f5a28135f
[root@puma34 ~(keystone_admin_tenant1)]$ quantum port-show 9c030321-8396-42d4-9233-190f5a28135f
+----------------+-----------------------------------------------------------------------------------+
| Field          | Value                                                                             |
+----------------+-----------------------------------------------------------------------------------+
| admin_state_up | False                                                                             |
| device_id      | 3ca361b0-ce35-422a-bf26-0f9a5b17df1d                                              |
| device_owner   | compute:nova                                                                      |
| fixed_ips      | {"subnet_id": "8f943b84-4310-463c-b597-8975364bac3e", "ip_address": "88.66.66.3"} |
| id             | 9c030321-8396-42d4-9233-190f5a28135f                                              |
| mac_address    | fa:16:3e:bf:69:9f                                                                 |
| name           |                                                                                   |
| network_id     | 5be0bbb9-b830-421a-ba2d-449067eb88ce                                              |
| status         | DOWN                                                                              |
| tenant_id      | 61ad71706c964d4992e68d10dbecb12d                                                  |
+----------------+-----------------------------------------------------------------------------------+
[root@puma34 ~(keystone_admin_tenant1)]$ ping 88.66.66.3
PING 88.66.66.3 (88.66.66.3) 56(84) bytes of data.
^C
--- 88.66.66.3 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2473ms

[root@puma34 ~(keystone_admin_tenant1)]$ quantum port-update 9c030321-8396-42d4-9233-190f5a28135f --admin_state_up True
Updated port: 9c030321-8396-42d4-9233-190f5a28135f
[root@puma34 ~(keystone_admin_tenant1)]$ quantum port-show 9c030321-8396-42d4-9233-190f5a28135f
+----------------+-----------------------------------------------------------------------------------+
| Field          | Value                                                                             |
+----------------+-----------------------------------------------------------------------------------+
| admin_state_up | True                                                                              |
| device_id      | 3ca361b0-ce35-422a-bf26-0f9a5b17df1d                                              |
| device_owner   | compute:nova                                                                      |
| fixed_ips      | {"subnet_id": "8f943b84-4310-463c-b597-8975364bac3e", "ip_address": "88.66.66.3"} |
| id             | 9c030321-8396-42d4-9233-190f5a28135f                                              |
| mac_address    | fa:16:3e:bf:69:9f                                                                 |
| name           |                                                                                   |
| network_id     | 5be0bbb9-b830-421a-ba2d-449067eb88ce                                              |
| status         | ACTIVE                                                                            |
| tenant_id      | 61ad71706c964d4992e68d10dbecb12d                                                  |
+----------------+-----------------------------------------------------------------------------------+
[root@puma34 ~(keystone_admin_tenant1)]$ ping 88.66.66.3
PING 88.66.66.3 (88.66.66.3) 56(84) bytes of data.
64 bytes from 88.66.66.3: icmp_seq=1 ttl=64 time=0.356 ms
64 bytes from 88.66.66.3: icmp_seq=2 ttl=64 time=0.304 ms
^C
--- 88.66.66.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1045ms
rtt min/avg/max/mdev = 0.304/0.330/0.356/0.026 ms
Comment 16 errata-xmlrpc 2013-03-21 15:04:23 EDT
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-0672.html