add(remove)TenantAccess throws 500 Internal Error

Bug #1253014 reported by zhangyanzi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Christopher Yeoh

Bug Description

The function addTenantAccess and removeTenantAccess don't check whether the parameter "tenant"is in request body. So the 500 error has been thrown.

We should catch the KeyError and transfer the KeyError to 400(HTTPBadRequest) instead of 500.

Tags: api
zhangyanzi (zhangyanzi)
Changed in nova:
assignee: nobody → zhangyanzi (zhangyanzi)
status: New → In Progress
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/57637

GuoHui Liu (guohliu)
tags: added: api
Changed in nova:
assignee: zhangyanzi (zhangyanzi) → Christopher Yeoh (cyeoh-0)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/102108
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5d4b7365d97dd987f5af91e5800c4f3a586ef654
Submitter: Jenkins
Branch: master

commit 5d4b7365d97dd987f5af91e5800c4f3a586ef654
Author: Chris Yeoh <email address hidden>
Date: Tue Jun 24 14:53:25 2014 +0930

    Fixes internal server error for add/remove tenant flavor access request

    Fixes the internal server error (500) response when an add or remove tenant access
    to a flavor is made without specifying the tenant. Note that only the V2 API code
    change is required because the V3 API version is protected by the input validation.

    Change-Id: I7c126920016c7004fa55efb89747e97838d62f4e
    Closes-Bug: 1253014

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.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.