vmware_dvs fails in update_network_precommit

Bug #1697034 reported by Stefan Nica
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-vsphere
Fix Released
Undecided
Stefan Nica

Bug Description

While using the vmware_dvs ML2 mechanism driver, deleting a network - even when there are no DVS agents present - results in the following error:

ERROR neutron.plugins.ml2.managers [req-06c9a92d-4854-49f9-b827-4c2d48cbaeb4 6ac560dd9c714542863ed079cb14f28f e4527f0b9e9d40849299ff77ad9c51aa - - -] Mechanism driver 'vmware_dvs' failed in update_network_precommit
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers Traceback (most recent call last):
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/managers.py", line 433, in _call_on_drivers
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/networking_vsphere/ml2/dvs_mechanism_driver.py", line 95, in update_network_precommit
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers if self._check_net_type(context):
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers File "/usr/lib/python2.7/site-packages/networking_vsphere/ml2/dvs_mechanism_driver.py", line 169, in _check_net_type
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers network_type = network_context.network_segments[0]['network_type']
2017-06-09 16:17:05.934 11301 ERROR neutron.plugins.ml2.managers IndexError: list index out of range

Changed in networking-vsphere:
assignee: nobody → Stefan Nica (stefan.nica)
Revision history for this message
Stefan Nica (stefan.nica) wrote :

Initial investigation reveals that update_network_precommit is called before the network is deleted, but the network_segments list is empty.
The fix should be pretty straightforward.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-vsphere (master)

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

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

Reviewed: https://review.openstack.org/472753
Committed: https://git.openstack.org/cgit/openstack/networking-vsphere/commit/?id=13288a1591bd7299a042dd34012966eb09fdabb7
Submitter: Jenkins
Branch: master

commit 13288a1591bd7299a042dd34012966eb09fdabb7
Author: Stefan Nica <email address hidden>
Date: Fri Jun 9 18:31:14 2017 +0200

    Handle network delete properly in vmware_dvs

    While deleting a network, the vmware_dvs mechanism
    driver is not properly handling the update_network_precommit
    call - the network_segments list is empty in this case.

    Closes-Bug: 1697034
    Change-Id: If0612d5632a73bfba2047f67c23dee7c1cfc71fb

Changed in networking-vsphere:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-vsphere (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/484715

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-vsphere (stable/ocata)

Reviewed: https://review.openstack.org/484715
Committed: https://git.openstack.org/cgit/openstack/networking-vsphere/commit/?id=45dd174e1d65d2987ec6473152388a5dbd91486c
Submitter: Jenkins
Branch: stable/ocata

commit 45dd174e1d65d2987ec6473152388a5dbd91486c
Author: Stefan Nica <email address hidden>
Date: Fri Jun 9 18:31:14 2017 +0200

    Handle network delete properly in vmware_dvs

    While deleting a network, the vmware_dvs mechanism
    driver is not properly handling the update_network_precommit
    call - the network_segments list is empty in this case.

    Closes-Bug: 1697034
    Change-Id: If0612d5632a73bfba2047f67c23dee7c1cfc71fb
    (cherry picked from commit 13288a1591bd7299a042dd34012966eb09fdabb7)

tags: added: in-stable-ocata
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.