yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #02239
[Bug 1175157] Re: Instance fault's message shouldn't have exception class name
** Changed in: nova
Status: In Progress => Invalid
--
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/1175157
Title:
Instance fault's message shouldn't have exception class name
Status in OpenStack Compute (Nova):
Invalid
Bug description:
The instance fault['message'] is displaying exception class instead of
actual exception message.
Function add_instance_fault_from_exc in compute/utils.py have to be
fixed to show detail (actual) message instead of exception class.
def add_instance_fault_from_exc(context, conductor,
instance, fault, exc_info=None):
"""Adds the specified fault to the database."""
code = 500
message = fault.__class__.__name__
if hasattr(fault, "kwargs"):
code = fault.kwargs.get('code', 500)
# get the message from the exception that was thrown
# if that does not exist, use the name of the exception class itself
message = fault.kwargs.get('value', message)
details = unicode(fault)
if exc_info and code == 500:
tb = exc_info[2]
details += '\n' + ''.join(traceback.format_tb(tb))
values = {
'instance_uuid': instance['uuid'],
'code': code,
'message': unicode(message),
'details': unicode(details),
'host': CONF.host
}
conductor.instance_fault_create(context, values)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1175157/+subscriptions