Nicira plugin: get_port reports wrong port status for extended switches

Bug #1188652 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Salvatore Orlando
Grizzly
Fix Released
Medium
Salvatore Orlando

Bug Description

When using the provider networks extension with the nicira plugin, a single, large, network might be backed by several NVP logical switches.

When reading the logical status for a port, the plugin invokes nvplib.get_logical_port_status. This routine reads a logica port configuraiton providing the logical switch uuid and the logica port uuid.
The Plugin leverages the fact that nvp logical switch uuid == quantum network id.
However, this is not always true in the case of extended switches. The operation then migth a 404 error if the port was being sought on the first logical switch of the chain, whereas it might be on a different logical switch. Its state is then set to ERROR whereas it should be 'ACTIVE' or 'DOWN'.

Steps to reproduce:

1) edit /etc/quantum/plugins/nicira/nvp.ini and set max_lp_per_bridged_ls to a small value, for instance 3
2) restart quantum-server
3) quantum net-create bridged --provider:network_type=vlan --provider:physical_network=9f5bd279-fcda-44c4-a709-efec63bc6eb9 --provider:segmentation_id=666
4) quantum subnet-create bridged 192.168.0.0/16
5) quantum port-create bridged --name bridged-2; quantum port-create bridged --name bridged-3
    bridged-3 will be created on a 2nd logical switch (the 3rd port on the 1st ls is the dhcp port)
6) user@os-nvp-ctrl:~/devstack$ quantum port-show bridged-3
+-----------------------+------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+------------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "1e568b32-198f-4ad3-8520-fa15555b2e89", "ip_address": "192.168.0.5"} |
| id | 691d2cbc-43c0-4c2c-b065-ff4d2f171fc9 |
| mac_address | fa:16:3e:a9:db:0e |
| name | bridged-3 |
| network_id | 6ec622d4-8608-40a7-8712-d7e9d96bda8c |
| port_security_enabled | True |
| security_groups | f0750245-e9e0-4a2f-87d0-89205bdb8773 |
| status | ERROR |
| tenant_id | d6ddcd5d5d6f4c30bdb7fd3407b4a4fa |
+-----------------------+------------------------------------------------------------------------------------+

Status should not be 'ERROR' but 'DOWN'

Tags: nicira
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/32155

Changed in quantum:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/32155
Committed: http://github.com/openstack/quantum/commit/8305495f161a485263807bc4c663d4578a96d559
Submitter: Jenkins
Branch: master

commit 8305495f161a485263807bc4c663d4578a96d559
Author: Salvatore <email address hidden>
Date: Fri Jun 7 17:08:47 2013 +0200

    Nicira plugin: always fetch lports from correct lswitch

    Bug 1188652

    Remove get_logical_port_status which required a lswitch uuid, and
    replace it with a call to query_lswitch_ports, which does not
    require it.

    Change-Id: I6c7d0403f37b2c9fb4332a8d34dcaa9050ced3fc

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/44568

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/grizzly)

Reviewed: https://review.openstack.org/44568
Committed: http://github.com/openstack/neutron/commit/85c92b0492f52590f7818cc98561504cf23411b3
Submitter: Jenkins
Branch: stable/grizzly

commit 85c92b0492f52590f7818cc98561504cf23411b3
Author: Salvatore <email address hidden>
Date: Fri Jun 7 17:08:47 2013 +0200

    Nicira plugin: always fetch lports from correct lswitch

    Bug 1188652

    Remove get_logical_port_status which required a lswitch uuid, and
    replace it with a call to query_lswitch_ports, which does not
    require it.

    Change-Id: I6c7d0403f37b2c9fb4332a8d34dcaa9050ced3fc

tags: added: in-stable-grizzly
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-2 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
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.