]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Move comment back to right place
authorZhiteng Huang <zhithuang@ebaysf.com>
Fri, 30 Aug 2013 18:59:47 +0000 (02:59 +0800)
committerZhiteng Huang <zhithuang@ebaysf.com>
Fri, 30 Aug 2013 19:00:58 +0000 (03:00 +0800)
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

index b0e0a6a1e49cd1d3693c58d671cbf8a519f828d9..f9227f329d3ea060f835038e2e677a1a3d619892 100644 (file)
@@ -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'])