Storage: Copy-on-write cloning for rbd-backed disks

Registered by Josh Durgin

Currently rbd-backed ephemeral disks are created by downloading an image from glance to a local file, then uploading that file into rbd. Even if the file is cached. uploading may take a long time, since 'rbd import' is synchronous and slow. If the image is stored in rbd already by glance, there's no need for any local copies - it can be cloned to a new image for a new disk without copying the data at all.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Medium
Drafter:
Josh Durgin
Direction:
Approved
Assignee:
Josh Durgin
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
Josh Durgin
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

Addressed by: https://review.openstack.org/#/c/59148/
    Move libvirt RBD utilities to a new file
Addressed by: https://review.openstack.org/#/c/59149/
    enable cloning for rbd-backed ephemeral disks

What will happen if the image being removed from glance (rbd storage backed) by admin/operator which acting a "linked" base image used by some provisioned instances dealed with RBDCloneImageHandler (#59149 added)? Do you think we need to protect and provent the image to be deleted which been used by Nova as the CoW base? -- zhiyan

rbd handles that internally with a concept of protected snapshots, which the glance store uses - see http://ceph.com/docs/master/dev/rbd-layering/
-jdurgin 05 Feb

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

Addressed by: https://review.openstack.org/59149
    enable cloning for rbd-backed ephemeral disks

This was merged, then reverted in icehouse. It will be respun for Juno based on the older patch (https://review.openstack.org/#/c/46879/) with no dependency on image-multiple-locations. Once image-multiple-locations is merged it can be refactored into an image handler, but it seems like much more work is being asked for now before merging image-multiple-locations again, which does not need to block this blueprint.
-jdurgin 14 Mar 14

Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)

Gerrit topic: https://review.openstack.org/#q,topic:bp/rbd-clone-image-handler,n,z

Addressed by: https://review.openstack.org/91486
    Storage: Copy-on-write cloning for RBD-backed disks

Addressed by: https://review.openstack.org/94293
    Move libvirt RBD utilities to a new file

Addressed by: https://review.openstack.org/94294
    Use library instead of CLI to cleanup RBD volumes

Addressed by: https://review.openstack.org/94295
    enable cloning for rbd-backed ephemeral disks

Addressed by: https://review.openstack.org/107908
    Add include_locations kwarg to nova.image.API.get()

The only outstanding patch related to this blueprint is https://review.openstack.org/111082:
    count image files on NFS as shared block storage
(fixes a regression for NFS backed live migrations introduced in https://review.openstack.org/91722)

I think it's time to mark this blueprint as completed.
-angdraug Aug 14

(?)

Work Items