From: Zhiteng Huang Date: Fri, 30 Aug 2013 18:59:47 +0000 (+0800) Subject: Move comment back to right place X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3e69b7ce2edcd81f0f0dec47e3dea68985080065;p=openstack-build%2Fcinder-build.git 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 --- 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'])