← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1013350] Re: Include error message in instance faults

 

** Changed in: nova/folsom
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1013350

Title:
  Include error message in instance faults

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) folsom series:
  Fix Released

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-05-11T20:19:41Z'}

  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-05-11T20:19:41Z'}

  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/manager.py file for option 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1013350/+subscriptions