From: Liang Chen <cbjchen@cn.ibm.com>
Date: Fri, 5 Apr 2013 14:00:39 +0000 (+0800)
Subject: Fixed a volume creation re-schedule error
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e1c153ce6dc800a471d53953d73c6a709908e989;p=openstack-build%2Fcinder-build.git

Fixed a volume creation re-schedule error

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)
---

diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py
index fa7e23bd7..cdea1a071 100644
--- a/cinder/volume/manager.py
+++ b/cinder/volume/manager.py
@@ -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") %