EQLX: Extend of snapshot or clone failure

When creating a volume from a snapshot or cloning an existing
volume the driver first creates a new volume of the original
size, then extends the volume if needed to meet the requested
size. The extend call in these operations were passing the
wrong arguments into the extend_volume call, resulting in an
exception being thrown.

Change-Id: I503543fc45a0607d295a2ebe3602436857fc8ff8
Closes-bug: #1598148
This commit is contained in:
Sean McGinnis 2016-07-01 07:53:24 -05:00
parent c249ccbe37
commit a337fb3f80
2 changed files with 3 additions and 3 deletions

View File

@ -186,7 +186,7 @@ class DellEQLSanISCSIDriverTestCase(test.TestCase):
with mock.patch.object(self.driver,
'extend_volume') as mock_extend_volume:
mock_eql_execute.configure_mock(**mock_attrs)
mock_eql_execute.return_value = volume
mock_eql_execute.return_value = self.fake_iqn_return
mock_extend_volume.return_value = self.fake_iqn_return
model_update = self.driver.create_volume_from_snapshot(
volume, snapshot)

View File

@ -529,7 +529,7 @@ class DellEQLSanISCSIDriver(san.SanISCSIDriver):
'clone', volume['name'])
# Extend Volume if needed
if out and volume['size'] > snapshot['volume_size']:
out = self.extend_volume(out, volume['size'])
self.extend_volume(volume, volume['size'])
LOG.debug('Volume from snapshot %(name)s resized from '
'%(current_size)sGB to %(new_size)sGB.',
{'name': volume['name'],
@ -552,7 +552,7 @@ class DellEQLSanISCSIDriver(san.SanISCSIDriver):
# Extend Volume if needed
if out and volume['size'] > src_vref['size']:
out = self.extend_volume(out, volume['size'])
self.extend_volume(volume, volume['size'])
self.add_multihost_access(volume)
return self._get_volume_data(out)