From 3e69b7ce2edcd81f0f0dec47e3dea68985080065 Mon Sep 17 00:00:00 2001 From: Zhiteng Huang Date: Sat, 31 Aug 2013 02:59:47 +0800 Subject: [PATCH] Move comment back to right place The comment about skipping schedule for create volume from snapshot in cast_create_volume() was mis-placed when this code was ported to taskflow. This patch moves the comment back to where it belongs. Change-Id: I329c78a05143bf8589d9665dc4ff03fa80da6ec9 --- cinder/volume/flows/create_volume/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cinder/volume/flows/create_volume/__init__.py b/cinder/volume/flows/create_volume/__init__.py index b0e0a6a1e..f9227f329 100644 --- a/cinder/volume/flows/create_volume/__init__.py +++ b/cinder/volume/flows/create_volume/__init__.py @@ -688,11 +688,6 @@ class VolumeCastTask(base.CinderTask): 'volume_properties']) def _cast_create_volume(self, context, request_spec, filter_properties): - # NOTE(Rongze Zhu): A simple solution for bug 1008866. - # - # If snapshot_id is set, make the call create volume directly to - # the volume host where the snapshot resides instead of passing it - # through the scheduler. So snapshot can be copy to new volume. source_volid = request_spec['source_volid'] volume_id = request_spec['volume_id'] snapshot_id = request_spec['snapshot_id'] @@ -700,6 +695,11 @@ class VolumeCastTask(base.CinderTask): host = None if snapshot_id and CONF.snapshot_same_host: + # NOTE(Rongze Zhu): A simple solution for bug 1008866. + # + # If snapshot_id is set, make the call create volume directly to + # the volume host where the snapshot resides instead of passing it + # through the scheduler. So snapshot can be copy to new volume. snapshot_ref = self.db.snapshot_get(context, snapshot_id) source_volume_ref = self.db.volume_get(context, snapshot_ref['volume_id']) -- 2.45.2