Cinder Error messages are more generic, need to display messages returned by driver classes

Registered by Prashanth Pedduri

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

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Prashanth Pedduri
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Not started
Milestone target:
milestone icon next
Completed by
Sean McGinnis

Related branches

Sprints

Whiteboard

(smcginnis): Marking obsolete as this has been sitting out there for a long time. If this is still needed, please submit a new bp.

We see similar ambiguity in messages returned for various operations besides what is quoted above. It really helps if we can send the actual reason for failure than to send generic 500 error as 500 error has a vast list of reasons to occur.

This issue is more generic in nature and is just not confined to cinder alone. We see similar ambiguous error messages for other components like neutron, compute too

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.