Skip to content

Commit

Permalink
Clone volume with right size with SolidFire
Browse files Browse the repository at this point in the history
It is possible to clone a volume with a size greater than
the source volume. When using the SolidFire driver, the volume size
was not passed in the call made to the SolidFire API when
cloning a volume.

It resulted in a cloned volume having the same size as the source
volume but the correct size in the Cinder database.

This changes makes sure the cloned volume has the correct size
by explicitly passing the requested size when calling
the SolidFire API and cloning the volume.

Fixes: bug #1219105
Change-Id: I5628c7fa922780d6b0601e2daa79310a61085edc
  • Loading branch information
mgagne committed Aug 31, 2013
1 parent 432f819 commit 0a87ff9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cinder/volume/drivers/solidfire.py
Expand Up @@ -349,6 +349,7 @@ def _do_clone_volume(self, src_uuid, src_project_id, v_ref):

params = {'volumeID': int(sf_vol['volumeID']),
'name': 'UUID-%s' % v_ref['id'],
'newSize': int(v_ref['size'] * self.GB),
'newAccountID': sfaccount['accountID']}
data = self._issue_api_request('CloneVolume', params)

Expand Down

0 comments on commit 0a87ff9

Please sign in to comment.