← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1558866] Re: Architecture ValueError Uncaught API Exception

 

The valid architectures for an image in nova are defined here:

https://github.com/openstack/nova/blob/13.0.0.0rc1/nova/compute/arch.py#L72

I've added Horizon to this bug report since Horizon could create a
dropdown box using that list (although horizon might not be able to
import that code and it's not available in the API/CLI, so it might just
have to be copied into horizon and kept synchronized with nova).

For nova, we could do some image property validation for the
architecture in the API so we could fail with a better error than what
you get from the compute side when spawn fails.

** Also affects: horizon
   Importance: Undecided
       Status: New

** Changed in: nova
       Status: New => Confirmed

** Changed in: nova
   Importance: Undecided => Low

** Tags added: api images

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

Title:
  Architecture ValueError Uncaught API Exception

Status in OpenStack Dashboard (Horizon):
  New
Status in OpenStack Compute (nova):
  Confirmed

Bug description:
  If an image is imported with an invalid Architecture, instances are
  unable to launch and cause a ValueError exception. This exception is
  only visible in logs and UI only tells user an exception occurred.
  Running Mirantis Openstack 8.0 (nova-api 2:12.0.0-1~u14.04+mos43)

  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/objects/image_meta.py", line 457, in from_dict
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions     obj._set_attr_from_legacy_names(image_props)
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/objects/image_meta.py", line 388, in _set_attr_from_legacy_names
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions     setattr(self, new_key, image_props[legacy_key])
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 72, in setter
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions     field_value = field.coerce(self, name, value)
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/oslo_versionedobjects/fields.py", line 189, in coerce
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions     return self._type.coerce(obj, attr, value)
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/objects/fields.py", line 87, in coerce
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions     raise ValueError(msg)
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions ValueError: Architecture name 'x64' is not valid
  2016-03-18 01:13:35.846 28025 ERROR nova.api.openstack.extensions
  2016-03-18 01:13:35.848 28025 INFO nova.api.openstack.wsgi [req-f56ff830-6e2d-46ab-b1a3-50f021725374 813401d7df1d4ad68388dee16def6a6b 9e90e9d0bb8c43b3a6fa3d2b1fb08efa - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

  Reproduce:
  Import image with architecture named 'x64' (or presumably anything, since it's a freeform input), try to launch instance of image.

  Expected Result:
  Image launches, or if it cannot and error is needed, error should tell user there is an invalid architecture. If architecture can only be chosen from limited options, it should probably be a combobox rather than a freeform input when creating a new image.

  Actual Result:
  Generic API exception. Image fails to launch.

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


References