A glance error (image unavailable) during a snapshot leaves an instance in SNAPSHOTTING

Bug #1267097 reported by jan grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
jan grant
Havana
Fix Released
Low
Tiantian Gao

Bug Description

If a snapshot is attempted to be taken when Glance can't find the underlying image (usually because it's been deleted), then ImageNotFound is raised to nova.compute.manager.ComputeManager._snapshot_instance. The error path for this leaves the instance in a snapshotting state; after which "operator intervention" is required.

Revision history for this message
jan grant (jan-grant) wrote :
Changed in nova:
assignee: nobody → jan grant (jan-grant)
status: New → In Progress
Andrew Laski (alaski)
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 96dba50737819c24b4ddd9cb1078da305638abc9
Author: Jan Grant <email address hidden>
Date: Wed Jan 8 12:34:07 2014 +0000

    Take a vm out of SNAPSHOTTING after Glance error

    If a snapshot is attempted to be taken when Glance can't find the
    underlying image (usually because it's been deleted), then ImageNotFound
    is raised to nova.compute.manager.ComputeManager._snapshot_instance. The
    error path for this leaves the instance in a snapshotting state; after
    which "operator intervention" is required.

    This simply reverts the instance state under that specific circumstance.

    DocImpact: previously a snapshot that failed for this reason would leave
    the instance in a spurious snapshotting task state indefinitely. Now,
    the task state is reverted. At the moment that revert is 'silent'
    (although the failure to snapshot will be evident to the user).

    Change-Id: I9623cfaed31e8337ab65bc1eab85ad3b51b1a5ca
    Fixes-bug: #1267097

Changed in nova:
status: In Progress → Fix Committed
tags: added: havana-backport-potential
Changed in nova:
milestone: none → icehouse-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/76828

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/76828
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=88da0984c81fa98ff1d32915a4152773d7caa257
Submitter: Jenkins
Branch: stable/havana

commit 88da0984c81fa98ff1d32915a4152773d7caa257
Author: Jan Grant <email address hidden>
Date: Wed Jan 8 12:34:07 2014 +0000

    Take a vm out of SNAPSHOTTING after Glance error

    If a snapshot is attempted to be taken when Glance can't find the
    underlying image (usually because it's been deleted), then ImageNotFound
    is raised to nova.compute.manager.ComputeManager._snapshot_instance. The
    error path for this leaves the instance in a snapshotting state; after
    which "operator intervention" is required.

    This simply reverts the instance state under that specific circumstance.

    DocImpact: previously a snapshot that failed for this reason would leave
    the instance in a spurious snapshotting task state indefinitely. Now,
    the task state is reverted. At the moment that revert is 'silent'
    (although the failure to snapshot will be evident to the user).

    Fixes-bug: #1267097
    (cherry picked from commit 96dba50737819c24b4ddd9cb1078da305638abc9)

    Conflicts:

     nova/compute/manager.py

    Change-Id: I9623cfaed31e8337ab65bc1eab85ad3b51b1a5ca

tags: added: in-stable-havana
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
Revision history for this message
Kanimozhi S (kani-ceg) wrote :

If I delete the image under /var/lib/nova/instances/_base directory and tried taking snapshot of the instance, it errors as below:
Stderr: "qemu-img: Could not open '/var/lib/nova/instances/abc0e319-9510-403f-af77-d7afb83b5a55/disk'\n"

Could anyone tell how to reproduce this bug?

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.