Generic image cache functionality

Registered by Patrick East on 2015-05-12

Currently some volume drivers implement the clone_image method and use an internal cache of volumes on the backend that hold recently used images. For storage backends that can do very efficient volume clones it is a potentially large performance improvement over having to attach and copy the image contents to a each volume. To make this functionality easier for other volume drivers to use, and prevent any duplication in the code base, we should implement a more unified way to do this caching.

Blueprint information

Status:
Complete
Approver:
Mike Perez
Priority:
Medium
Drafter:
Patrick East
Direction:
Approved
Assignee:
Patrick East
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 7.0.0
Started by
Patrick East on 2015-06-03
Completed by
John Griffith on 2015-09-01

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/image-volume-cache,n,z

Addressed by: https://review.openstack.org/182520
    Generic image volume cache functionality

<jgriffith>
I've done a bit more thinking on this since the summit, combining what we want to achieve here, with the goals of folks to do things like public-snapshots for AWS compatibility I think it would be worth discussing this a bit.

It might be possible to leverage a good deal of work that already exists when doing snapshot of a volume-backed instance. That workflow takes the volume that's booted up, creates a snapshot and creates a pointer to it in Glance. Might be worth enhancing that and fixing it up a bit.

The parent hanging around is the one thing that I haven't figured out how to make it useful (so if we have snaps the parent has to be kept around), maybe it doesn't matter, but if we had something useful to do with this parent it would sure be helpful IMO. Maybe something like a nightly job that updates that parent volume with an glance-image updates that have taken place?

There's a lot of pitfalls as we discussed with public snapshots, but it may be worth the investment after all. It might also be time to reconsider a special internal cinder-tenant that is exclusively for doing "shared" types of things.

Addressed by: https://review.openstack.org/195795
    WIP generic image cache

Addressed by: https://review.openstack.org/199352
    Add Cinder internal tenant support.

Addressed by: https://review.openstack.org/201754
    Efficient image transfer for Glance cinder store

Addressed by: https://review.openstack.org/212813
    [WIP] Enable generic image cache without virtual_size

Addressed by: https://review.openstack.org/213346
    TemporaryImages to inspect image before conversion

Gerrit topic: https://review.openstack.org/#q,topic:bug/1491088,n,z

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.