--- a/components/openstack/cinder/patches/09-launchpad-1414867.patch Mon May 16 14:46:20 2016 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-This upstream patch addresses Launchpad bug 1414867. Although it's been
-addressed in Kilo, the patch below is still not yet released for Juno.
-
-commit 549144f754a8b3adb9d7fdfa8f8f9ee186a52f1e
-Author: wuyuting <email address hidden>
-Date: Tue Jan 27 02:50:28 2015 +0800
-
- Fetch_to_volume_format calls copy_volume using wrong parameter
-
- When creating a volume from an image, if qemu-img is not installed,
- fetch_to_volume_format will call volume_utils.copy_volume to copy
- image to volume. Copy_volume need the size of image in megabyte,
- but fetch_to_volume_format call it using size in bytes.
-
- Change-Id: Ia3b0f9168235a977a12232e27a5755ad11ec18f5
- Closes-Bug: #1414867
-
---- cinder-2014.2.2/cinder/image/image_utils.py.orig 2015-10-19 15:59:34.730112261 -0700
-+++ cinder-2014.2.2/cinder/image/image_utils.py 2015-10-19 16:02:05.982843565 -0700
-@@ -25,6 +25,7 @@
-
-
- import contextlib
-+import math
- import os
- import tempfile
-
-@@ -238,7 +239,8 @@
- LOG.debug('Copying image from %(tmp)s to volume %(dest)s - '
- 'size: %(size)s' % {'tmp': tmp, 'dest': dest,
- 'size': image_meta['size']})
-- volume_utils.copy_volume(tmp, dest, image_meta['size'], blocksize)
-+ image_size_m = math.ceil(image_meta['size'] / units.Mi)
-+ volume_utils.copy_volume(tmp, dest, image_size_m, blocksize)
- return
-
- data = qemu_img_info(tmp)