Nova compute base image cleanup

Registered by David Hill

We would like to have the possibility to delete the base image from all nova-compute nodes when deleting an image from the glance server without having to rely on an expiration timer. (remove_unused_original_minimum_age_seconds)

For instance "glance purge image-id" could be used in order to delete the image from glance and then send an AMQP message in order to delete that ID from all nova-computes.

If that isn't possible, perhaps delete it from the computes where an instance was deployed using that image.

That command should be allowed to be run by an admin account only in order to avoid caching/decaching heavily used images.

Perhaps the image deletion depending on a timer should be replaced by a DB call to see if it's deleted. If the image is deleted from glance and nobody uses the base image any longer, there's
no reasons to keep it on disk ...

If the later idea is implemented, perhaps a kind of trigger could be implemented (90% of /var/lib/nova/instances/_base is used) before considering deleting cached images.

Keeping deleted images on a compute node can lead to DoS.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
David Hill
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/nova-compute-base-cleanup,n,z

Addressed by: https://review.openstack.org/127725
    Adding a cache scrubber in ImageCacheManager

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.