Cinder Error messages are more generic, need to display messages returned by driver classes
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.
2014-07-21 15:00:52.499 19194 TRACE oslo.messaging.
2014-07-21 15:00:52.499 19194 TRACE oslo.messaging.
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:
- next
- Started by
- Completed by
- Sean McGinnis
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