]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixed a volume creation re-schedule error
authorLiang Chen <cbjchen@cn.ibm.com>
Fri, 5 Apr 2013 14:00:39 +0000 (22:00 +0800)
committerChuck Short <chuck.short@canonical.com>
Wed, 10 Apr 2013 13:54:37 +0000 (08:54 -0500)
Don't see any reason to construct a list for request_spec['volume_id'].
And it indeed causes problems when the scheduler receives a reschedule
request with such a request_spec.

Fixes bug #1164857

Change-Id: I811e957d5bf9c814165d55ea0042833ea72c8de5
(cherry picked from commit 46b2a7dd3224c4ed00457520b95569442386d273)

cinder/volume/manager.py

index fa7e23bd7677691e48554b158c623bcd443ca0c7..cdea1a071c52d03d9736cab031d8c7d02c90d4e6 100644 (file)
@@ -368,7 +368,7 @@ class VolumeManager(manager.SchedulerDependentManager):
             LOG.debug(_("No request spec, will not reschedule"))
             return
 
-        request_spec['volume_id'] = [volume_id]
+        request_spec['volume_id'] = volume_id
 
         LOG.debug(_("volume %(volume_id)s: re-scheduling %(method)s "
                     "attempt %(num)d") %