Multiple delete_on_terminate volumes may not get deleted

Bug #1341738 reported by Andrew Laski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Andrew Laski

Bug Description

There's no catching of exceptions in _cleanup_volumes in compute/manager.py so a raised exception will short circuit cleaning up later volumes.

    def _cleanup_volumes(self, context, instance_uuid, bdms):
        for bdm in bdms:
            LOG.debug("terminating bdm %s", bdm,
                      instance_uuid=instance_uuid)
            if bdm.volume_id and bdm.delete_on_termination:
                self.volume_api.delete(context, bdm.volume_id)

Andrew Laski (alaski)
Changed in nova:
importance: Undecided → Low
Thang Pham (thang-pham)
Changed in nova:
assignee: nobody → Thang Pham (thang-pham)
Thang Pham (thang-pham)
Changed in nova:
assignee: Thang Pham (thang-pham) → nobody
Changed in nova:
status: New → Confirmed
assignee: nobody → Christopher Yeoh (cyeoh-0)
Revision history for this message
Andrew Laski (alaski) wrote :

I seem to have bad luck with my patches updating LP bugs, but I have a proposal up at https://review.openstack.org/#/c/106879/ . I'm open to someone else taking over if they wish, but I have another fix which depends on this.

Revision history for this message
Christopher Yeoh (cyeoh-0) wrote :

Oh sorry Andrew - only took it because it said no one was assigned to it - its all yours :-)

Changed in nova:
assignee: Christopher Yeoh (cyeoh-0) → nobody
assignee: nobody → Andrew Laski (alaski)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 70feb102ae86d3421e46a07710e4cbab35408d02
Author: Andrew Laski <email address hidden>
Date: Mon Jul 14 17:01:34 2014 -0400

    Defer raising an exception when deleting volumes

    When looping through block device mappings to delete volumes with
    delete_on_terminate set the loop should not exit on an exception.
    Instead the loop will continue and the last exception can optionally be
    raised.

    Change-Id: If1c6ec30c6f49009ef42f9a3b3df1594783b0ae5
    Closes-Bug: #1341738

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
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.