]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix exception log msg in attach volume method
authorling-yun <zengyunling@huawei.com>
Fri, 17 Jan 2014 02:49:58 +0000 (10:49 +0800)
committerling-yun <zengyunling@huawei.com>
Fri, 17 Jan 2014 03:03:51 +0000 (11:03 +0800)
Attach volume happened when volume's status is attaching or available, but
the exception msg only contain info about "available". So fix it.

Change-Id: I1caf83b94b3e4158eff88871a4187041a25e5d1c
Closes-Bug: #1270020

cinder/volume/manager.py

index 3026576be9c4638c91bb90847de245c123a8a94d..1da9d01f0fb2a430b83c30582d76958520c27c9b 100644 (file)
@@ -577,7 +577,7 @@ class VolumeManager(manager.SchedulerDependentManager):
                     msg = _("being attached by different mode")
                     raise exception.InvalidVolume(reason=msg)
             elif volume['status'] != "available":
-                msg = _("status must be available")
+                msg = _("status must be available or attaching")
                 raise exception.InvalidVolume(reason=msg)
 
             # TODO(jdg): attach_time column is currently varchar