From 0a87ff988cd21586daeb6ed886e44aedaa49c320 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20Gagne=CC=81?= Date: Fri, 30 Aug 2013 21:59:59 -0400 Subject: [PATCH] Clone volume with right size with SolidFire 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 --- cinder/volume/drivers/solidfire.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index ad30dd2cd..8b3c5b2f7 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -349,6 +349,7 @@ class SolidFireDriver(SanISCSIDriver): 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) -- 2.45.2