yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #51208
[Bug 1580467] Re: instance boot with invalid availability zone raises 500 InternalServerError
Reviewed: https://review.openstack.org/315979
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=26dcd0675a584693d923cdb2aec3cc3a591cb897
Submitter: Jenkins
Branch: master
commit 26dcd0675a584693d923cdb2aec3cc3a591cb897
Author: dineshbhor <dinesh.bhor@xxxxxxxxxxx>
Date: Wed May 11 10:53:58 2016 +0000
Return HTTP 400 on boot for invalid availability zone
Currently 'nova boot' fails with 500 InternalServerError
if you pass invalid availability zone.
Caught InvalidInput exception and raised HTTPBadRequest
exception to return 400 status code.
APIImpact: Return 400 status code for invalid availability
zone.
Change-Id: I7b730e71abbcbcf9ee1f537a84646243e9a2da7c
Closes-Bug: #1580467
** 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/1580467
Title:
instance boot with invalid availability zone raises 500
InternalServerError
Status in OpenStack Compute (nova):
Fix Released
Bug description:
instance boot with invalid availability zone raises 500
InternalServerError
Steps to reproduce
==================
Command:
nova boot --flavor 1 --image 9c1618d0-a6ca-4db6-b2a9-38a9a5cc38b4 --availability-zone invalid::::zone instance1
Actual result
=============
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.InvalidInput'> (HTTP 500) (Request-ID: req-dcc9cfd6-1ea6-4e18-9acd-faccf54fdfd4)
Expected result
===============
It should give 400 HTTPBadRequest with proper error message.
n-API LOG:
2016-05-11 08:59:37.467 ERROR nova.api.openstack.extensions [req-dcc9cfd6-1ea6-4e18-9acd-faccf54fdfd4 admin admin] Unexpected exception in API method
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions return f(*args, **kwargs)
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions return func(*args, **kwargs)
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions return func(*args, **kwargs)
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions return func(*args, **kwargs)
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 583, in create
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions availability_zone, host, node = parse_az(context, availability_zone)
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 517, in parse_availability_zone
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions reason="Unable to parse availability_zone")
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions InvalidInput: Invalid input received: Unable to parse availability_zone
2016-05-11 08:59:37.467 TRACE nova.api.openstack.extensions
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1580467/+subscriptions
References