Image data stays in staging store if image is deleted while its in importing state

Bug #1855417 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Abhishek Kekane
Train
Fix Committed
Critical
Abhishek Kekane

Bug Description

Image data stays in staging area (filesystem backend) if image is deleted while it is in 'importing' state.

Steps to reproduce:
1. Create image using new import workflow:
    glance image-create-via-import --disk-format qcow2 --container-format bare --name testing-import-delete --file <file-name.
2. Verify image is in 'importing' state and issue the delete call
    glance image-delete <image-id-from-step-1>

Expected result:
1. Image should be deleted
2. Image data from staging area should be deleted

Actual result:
1. Image is deleted but;
2. Image data from staging area is not deleted

Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.opendev.org/697647

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/697647
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=5d15f073718328380f2d847e4abfb9307536d810
Submitter: Zuul
Branch: master

commit 5d15f073718328380f2d847e4abfb9307536d810
Author: Abhishek Kekane <email address hidden>
Date: Fri Dec 6 10:35:55 2019 +0000

    Staging area not cleared if image is deleted while importing

    If multiple stores configured in glance and Image is deleted while import
    operation is in progress then image data stays in staging area
    (filesystem backend) and there is no other way than clearing it
    manually.

    Modified delete method to delete the data from staging area if image is
    deleted while import operation is in progress.

    Change-Id: Ib58accd6514e589dccde57fe063815b1ab1ce496
    Closes-Bug: #1855417

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/701491

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

Reviewed: https://review.opendev.org/701491
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8c2bc60820783f76c9421d615d3828a88008ca96
Submitter: Zuul
Branch: stable/train

commit 8c2bc60820783f76c9421d615d3828a88008ca96
Author: Abhishek Kekane <email address hidden>
Date: Fri Dec 6 10:35:55 2019 +0000

    Staging area not cleared if image is deleted while importing

    If multiple stores configured in glance and Image is deleted while import
    operation is in progress then image data stays in staging area
    (filesystem backend) and there is no other way than clearing it
    manually.

    Modified delete method to delete the data from staging area if image is
    deleted while import operation is in progress.

    Change-Id: Ib58accd6514e589dccde57fe063815b1ab1ce496
    Closes-Bug: #1855417
    (cherry picked from commit 5d15f073718328380f2d847e4abfb9307536d810)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/701891

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

Reviewed: https://review.opendev.org/701891
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=149ea050cc58f39eaf9b4660bb8f0271b99d03da
Submitter: Zuul
Branch: stable/stein

commit 149ea050cc58f39eaf9b4660bb8f0271b99d03da
Author: Abhishek Kekane <email address hidden>
Date: Fri Dec 6 10:35:55 2019 +0000

    Staging area not cleared if image is deleted while importing

    If multiple stores configured in glance and Image is deleted while import
    operation is in progress then image data stays in staging area
    (filesystem backend) and there is no other way than clearing it
    manually.

    Modified delete method to delete the data from staging area if image is
    deleted while import operation is in progress.
    Conflicts:
            glance/api/v2/images.py
            glance/async_/flows/api_image_import.py
            glance/common/store_utils.py

    NOTE: Conflicts occured due to reserved store capability is not
    available in Stein.

    Change-Id: Ib58accd6514e589dccde57fe063815b1ab1ce496
    Closes-Bug: #1855417
    (cherry picked from commit 5d15f073718328380f2d847e4abfb9307536d810)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 18.0.1

This issue was fixed in the openstack/glance 18.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 19.0.1

This issue was fixed in the openstack/glance 19.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 20.0.0.0b2

This issue was fixed in the openstack/glance 20.0.0.0b2 development milestone.

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.