neutron: VirtualInterface isn't cleaned up before rescheduling during allocation failure

Bug #1603197 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Matt Riedemann

Bug Description

This is a follow-on to bug 1602357. That fixed the case that we delete the VirtualInterface objects in the nova db when deallocating networks for an instance or a single port.

But if we fail to allocate networking from the start, we also do a cleanup on the ports we've created and/or updated, but we aren't deleting the VIFs we've created, here:

https://github.com/openstack/nova/blob/92a388a1e34559b2ce69d31fdef996ff029495a6/nova/network/neutronv2/api.py#L847

That also needs to happen because we could do something like:

1. create/update port1, create vif1, ok
2. create/update port2, fails - we deallocate port1 and port2 but not vif1

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

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

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

Reviewed: https://review.openstack.org/342416
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7a8f1369c5dd9d6a6260ba0c168d06e9f0016d33
Submitter: Jenkins
Branch: master

commit 7a8f1369c5dd9d6a6260ba0c168d06e9f0016d33
Author: Matt Riedemann <email address hidden>
Date: Thu Jul 14 16:51:35 2016 -0400

    neutron: destroy VIFs if allocating ports fails

    Following on 92a388a1e34559b2ce69d31fdef996ff029495a6 we also
    need to rollback VirtualInterfaces that we create if allocation
    fails since a reschedule with a pre-existing port will fail
    allocation with a duplicate VIF constraint error.

    A new test is added for the rollback section being changed
    since there isn't an obvious existing test that this could be
    worked into.

    Change-Id: I04ca4fff319912ce2a8dc07308a3aec1c24dc58c
    Closes-Bug: #1603197

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.0.0b3

This issue was fixed in the openstack/nova 14.0.0.0b3 development milestone.

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.