exception.HostNotFound should be a 404 via the API, not a 500

Bug #996880 reported by Gabriel Hurley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Ying Chun Guo

Bug Description

Currently the check_host decorator raises exception.HostNotFound, however that exception is not caught in the API, resulting in a 500 response to the client.

The check_host code: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/hosts.py#L108

The expected response would be a 404 Not Found.

Changed in nova:
status: New → Confirmed
Changed in nova:
assignee: nobody → Ying Chun Guo (daisy-ycguo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/8274

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/8512

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/8512
Committed: http://github.com/openstack/nova/commit/9ce657702cbc4312669f364e68b0c1faefd0f0af
Submitter: Jenkins
Branch: master

commit 9ce657702cbc4312669f364e68b0c1faefd0f0af
Author: daisy-ycguo <email address hidden>
Date: Thu Jun 14 10:32:21 2012 +0800

    bug #996880 change HostNotFound in hosts to HTTPNotFound

    Change-Id: Ib8b7f1f26c2370e2a82b491d8774797985c0ae98

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-2 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.