From e5d55592974a2784fa57da6b1ec699b5e15e1068 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Mon, 29 Jul 2013 09:11:35 -0600 Subject: [PATCH] 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 --- cinder/volume/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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": -- 2.45.2