xenapi: cached images should be cleaned up by time

Bug #1481689 reported by Sulochan Acharya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Stephen Finucane

Bug Description

For xenapi driver, there needs to be some way to delete cached images based on when they were created.

Here is a use case:

Operators often change images frequently for updates etc, if an image has cache_in_nova flag set, xapi will cache it in the SR.
However, the cleanup method, can only handle cleanup of cache that are not used (which is fair enough) but a lot of the times we don't want to clean new images even when they are not used, so there needs to be a way to delete image based on when they were cached.

One approach, for example, could be that we set created timestamp on the image, and be able to delete images depending on when they were cached etc.

Tags: xenserver
Changed in nova:
assignee: nobody → Sulochan Acharya (sulochan-acharya)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: xenserver
Revision history for this message
Sujitha (sujitha-neti) wrote :

It's been a while since this bug was assigned and no patch was submitted. Moving it to unassigned.

Sulochan Acharya, please reassign yourself if you are working on this.

Changed in nova:
assignee: Sulochan Acharya (sulochan-acharya) → nobody
Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

Looks like we can set the created time and proposal keeping time in VDI's other-config. Basing on these two time parameters to determine if should clean the cached images which is not used at the moment.

Changed in nova:
assignee: nobody → Jianghua Wang (wjh-fresh)
status: Confirmed → In Progress
Changed in nova:
assignee: Jianghua Wang (wjh-fresh) → Naichuan Sun (naichuans)
Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in nova:
status: In Progress → Confirmed
assignee: Naichuan Sun (naichuans) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Found open reviews for this bug in gerrit, setting to In Progress.

review: https://review.openstack.org/465954 in branch: master

Changed in nova:
status: Confirmed → In Progress
assignee: nobody → Naichuan Sun (naichuans)
no longer affects: os-xenapi
Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

removed affects on os-xenapi as this fix should be nova only. We can't move this clean-up script to os-xenapi due to this script has dependence on nova/virt/xenapi/vm_utils.py

Changed in nova:
assignee: Naichuan Sun (naichuans) → Jianghua Wang (wjh-fresh)
Changed in nova:
assignee: Jianghua Wang (wjh-fresh) → Naichuan Sun (naichuans)
Changed in nova:
assignee: Naichuan Sun (naichuans) → Stephen Finucane (stephenfinucane)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/465954
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=693ace79fbf856967684f11dfd7663d465dbe19a
Submitter: Zuul
Branch: master

commit 693ace79fbf856967684f11dfd7663d465dbe19a
Author: naichuans <email address hidden>
Date: Thu May 18 13:01:06 2017 +0000

    xenapi: cached images should be cleaned up by time

    For xenapi driver, there needs to be some way to delete cached
    images based on when they were created. add an optional arg to
    control delete operation.

    Change-Id: I24fc45e989aa951aab55a261fce77f7e3667d988
    Closes-bug: 1481689

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b2

This issue was fixed in the openstack/nova 17.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.