]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
DotHill driver fix create_cloned_volume parent id
authorWalter A. Boring IV <walter.boring@hp.com>
Wed, 2 Sep 2015 02:20:32 +0000 (02:20 +0000)
committerWalter A. Boring IV <walter.boring@hp.com>
Wed, 2 Sep 2015 02:20:32 +0000 (02:20 +0000)
This patch changes how the Dothill driver finds the
parent volume id during create_cloned_volume time.
The proper place to get it is from the source volume
dict/object being passed in.

Change-Id: I7623b31d850701fe7c85eff59085197a2cd73352
Closes-Bug: 1491207

cinder/volume/drivers/dothill/dothill_common.py

index 96b098e7011b59899a2433828f1cf5db5fecccbc..6325f1f6f6922b4527030bea0b9ace8302293cb1 100644 (file)
@@ -210,13 +210,13 @@ class DotHillCommon(object):
         self._assert_enough_space_for_copy(volume['size'])
         self._assert_source_detached(src_vref)
         LOG.debug("Cloning Volume %(source_id)s to (%(dest_id)s)",
-                  {'source_id': volume['source_volid'],
+                  {'source_id': src_vref['id'],
                    'dest_id': volume['id'], })
 
         if src_vref['name_id']:
             orig_name = self._get_vol_name(src_vref['name_id'])
         else:
-            orig_name = self._get_vol_name(volume['source_volid'])
+            orig_name = self._get_vol_name(src_vref['id'])
         dest_name = self._get_vol_name(volume['id'])
 
         self.client_login()
@@ -225,7 +225,7 @@ class DotHillCommon(object):
                                     self.backend_name, self.backend_type)
         except exception.DotHillRequestError as ex:
             LOG.exception(_LE("Cloning of volume %s failed."),
-                          volume['source_volid'])
+                          src_vref['id'])
             raise exception.Invalid(ex)
         finally:
             self.client_logout()