should error when unshelve an volume backed instance which the image was deleted

Bug #1371406 reported by Eli Qiao
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Eli Qiao

Bug Description

shelve an instance first.
nova will create an snapshot of image with instance name-shelved
like: t2-shelved

manually delete the image with
nova image-delte t2-shelved

then do an unshelve, it should report image not found error and mark the instance
vm_state ERROR

this is the output of glance in conductor, the image is deleted, but nova don't get the deleted status of image.

2014-09-19 11:12:20.534 DEBUG glanceclient.common.http [req-d2aaa493-b507-4f75-a185-c83d347f82b0 admin admin]
HTTP/1.1 200 OK
content-length: 0
x-image-meta-id: 2a6ce744-b96b-4f71-882e-13c4fc1c9da1
date: Fri, 19 Sep 2014 03:12:20 GMT
x-image-meta-deleted: True <<<===
x-image-meta-container_format: ami
x-image-meta-checksum: 1b31d2e911494696c6d190ccef2f4d64
x-image-meta-deleted_at: 2014-09-19T02:41:27
x-image-meta-min_disk: 0
x-image-meta-protected: False
x-image-meta-created_at: 2014-09-18T04:03:09
x-image-meta-size: 10616832
x-image-meta-status: deleted <<<===
etag: 1b31d2e911494696c6d190ccef2f4d64
x-image-meta-is_public: False
x-image-meta-min_ram: 0
x-image-meta-owner: d7beb7f28e0b4f41901215000339361d
x-image-meta-updated_at: 2014-09-19T02:41:27
content-type: text/html; charset=UTF-8
x-openstack-request-id: req-e95ddab3-bee5-4847-ba55-13be02bc1a14
x-image-meta-disk_format: ami
x-image-meta-name: t2-shelved

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/122608

Changed in nova:
assignee: nobody → Eli Qiao (taget-9)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 07dee87d5af40efae99cb1c0c898b11f5fe54884
Author: Eli Qiao <email address hidden>
Date: Fri Sep 19 13:22:37 2014 +0800

    Set error state when unshelve an instance due to not found image

    If shelve image created by shelve operation can not be found when
    unshelve, nova should set the instance error state.

    This patch add a new param show_deleted to glance api:
    :param show_deleted: (Optional) show the image even the status of
                         image is deleted.

    Change-Id: Ie4bc8dfec0922023dd1a4204a67acd77f7bb0498
    Closes-Bug: 1371406

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