Bug 1125782 - [RFE][cinder]: Cinder Error messages are more generic, need to display messages returned by driver classes
Summary: [RFE][cinder]: Cinder Error messages are more generic, need to display messag...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/cind...
Whiteboard: upstream_milestone_next upstream_defi...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-01 04:05 UTC by RHOS Integration
Modified: 2015-11-20 19:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 17:24:05 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2014-08-01 04:05:45 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/cinder/+spec/cinder-api-error-msgs.

Description:


When a storage driver returns any error message, the text from driver exception (exception.msg) can be displayed on APIs response, for better usability.

For example:
When a volume attached to the Virtual Machine managed by a cloud manager is removed from storage backend and, if user performs any operation on the volume (like Detach or Resize), storage driver returns an Exception with specific message text that indicates what really went wrong(like Volume does not exist etc.). However, Cinder API layer does not return this and instead returns a very generic Internal Server Error 500.
If cinder api layer can display that error message along with 500 error code, that would help user understand what exactly happened beneath. 


Sample error trace for an operation to detach a volume that is already deleted:
2014-07-21 15:00:52.499 19194 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 869, in terminate_connection
2014-07-21 15:00:52.499 19194 TRACE oslo.messaging.rpc.dispatcher     raise exception.VolumeBackendAPIException(data=err_msg)
2014-07-21 15:00:52.499 19194 TRACE oslo.messaging.rpc.dispatcher VolumeBackendAPIException: CN-1F54842 Bad or unexpected response from the storage volume backend API: CN-3807FD2 Unable to terminate volume connection: CN-1F54842 Bad or unexpected response from the storage volume backend API: CN-A3B1CA4 CLI Exception output:

While the above message displays "Unable to terminate...", the actual error returned from cinder driver is something like this: "  The specified object does not exist, or the name supplied does not meet the naming rules"

Apparently, it helps to return this error message to end user so that it makes more vivid as to what really went wrong here

Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.