Implement Image Caching on SolidFire using Cinder's clone_image method

Registered by John Griffith on 2014-12-18

When performing boot from Volume on none FS based devices or devices that aren't also acting as Glance Image stores, the current process goes likethis:
1. Fetch the image from Glance Store to a temp file on the Cinder Node
2. Perform a qemu-img convert on that file (convert to raw)
3. Transfer the contents of that file to the newly created Volume using dd

This process can take a while and is pretty inefficient. This BP introduces the option for Operators to enable image-caching on the SolidFire backend device.

When enabled this option will use the existing Cinder clone_image method, and will create a "Template Volume" of minimum required size on the SolidFire backend. This Volume will be created with a backend SolidFire account that can be shared among OpenStack Tenants.

When a request is received we first do a number of checks before proceeding:
1. Is Image/Template caching enabled
2. Inspect the image-metadata and verify that the image is public, or that the tenant making the request is the owner
3. Verify that the image-metadata includes the properties['virtual_size'] parameter

If the preconditions are met, create a minimal sized Volume with the requested image; then use SolidFire's clone operation to create the requested bootable Volume. During the process we also check and make sure that the image hasn't been updated since we created our cached copy, if it has we then delete the copy we have on the system and create a new one.

Due to SolidFire's de-duplication there isn't a concern for space usage here, but we could implement some limits and checks in a follow up patch just to be safe.

Blueprint information

Status:
Complete
Approver:
Mike Perez
Priority:
Low
Drafter:
John Griffith
Direction:
Approved
Assignee:
John Griffith
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
milestone icon 2015.1.0
Started by
Mike Perez on 2015-01-12
Completed by
Mike Perez on 2015-01-20

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/introduces,n,z

Addressed by: https://review.openstack.org/142859
    Implement clone_image caching on SolidFire

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.