malformed server update causes: KeyError: 'server'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Dan Prince |
Bug Description
Posting a malformed update PUT request to the /servers Openstack API will cause the following exception:
From the disk_config extension:
2012-08-17 19:29:20 TRACE nova.api.openstack response = gen.next()
2012-08-17 19:29:20 TRACE nova.api.openstack File "/usr/lib/
2012-08-17 19:29:20 TRACE nova.api.openstack self._set_
2012-08-17 19:29:20 TRACE nova.api.openstack KeyError: 'server'
2012-08-17 19:29:20 TRACE nova.api.openstack
From the servers.py core update function:
2012-08-17 19:31:51 TRACE nova.api.openstack File "/usr/lib/
2012-08-17 19:31:51 TRACE nova.api.openstack return method(req=request, **action_args)
2012-08-17 19:31:51 TRACE nova.api.openstack File "/usr/lib/
2012-08-17 19:31:51 TRACE nova.api.openstack if 'name' in body['server']:
2012-08-17 19:31:51 TRACE nova.api.openstack KeyError: 'server'
2012-08-17 19:31:51 TRACE nova.api.openstack
----
This causes an HTTP 500 exception. It should return a 422 unprocessable entity.
Changed in nova: | |
assignee: | nobody → Dan Prince (dan-prince) |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → folsom-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-rc1 → 2012.2 |
Fix proposed to branch: master /review. openstack. org/11578
Review: https:/