Bug 1062022

Summary: [RFE][nova]: Copy-on-write cloning for rbd-backed disks
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: openstack-novaAssignee: Pádraig Brady <pbrady>
Status: CLOSED ERRATA QA Contact: Yogev Rabl <yrabl>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abelopez, chricker, ddomingo, jdonohue, jkleinpe, markmc, mrussell, ndipanov, nlevine, pbrady, sclewis, sgordon, yeylon, yrabl
Target Milestone: z3Keywords: FutureFeature, Triaged, ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/rbd-clone-image-handler
Whiteboard: upstream_milestone_juno-3 upstream_definition_approved upstream_status_implemented
Fixed In Version: openstack-nova-2014.1.3-7.el6ost openstack-nova-2014.1.3-7.el7ost Doc Type: Enhancement
Doc Text:
Copy-on-Write cloning for RBD-backed disks is now supported. As such, the Compute service no longer needs to download a glance image to local disk and then copy it again to RBD. Rather, disks can now be efficiently created directly in the Ceph system, thereby speeding up the creation of instances and, in the process, saving bandwidth and disk space.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-02 15:14:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1166033    
Bug Blocks: 1111295, 1152637, 1154159, 1158178, 1158198, 1160408, 1163445    

Description RHOS Integration 2014-02-06 05:01:02 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/rbd-clone-image-handler.

Description:

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.

The image handler framework enables transfering an image from glance to an abstract backend, not just a local file, so use that to implement cloning by adding a handler that detects when rbd is in use by both nova and glance, and creates a copy-on-write clone instead of downloading the image to a file.

Specification URL (additional information):

None

Comment 1 Pádraig Brady 2014-06-20 15:25:11 UTC
This performance enhancement missed icehouse, so proposing for 5.0.z backport

The current patches associated with this are:

https://review.openstack.org/94293
  refactor libvirt RBD utilities to a new file

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

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

Comment 2 Abel Lopez 2014-10-13 17:52:32 UTC
Also need to track https://bugs.launchpad.net/nova/+bug/1346525 as snapshots of instances that use RBD unnecessarily download the image first, then upload to glance.

Comment 3 Pádraig Brady 2014-10-30 13:21:17 UTC
*** Bug 1158698 has been marked as a duplicate of this bug. ***

Comment 4 Pádraig Brady 2014-10-30 13:30:31 UTC
*** Bug 1158699 has been marked as a duplicate of this bug. ***

Comment 5 Pádraig Brady 2014-10-30 13:32:23 UTC
*** Bug 1158703 has been marked as a duplicate of this bug. ***

Comment 6 Pádraig Brady 2014-10-30 14:15:21 UTC
*** Bug 1158186 has been marked as a duplicate of this bug. ***

Comment 7 Pádraig Brady 2014-10-30 14:35:07 UTC
*** Bug 1158191 has been marked as a duplicate of this bug. ***

Comment 8 Pádraig Brady 2014-10-30 14:50:01 UTC
For reference an icehouse branch with these patches is at https://github.com/angdraug/nova/tree/rbd-ephemeral-clone-stable-icehouse

Comment 9 Pádraig Brady 2014-10-30 14:51:14 UTC
*** Bug 1158196 has been marked as a duplicate of this bug. ***

Comment 10 Pádraig Brady 2014-11-12 22:54:47 UTC
Abel I'm separating out https://review.openstack.org/#/c/125963/ 
(https://blueprints.launchpad.net/nova/+spec/implement-rbd-snapshots-instead-of-qemu-snapshots) to bug 1163521 as it's a separate blueprint upstream, which has not been approved yet, and also needs a corresponding change to glance.

Comment 11 Pádraig Brady 2014-11-13 11:12:43 UTC
*** Bug 1158177 has been marked as a duplicate of this bug. ***

Comment 12 Pádraig Brady 2014-11-13 11:29:22 UTC
*** Bug 1158189 has been marked as a duplicate of this bug. ***

Comment 13 Pádraig Brady 2014-11-13 20:07:00 UTC
*** Bug 1160407 has been marked as a duplicate of this bug. ***

Comment 16 Yogev Rabl 2014-11-23 15:57:59 UTC
verified. 
1. uploading a new image to Glance (using rbd store)
2. launching a new instance from the newly uploaded image 
3. checked the space used in the Ceph - no additional space is been used.

Comment 18 Joe Donohue 2014-11-25 20:58:21 UTC
*** Bug 1158198 has been marked as a duplicate of this bug. ***

Comment 20 errata-xmlrpc 2014-12-02 15:14:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2014-1932.html

Comment 21 Pádraig Brady 2014-12-04 13:01:24 UTC
*** Bug 1123171 has been marked as a duplicate of this bug. ***