]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Pass MB size on copy_volume_data call copy_volume
authorBill Owen <billowen@us.ibm.com>
Wed, 28 Aug 2013 22:54:54 +0000 (15:54 -0700)
committerBill Owen <billowen@us.ibm.com>
Wed, 28 Aug 2013 22:54:59 +0000 (15:54 -0700)
Modify cinder/volume/driver.py method copy_volume_data
to pass size in MB when calling cinder/volume/utils/copy_volume.py

Closes-Bug #1218054

Change-Id: I5430f015ef0f0077b4794f1ff458e3f54cc4dc06

cinder/volume/driver.py

index 9dbf3778e425cd5f112f6a1d0501958e3440f319..83d172933f39bf4f90bf19c97bfd1a7d17d5b76f 100644 (file)
@@ -271,9 +271,10 @@ class VolumeDriver(object):
                                                force=True)
 
         try:
+            size_in_mb = int(src_vol['size']) * 1024    # vol size is in GB
             volume_utils.copy_volume(src_attach_info['device']['path'],
                                      dest_attach_info['device']['path'],
-                                     src_vol['size'])
+                                     size_in_mb)
             copy_error = False
         except Exception:
             with excutils.save_and_reraise_exception():