Snapshot is deleted after instance is terminated

Bug #1329882 reported by Dennis Kliban
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
lvdongbing

Bug Description

NovaImageBuilder runs Anaconda and other installers inside a nova instance. After the install the instance is shut down and a snapshot is taken. After the snapshot finishes being saved the instance is terminated. In the last week I have noticed that the snapshot gets deleted also.

Revision history for this message
Dennis Kliban (dkliban) wrote :

My code checks that the snapshot becomes 'active' before terminating the instance. However, the compute node seems to think that it is still in a Saving state so it deletes the snapshot. This feature was added here: https://github.com/openstack/nova/commit/ad0940b724c34f3ed04fd8374e2843d522deb78c

However, I don't think it is working properly.

Revision history for this message
Matt Riedemann (mriedem) wrote :

What level of code is this against? Trunk/juno or stable/icehouse?

Revision history for this message
Dennis Kliban (dkliban) wrote :

I run this against trunk. We have a devstack environment that we install nightly.

lvdongbing (dbcocle)
Changed in nova:
assignee: nobody → lvdongbing (dbcocle)
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/100120

Changed in nova:
status: New → In Progress
Revision history for this message
Dan Prince (dan-prince) wrote :

This looks like a clear regression caused by https://review.openstack.org/#/c/82455/.

Changed in nova:
importance: Undecided → High
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit c28956a6872b34a93891c985c93aad5e242563b6
Author: lvdongbing <email address hidden>
Date: Mon Jun 16 09:11:32 2014 +0800

    Should not delete active snapshot when instance is terminated

    The instance might be deleted when doing snapshot, need to check
    whether the snapshot is active state before delete it.

    Change-Id: Ic12b8dfd05ad7f36831dd073cef746f094d8f2d0
    Closes-Bug: #1329882

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
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.