From: john-griffith Date: Wed, 8 Jan 2014 23:21:41 +0000 (-0700) Subject: Fix sheepdog copy_image_to_volume method X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=dfefeda9cf87a8a4109c3f4e35feb5ee1d9eedff;p=openstack-build%2Fcinder-build.git Fix sheepdog copy_image_to_volume method The sheepdog driver fails when trying to create volume from image due to a bug in SheepdogDriver.copy_image_to_volume. The utils.convert method is being passed the tempfile object, but should only be passed the name of the tempfile. Change-Id: I6b261d29895bf9c2c30b2d95d74e5be58b8e9b10 Closes-Bug: 1261941 --- diff --git a/cinder/volume/drivers/sheepdog.py b/cinder/volume/drivers/sheepdog.py index 7e7678f57..4fda28b90 100644 --- a/cinder/volume/drivers/sheepdog.py +++ b/cinder/volume/drivers/sheepdog.py @@ -112,7 +112,7 @@ class SheepdogDriver(driver.VolumeDriver): # see volume/drivers/manager.py:_create_volume self._delete(volume) # convert and store into sheepdog - image_utils.convert_image(tmp, 'sheepdog:%s' % volume['name'], + image_utils.convert_image(tmp.name, 'sheepdog:%s' % volume['name'], 'raw') self._resize(volume)