Include error message in instance faults
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Davanum Srinivas (DIMS) | ||
Folsom |
Fix Released
|
Low
|
melanie witt |
Bug Description
When nova compute throws an exception while trying to create a vm instance, information about the exception is put into the "instance_faults" database table. That table has a message column. That column is getting filled in with the exception class name and not with the exception message.
Here is a little more detail of what I am trying to do:
I want to have my application that is using OpenStack to be able to show the root cause of why OpenStack could not create a vm. I do a "nova boot ..." call to create a vm instance. If that fails to get created properly I want to display the reason back to the user. I was expecting that I would be able to get a message with the cause when I did a "nova show vm-name" call. That call contains fault information. Without this bug fix I get information like this:
| fault | {u'message': u'RemoteError', u'code': 500, u'created': u'2012-
The 'RemoteError' is the class name of the exception that was thrown.
Instead I would like to get an error line like this:
| fault | {u'message': u'Zero floating ips available.', u'code': 500, u'created': u'2012-
The "Zero floating ips available" is the message that the RemoteError exception contains.
The instance_faults table has a code, message, and details columns (along with some others). For the case I have they get filled in like this:
message: RemoteError
code: 500
details: RemoteError: Zero floating ips available followed by the full stack trace
I don't want to have to parse out the message from the stack trace, so the details field will not help me. I am hoping that OpenStack can change the message field in the database to be one of two things:
1. the exception message only. For example: "Zero floating ips available"
2 the class name followed by the exception message. For example: "RemoteError: Zero floating ips available"
With one of those changes I will be able to get the error message that explains why the vm was not created with the REST call that does the equivalent of the "nova show vm-name" command and show the message to the user so they will know what went wrong.
I have attached a patch file that shows the change in the nova/compute/
Changed in nova: | |
assignee: | nobody → Davanum Srinivas (dims-v) |
status: | Incomplete → In Progress |
Changed in nova: | |
status: | In Progress → Incomplete |
Changed in nova: | |
status: | Incomplete → In Progress |
Changed in nova: | |
milestone: | none → grizzly-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-1 → 2013.1 |
This looks like a nice patch Bill, thanks!
Can you submit it via gerrit?
http:// wiki.openstack. org/GerritWorkf low