]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Pass correct source_id to _handle_bootable_volume_glance_meta()
authorMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Tue, 15 Mar 2016 22:56:59 +0000 (18:56 -0400)
committerMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Tue, 15 Mar 2016 23:18:38 +0000 (19:18 -0400)
When we create a new volume from existing volume which has
volume_image_metadata, volume_image_metadata was not copied
to cloned volume.

This is a regression from Liberty and the root cause of this
problem was introduced via commit
032032f0c329b4eddcbf2185399396ff4fd5f00d.

This patch fixed a problem to pass correct source_id to
_handle_bootable_volume_glance_meta().

Change-Id: Ife1e9a6a25704569f8a599d19eee893bc7c0a469
Closes-Bug: #1557783

cinder/volume/flows/manager/create_volume.py

index 4322f5f37a299e661b0fdeabf25dce3398ba10d4..91e3a5a8f0d1b78439f8ea43bf93e02acc12cf14 100644 (file)
@@ -487,7 +487,7 @@ class CreateVolumeFromSpecTask(flow_utils.CinderTask):
         # will not destroy the volume (although they could in the future).
         if srcvol_ref.bootable:
             self._handle_bootable_volume_glance_meta(
-                context, volume_ref.id, source_volid=volume_ref.id)
+                context, volume_ref.id, source_volid=srcvol_ref.id)
         return model_update
 
     def _create_from_source_replica(self, context, volume_ref,