Create volume from image does not convert with ceph
Bug #1247998 reported by
Matt Edlefsen
This bug affects 8 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
Dmitry Borodaenko |
Bug Description
When creating a volume from image using the RBD backend for cinder, the image will be copied directly and not converted even if the image is not raw (e.g. qcow2). This causes mounting and booting to fail as the volume is not raw.
The problem, I think, is in clone_image in the RBD volume driver, which doesn't check the type of the source image and doesn't convert it. It is called from CreateVolumeFro
tags: | added: ceph-rbd drivers |
Changed in cinder: | |
importance: | Undecided → High |
Changed in cinder: | |
assignee: | Edward Hope-Morley (hopem) → Dmitry Borodaenko (dborodaenko) |
tags: |
added: ceph rbd removed: ceph-rbd |
Changed in cinder: | |
milestone: | none → icehouse-2 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | icehouse-2 → 2014.1 |
To post a comment you must log in.
Couple of additional notes:
This is on a fully updated ubuntu 13.10 install with openstack 1:2013.2-0ubuntu1.
At least on the latest ubuntu, qemu-img supports rbd: paths in qemu-img info and convert. The easiest solution then I think would be to check the image type using qemu-img info and just "return None, False" if it isn't raw.
It could also do the conversion without temp files by passing rbd: paths to qemu-img convert. Somewhat oddly though on my system exporting to a temp file, doing qemu-img convert, and then importing back into rbd is about twice as fast as doing qemu-img convert directly with rbd paths.
The other feature that would be useful would be creating a "shadow" copy of the image that is in raw form so that multiple volumes cloned from the same image could take advantage of COW even for non-raw images (qcow2 seems to be what most things are available for download in).
I might take a crack at implementing this but I'll need to setup a dev version of openstack first :/