[Yahoo-eng-team] [Bug 1558866] Re: Architecture ValueError Uncaught API Exception
** Changed in: nova/mitaka 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/1558866 Title: Architecture ValueError Uncaught API Exception Status in OpenStack Dashboard (Horizon): Opinion Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) liberty series: Fix Released Status in OpenStack Compute (nova) mitaka series: Fix Released 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1558866] Re: Architecture ValueError Uncaught API Exception
** Changed in: nova/liberty 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/1558866 Title: Architecture ValueError Uncaught API Exception Status in OpenStack Dashboard (Horizon): Opinion Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) liberty series: Fix Released Status in OpenStack Compute (nova) mitaka series: Fix Committed 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1558866] Re: Architecture ValueError Uncaught API Exception
Reviewed: https://review.openstack.org/295395 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=52b165bf1cf019353cd90b427ac3dd9991de48c7 Submitter: Jenkins Branch:master commit 52b165bf1cf019353cd90b427ac3dd9991de48c7 Author: Matt RiedemannDate: Mon Mar 21 12:31:19 2016 -0400 Return 400 on boot for invalid image metadata Horizon allows a free-form input field for architecture when creating an image. However, the architecture in the image metadata is validated against nova.compute.arch.ALL so when converting the image metadata in the compute API boot validation, if we hit a ValueError we should raise an appropriate exception so the REST API will return a 400 rather than a 500. Change-Id: Ib01b4b088fec065c671f83f5912e928b4d7fec71 Closes-Bug: #1558866 ** Changed in: nova Status: In Progress => 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/1558866 Title: Architecture ValueError Uncaught API Exception Status in OpenStack Dashboard (Horizon): Opinion Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) liberty series: Confirmed Status in OpenStack Compute (nova) mitaka series: 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1558866] Re: Architecture ValueError Uncaught API Exception
Russell, I have a fix up for the nova API validation part, I just need to write a functional test for it. If you could validate that patch resolves your issue it'd be helpful. ** Changed in: horizon Status: New => Opinion -- 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): Opinion Status in OpenStack Compute (nova): In Progress Status in OpenStack Compute (nova) liberty series: Confirmed Status in OpenStack Compute (nova) mitaka series: 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1558866] Re: Architecture ValueError Uncaught API Exception
** Tags added: liberty-backport-potential ** Also affects: nova/liberty Importance: Undecided Status: New ** Also affects: nova/mitaka Importance: Undecided Status: New ** Changed in: nova/mitaka Status: New => Confirmed ** Changed in: nova/liberty Status: New => Confirmed ** Changed in: nova Importance: Low => Medium ** Changed in: nova/mitaka Importance: Undecided => Medium ** Changed in: nova/liberty Importance: Undecided => Medium ** Tags added: mitaka-backport-potential -- 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): In Progress Status in OpenStack Compute (nova) liberty series: Confirmed Status in OpenStack Compute (nova) mitaka series: 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp