]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add more info to delete error message.
authorJohn Griffith <john.griffith@solidfire.com>
Mon, 29 Jul 2013 15:11:35 +0000 (09:11 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Mon, 29 Jul 2013 15:15:05 +0000 (09:15 -0600)
Our cases for what we allow delete on are limited, this is
fine, however we should log the status of a volume that we
are unable to delete so there's some feed-back as to exactly
why the delete call failed.

Change-Id: I95a9584d4875e188024be13bb53246be63c72374

cinder/volume/api.py

index 2fe3290ffd19aa131eb00789db0a87c51679106a..25d3074bcb9bd0106e40300c8ae158fe375e546c 100644 (file)
@@ -387,7 +387,8 @@ class API(base.Base):
             return
         if not force and volume['status'] not in ["available", "error",
                                                   "error_restoring"]:
-            msg = _("Volume status must be available or error")
+            msg = _("Volume status must be available or error, "
+                    "but current status is: %s") % volume['status']
             raise exception.InvalidVolume(reason=msg)
 
         if volume['attach_status'] == "attached":