← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1203880] Re: Fix "Include error message in instance faults" to resolve more messages

 

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

** Changed in: nova
    Milestone: None => havana-3

-- 
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/1203880

Title:
  Fix "Include error message in instance faults" to resolve more
  messages

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  The previous bug and fix for "Include error message in instance
  faults" (https://bugs.launchpad.net/nova/+bug/1013350) was merged and
  uses the exceptions kwargs['value'] to try to coerce a readable
  message out of an exception, but this only applies to very few
  exceptions.

  We should be using unicode(exception) for the error message, as that
  is the recommended way of getting an error message from an exception
  (see
  http://docs.python.org/2/library/exceptions.html#exceptions.BaseException)
  since BaseException.args and .message are deprecated as of python 2.6

  Example where resolving a message fails:

  In the first example, IOError has no .kwargs or .message attributes,
  but unicode(exception) yields the message that is the first line in
  the 'details' item.

  | fault                               | {u'message': u'IOError', u'code': 500, u'details': u'[Errno 28] No space left on device     |
  |                                     |   File "/opt/stack/nova/nova/compute/manager.py", line 228, in decorated_function           |
  |                                     |     return function(self, context, *args, **kwargs)                                         |
  |                                     |   File "/opt/stack/nova/nova/compute/manager.py", line 1668, in rebuild_instance            |
  |                                     |     block_device_info=block_device_info)                                                    |
  |                                     |   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1527, in spawn                   |
  |                                     |     admin_pass=admin_password)                                                              |
  |                                     |   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1813, in _create_image           |
  |                                     |     project_id=instance[\'project_id\'])                                                    |
  |                                     |   File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 156, in cache              |
  |                                     |     *args, **kwargs)                                                                        |
  |                                     |   File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 254, in create_image       |
  |                                     |     prepare_template(target=base, *args, **kwargs)                                          |
  |                                     |   File "/opt/stack/nova/nova/openstack/common/lockutils.py", line 232, in inner             |
  |                                     |     retval = f(*args, **kwargs)                                                             |
  |                                     |   File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 144, in call_if_not_exists |
  |                                     |     fetch_func(target=target, *args, **kwargs)                                              |
  |                                     |   File "/opt/stack/nova/nova/virt/libvirt/utils.py", line 601, in fetch_image               |
  |                                     |     images.fetch_to_raw(context, image_id, target, user_id, project_id)                     |
  |                                     |   File "/opt/stack/nova/nova/virt/images.py", line 207, in fetch_to_raw                     |
  |                                     |     fetch(context, image_href, path_tmp, user_id, project_id)                               |
  |                                     |   File "/opt/stack/nova/nova/virt/images.py", line 202, in fetch                            |
  |                                     |     image_service.download(context, image_id, image_file)                                   |
  |                                     |   File "/opt/stack/nova/nova/image/glance.py", line 284, in download                        |
  |                                     |     data.write(chunk)

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