image status set to killed even if has been deleted

Bug #1236868 reported by Edward Hope-Morley
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Edward Hope-Morley
Icehouse
Fix Released
Medium
Edward Hope-Morley

Bug Description

This error occurs with the following sequence of steps:

1. Upload data to an image e.g. cinder upload-to-image
2. image status is set to 'saving' as data is uploaded
3. delete image before upload is complete
4. image status goes to 'deleted' and image is deleted from backend store
5. fail the upload
6. image status then goes to 'killed' when it should stay as 'deleted'

Changed in glance:
status: New → In Progress
assignee: nobody → Edward Hope-Morley (hopem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/50457

Changed in glance:
importance: Undecided → Medium
milestone: none → icehouse-1
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Note: this issue only affects admin context or contexts that are allowed to retrieve deleted images when doing db image_get() (e.g. show_deleted=True)

Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-1 → icehouse-2
Changed in glance:
milestone: icehouse-2 → icehouse-3
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-3 → icehouse-rc1
Revision history for this message
Thierry Carrez (ttx) wrote :

Not a blocker, will include if it makes it soon

Changed in glance:
milestone: icehouse-rc1 → none
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

Hi dosaboy, may I know what's the current status of this bug? does it still in progress?

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Hi Zhi, was not clear whether the general consensus was in favour of this patch but if you still think it is important I will resume it.

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

Hey dosaboy, that will be great, thanks. btw, if you have no time to handle this pls let me know, I'd like to help.

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

Reviewed: https://review.openstack.org/50457
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=345d8f7766aa06fa6654382efc480da493a3f2c8
Submitter: Jenkins
Branch: master

commit 345d8f7766aa06fa6654382efc480da493a3f2c8
Author: Edward Hope-Morley <email address hidden>
Date: Tue Oct 8 20:41:26 2013 +0100

    Fix image killed after deletion

    If an image upload fails after the image was deleted during
    the upload, the image status currently gets set to 'deleted'
    then 'killed' once the upload fails. This patch fixes this so
    that if the image was deleted it stays in 'deleted' state.

    Permitted from_states for transitioning to 'killed' are
    'queued' and 'saving'. We now enforce this transition and
    raise an exception if it is violated.

    Closes-Bug: 1236868
    Co-authored-by: Hirofumi Ichihara <email address hidden>
    Co-authored-by: Zhi Yan Liu <email address hidden>
    Change-Id: I5552220ce264c0d09780bbd0eb7610e7cff0b820

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/114299

tags: added: icehouse-backport-potential
Thierry Carrez (ttx)
Changed in glance:
milestone: none → juno-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/icehouse)

Reviewed: https://review.openstack.org/114299
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=fcc937966056d86956cb403a68a81cb9f4fbd0b1
Submitter: Jenkins
Branch: stable/icehouse

commit fcc937966056d86956cb403a68a81cb9f4fbd0b1
Author: Edward Hope-Morley <email address hidden>
Date: Tue Oct 8 20:41:26 2013 +0100

    Fix image killed after deletion

    If an image upload fails after the image was deleted during
    the upload, the image status currently gets set to 'deleted'
    then 'killed' once the upload fails. This patch fixes this so
    that if the image was deleted it stays in 'deleted' state.

    Permitted from_states for transitioning to 'killed' are
    'queued' and 'saving'. We now enforce this transition and
    raise an exception if it is violated.

    Closes-Bug: 1236868
    Co-authored-by: Hirofumi Ichihara <email address hidden>
    Co-authored-by: Zhi Yan Liu <email address hidden>
    (cherry picked from commit 345d8f7766aa06fa6654382efc480da493a3f2c8)

    Conflicts:

     glance/api/v1/images.py
     glance/api/v1/upload_utils.py

    Change-Id: I5552220ce264c0d09780bbd0eb7610e7cff0b820

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in glance:
milestone: juno-3 → 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.