v2 API image DELETE leaves images in store

Bug #1039897 reported by IWAMOTO Toshihiro on 2012-08-22
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
High
Andrew Melton

Bug Description

ImagesController.delete only deletes image from DB.
It should call delete_from_backend (or similar) to clean up images in backends.

Alex Meade (alex-meade) on 2012-08-23
Changed in glance:
assignee: nobody → Alex Meade (alex-meade)
status: New → In Progress
Changed in glance:
assignee: Alex Meade (alex-meade) → Andrew Melton (andrew-melton)

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

Brian Waldon (bcwaldon) on 2012-08-29
Changed in glance:
importance: Undecided → High
milestone: none → folsom-rc1
Changed in glance:
assignee: Andrew Melton (andrew-melton) → Brian Waldon (bcwaldon)
Brian Waldon (bcwaldon) on 2012-09-03
Changed in glance:
assignee: Brian Waldon (bcwaldon) → Andrew Melton (andrew-melton)

Reviewed: https://review.openstack.org/12022
Committed: http://github.com/openstack/glance/commit/d43666bce77bdc67146c23663b8a21746d7d41ce
Submitter: Jenkins
Branch: master

commit d43666bce77bdc67146c23663b8a21746d7d41ce
Author: Alex Meade <email address hidden>
Date: Mon Aug 27 14:00:59 2012 -0400

    Delete image from backend store on delete.

    Two things have been done for this patch, schedule_delete_from_backend has
    been split into two functions: safe_delete_from_backend and
    schedule_delayed_delete_from_backend. If the API is not configured for
    depalyed delete safe_delete_from_backend is called, which immidiately
    deletes the image from the backend store and status set to deleted.
    Likewise, if the API is configured for delayed delete,
    schedule_delayed_delete_from_backend will be called which writes out a new
    file in the scrubber_datadir named with the image id and containing the
    backend uri and delete time. The image's status is then set to pending_delete
    and the scrubber will then delete the image at the appropriate time.
    The other main change is pulling the status updates out of the backend delete
    functions. In this case they are done in the API after each respective type
    of delete. All other changes were around testing and dependancy injection,
    specifically the ability to inject a fake StoreAPI.

    Fixes bug 1039897

    Change-Id: I8a13b8c302b13ba219b1edcc128d02481ed7666e

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-09-11
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-rc1 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers