]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix sheepdog copy_image_to_volume method
authorjohn-griffith <john.griffith@solidfire.com>
Wed, 8 Jan 2014 23:21:41 +0000 (16:21 -0700)
committerjohn-griffith <john.griffith@solidfire.com>
Wed, 8 Jan 2014 23:27:09 +0000 (16:27 -0700)
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

cinder/volume/drivers/sheepdog.py

index 7e7678f571095ba3bce18e11f50054c8bf54c645..4fda28b906e4794fa870c56a065773be2f6c8081 100644 (file)
@@ -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)