500 response on booting a server with dict security group argument
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Sean Dague |
Bug Description
curl -i http://
HTTP/1.1 500 Internal Server Error
Content-Length: 128
Content-Type: application/json; charset=UTF-8
X-Compute-
Date: Mon, 14 Oct 2013 14:41:44 GMT
{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
I have modified the curl command from the 'nova --debug boot server --flavor 42 --image cirros-
and changed the
"security_groups": [{"name": "sec"}]
part to
"security_groups": {"name": "sec"}
When the nova-api gets a dict instead of list of dict causes a 500 response.
2013-10-14 14:41:43.437 ERROR nova.api.openstack [req-87686a62-
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack Traceback (most recent call last):
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/opt/stack/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return req.get_
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack application, catch_exc_
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack app_iter = application(
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return resp(environ, start_response)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/opt/stack/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return self.app(env, start_response)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return resp(environ, start_response)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return resp(environ, start_response)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack response = self.app(environ, start_response)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return resp(environ, start_response)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/usr/lib/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/opt/stack/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack content_type, body, accept)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/opt/stack/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/opt/stack/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack return method(req=request, **action_args)
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack File "/opt/stack/
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack if sg.get('name')]
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack AttributeError: 'unicode' object has no attribute 'get'
2013-10-14 14:41:43.437 22092 TRACE nova.api.openstack
The '"security_groups": "foo"' also causes 500 response.
Changed in nova: | |
status: | New → Incomplete |
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → kilo-rc1 |
status: | Fix Committed → Fix Released |
summary: |
- 500 response on booting a server with disk security group argument + 500 response on booting a server with dict security group argument |
Changed in nova: | |
milestone: | kilo-rc1 → 2015.1.0 |
Attlia,
what is the reason behind changing
"security_groups": [{"name": "sec"}]
part to
"security_groups": {"name": "sec"}
or
"security_groups": "foo"
Do we claim anywhere (in documentation) that it should work?
thanks,
dims