Skip to content

Commit

Permalink
Pass MB size on copy_volume_data call copy_volume
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Bill Owen committed Aug 28, 2013
1 parent fdd9b62 commit 473b429
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cinder/volume/driver.py
Expand Up @@ -271,9 +271,10 @@ def copy_volume_data(self, context, src_vol, dest_vol, remote=None):
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():
Expand Down

0 comments on commit 473b429

Please sign in to comment.