enable cloning for glance rbd-backed image

Registered by ling-yun

Currently when using rbd driver, cinder downloads the glance
image to local disk and then copies it again into rbd. This can be very
slow for large images, and wastes bandwidth as well as disk space.
When the glance image is stored in the same ceph cluster, the data is
being pulled out and pushed back in unnecessarily. Instead, create a
copy-on-write clone of the image. This is fast, and does not depend on
the size of the image. Instead of taking minutes, booting takes seconds,
and is not limited by the disk copy.

Add some rbd utility functions to support cloning from glance rbd-back image.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
ling-yun
Direction:
Needs approval
Assignee:
ling-yun
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
ling-yun

Related branches

Sprints

Whiteboard

Cinder has had rbd cloning from images since cinder could create volumes from images.

What are you looking for here? The description is just copied from a nova bug...

By looking into rbd driver, I found that copy_image_to_volume function first use command "rbd export" to export image as a local file and then upload the local file to glance.
So I think rbd still not implement the clone function.
Sorry by make this mistake. I will mark it as obsolete.
---- ling-yun

This is still an issue, I'm working on a patch that will clone from pool-pool. How would you like me to proceed?
--- Josh Zojonc

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.