Flatten volume from glance rbd image for cinder rbd backend

Registered by Hyun Ha

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 'glance image-->rbd snap of glance image-->clone image(=volume from image)'' like below.

# rbd info volume-ac1cc55d-ba36-42c6-b533-4b5e71ffd1e2 -p cinder-volumes
rbd image 'volume-ac1cc55d-ba36-42c6-b533-4b5e71ffd1e2':
 size 20480 MB in 5120 objects
 order 22 (4096 kB objects)
 block_name_prefix: rbd_data.e0a167539c874
 format: 2
 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
 flags:
 parent: glance-images/8954bdf3-8ad7-4fff-be79-a3dd62a341d0@snap
 overlap: 2252 MB

If we want to remove the dependencies, we should flatten the clone image.
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.
and it is also necessary to call _flatten in clone_image method.

Blueprint information

Status:
Started
Approver:
Hyun Ha
Priority:
Undefined
Drafter:
Hyun Ha
Direction:
Needs approval
Assignee:
Hyun Ha
Definition:
Approved
Series goal:
Proposed for ocata
Implementation:
Started
Milestone target:
None
Started by
Hyun Ha

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/400100
    Flatten volume from glance rbd image

Addressed by: https://review.openstack.org/616482
    Flatten volume from glance rbd image

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.