]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Cisco nexus plugin fails to untrunk vlan if other hosts using vlan
authorDane LeBlanc <leblancd@cisco.com>
Wed, 30 Oct 2013 19:00:47 +0000 (15:00 -0400)
committerDane LeBlanc <leblancd@cisco.com>
Tue, 19 Nov 2013 04:20:01 +0000 (23:20 -0500)
commita0a462f0303f68d885ff344898437e310c64188c
tree28584dd9cce360afdfa718029b1fcfe28e934d5d
parentbc18247313f8153875e98b59ef876b896d9033d5
Cisco nexus plugin fails to untrunk vlan if other hosts using vlan

Closes-Bug: #1246080

Without this fix, if two or more compute hosts have
instances which are
sharing a given VLAN on a Nexus switch, and then
all instances on one of the hosts which are using that
VLAN are terminated, while instances which are using
that VLAN on other hosts remain active, then
the VLAN is not being untrunked from the
corresponding interface on the Nexus switch as
expected.

This fix changes the VLAN removal logic from:
----If this the last instance using this VLAN on this switch:
--------untrunk the vlan from the switch interface
--------delete the VLAN from the switch
To:
----If this the last instance using this VLAN on this switch interface:
--------untrunk the vlan from the switch interface
--------If this the last instance using this VLAN on this switch:
------------delete the VLAN from the switch

Note that this bug also exists in the Cisco ML2
mechanism driver, but the code which implements
this is being redesigned, so it will be addressed for
the ML2 separately.

Change-Id: Icb1f95d1db4baa56c0f6fd68ce6342bbff27641d
neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py
neutron/tests/unit/cisco/test_network_plugin.py