ceph rbd flatten clone image

Registered by Maximiliano Osorio on 2016-04-01

NOTE: this has been proposed and abandoned several times. Two spec patches:
https://review.opendev.org/#/c/400100/
https://review.opendev.org/#/c/616482/

Please read through the comments on those and on bug 1374256 before re-proposing.

Suppose glance and cinder uses ceph rbd driver as storage backend, cinder and glance are in the same ceph storage cluster.

If cinder creates a volume from an image, it could create a clone volume from that image, and the relationship is image-->clone snapshot-->clone image.
If we want a higher performance rbd image than the clone image, we should flatten the clone image to meet the application requirements.

So it’s necessary to add a config option named rbd_flatten_volume_from_image to decide whether to flatten rbd clone image or not. If rbd clone image was flattened, cinder should also delete the clone_snap.

Note:
If you’re using glance and cinder with rbd and show_direct_url=False, cinder has to download the image (you can see it at [1]). That isn't efficient.
Using show_direct_url=true and rbd_flatten_volume_from_image=True, cinder can directly fetch the image from rbd using the url.
[1] http://paste.openstack.org/show/492690/ - image_utils.TemporaryImages.fetch

Blueprint information

Status:
Not started
Approver:
Sean McGinnis
Priority:
Medium
Drafter:
Maximiliano Osorio
Direction:
Needs approval
Assignee:
Maximiliano Osorio
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/300286
    Add a config option named rbd_flatten_volume_from_image to decide whether to flatten rbd clone image or not

Addressed by: https://review.openstack.org/300211
    Add a config option named rbd_flatten_volume_from_image

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.