deallocate_for_instance should delete all neutron ports on error

Bug #1292243 reported by Aaron Rosen
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann

Bug Description

When deleting an instance if an instance has multiple ports and one
of the deletes fail nova should LOG an error and continue trying
to delete the other ports. Previously, nova would stop deleting ports
are the first non 404 error.

Aaron Rosen (arosen)
summary: - deallocate_for_instance should delete all neutron porrts on error
+ deallocate_for_instance should delete all neutron ports on error
Changed in nova:
assignee: nobody → Aaron Rosen (arosen)
tags: added: network
Changed in nova:
importance: Undecided → Medium
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/80412

Changed in nova:
status: New → In Progress
Aaron Rosen (arosen)
tags: added: icehouse-rc-potential tag
Thierry Carrez (ttx)
tags: added: icehouse-backport-potential
removed: icehouse-rc-potential
Brent Eagles (beagles)
tags: added: neutron
Changed in nova:
assignee: Aaron Rosen (arosen) → Sean Dague (sdague)
Changed in nova:
assignee: Sean Dague (sdague) → Aaron Rosen (arosen)
Changed in nova:
assignee: Aaron Rosen (arosen) → Sean Dague (sdague)
Changed in nova:
assignee: Sean Dague (sdague) → Dan Smith (danms)
Changed in nova:
assignee: Dan Smith (danms) → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/121208

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

Reviewed: https://review.openstack.org/80412
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1d44bc5d7ac4adb1ad8a3aaabf0c27c593ec07e1
Submitter: Jenkins
Branch: master

commit 1d44bc5d7ac4adb1ad8a3aaabf0c27c593ec07e1
Author: Aaron Rosen <email address hidden>
Date: Thu Mar 13 15:02:30 2014 -0700

    neutronv2: attempt to delete all ports

    Previously when deleting ports during allocate
    or deallocate, the operation would fail on the
    first non-404 error encountered. We now loop
    through all of the ports and attempt the delete.

    In the allocate flow we don't raise any errors
    since the instance is set to ERROR anyway and
    we're just trying to cleanup.

    In the deallocate flow we attempt to delete all
    of the ports and if there was a non-404 exception
    we raise that at the end so the overall instance
    delete operation fails.

    Change-Id: Ibf68e0b4770b09ee32f187b85f2ca96984117e0b
    Closes-bug: #1292243
    Co-Authored-By: Dan Smith <email address hidden>
    Co-Authored-By: Sean Dague <email address hidden>
    Co-Authored-By: Matt Riedemann <email address hidden>

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

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

commit dc17950fd95fd1b0350cd9ab336699abf2b04739
Author: Matt Riedemann <email address hidden>
Date: Fri Sep 12 12:26:55 2014 -0700

    Don't swallow exceptions in deallocate_port_for_instance

    This uses the new _delete_ports method to (1) still
    ignore 404 errors but also (2) raise up non-404 errors
    from the neutron client when deleting the port fails as
    we shouldn't be masking over this since the nova-api
    call wouldn't be failing even though the underlying
    operation failed.

    Change-Id: Id05ea47ba03e0b60ae3a296920159e8189f9dd55
    Related-Bug: #1292243

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.