Create server(POST) using invalid personality contents is not raising BadRequest

Bug #1050409 reported by Sirisha Devineni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Sirisha Devineni

Bug Description

Description:
 ----------------
 On creating a server with invalid personality contents we are getting a server error (HTTP 500) instead of raising the expected BadRequest Exception.

Environment:
---------------
Single node Folsom

CURL Command:
------------------
root@ubuntu28folsom:~/launchpad_nova/nova# curl -i http://127.0.0.1:8774/v2/c77eea6f6a7a4ded95b3235794792823/servers -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: fef1136d5d194609ab22f039f10b5c57" -d '{"server": {"min_count": 1, "flavorRef": "1", "personality": [{"path": "/etc/banner.txt", "contents": "b25zLiINCg0KLVJpY2hhcmQgQ$$%QQmFjaA=="}], "name": "tsttemp2", "imageRef": "b8ca6857-5286-424c-8462-5dd0528edb63", "max_count": 1}}'
HTTP/1.1 500 Internal Server Error
Via: 1.1 HYSPROXY2
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Length: 128
Date: Thu, 13 Sep 2012 16:39:15 GMT
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-ca58aa01-18fe-480a-b693-3d797e654507

{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}root@ubuntu28folsom:~/launchpad_nova/nova#
root@ubuntu28folsom:~/launchpad_nova/nova#

Expected result:
 -----------------------
 Should raise BadRequest

affects: ceilometer → nova
Changed in nova:
assignee: nobody → Sirisha Devineni (sirisha-devineni)
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Changed in nova:
status: Confirmed → 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/13019

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

Reviewed: https://review.openstack.org/13019
Committed: http://github.com/openstack/nova/commit/f4906f07cd49e4deae79018d7f586b16266859eb
Submitter: Jenkins
Branch: master

commit f4906f07cd49e4deae79018d7f586b16266859eb
Author: Sirisha Devineni <email address hidden>
Date: Fri Sep 14 23:04:37 2012 +0530

    Raise BadRequest while creating server with invalid personality

    Handle UnicodeDecodeError raises from compute api while trying to
    create server with invalid personality content and throw it as
    HTTPBadRequest

    Fixed bug 1050409

    Change-Id: I27d47bbc9ed89abfa9827512fbfb3b16a0d87160

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