When Glance cinder store is enabled, the glance image can store locations of cinder volume. When a raw image is cinder volume backed, we can efficiently create a new volume from the image by cloning the backing volume, instead of downloading the image from Glance. We can also make upload-to-image from a volume efficient by creating a cloned volume and add its location to an image.
Note that downloading the cinder-backed image from Glance is not currently supported, but this feature is proposed. 
When the allowed_direct_url_schemes in cinder.conf contain ‘cinder’, on creating a volume from an image:
On uploading a volume to an image:
If image format is raw and image_upload_use_cinder_backend is enabled in cinder.conf, clone the volume and register its location to the image.
- If image_upload_use_internal_tenant is set to True, the cloned volume is placed in the internal tenant.
Otherwise, upload the volume data to Glance.
Generic image cache has the same effect in some situations. However, the proposed feature and generic image cache can co-exist to cover the different situations.
- Image cache does not speed up uploading, but this feature make it efficient.
- image cache can handle non-raw format images (it stores the converted image in image volumes), but this proposed feature doesn’t handle it so far.
When the cloned volume is stored in the internal tenant, it could potentially be a risk if someone was able to get a hold of its credentials or access the image-volumes. Care will have to be taken to ensure it isn’t accessible by normal users.
This improves the performance of uploading and download of the image, especially storage array can provide efficient volume cloning.
Some configuration options need to be set to enable this feature.
In Glance, cinder backend must be enabled and show_multiple_locations must be set to True.
To enabling the other components to download the cinder volume backed images, Glance should have the changes .
Documentation about how to enable this feature should be added.
|||(1, 2) Proposal for Glance to support download from/upload to Cinder backend|
|||Proposed change for Cinder|