From: John Griffith Date: Mon, 29 Jul 2013 15:11:35 +0000 (-0600) Subject: Add more info to delete error message. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e5d55592974a2784fa57da6b1ec699b5e15e1068;p=openstack-build%2Fcinder-build.git Add more info to delete error message. 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 --- diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 2fe3290ff..25d3074bc 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -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":