yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #33324
[Bug 1460875] [NEW] security group creation fails due to internal error if not specifying description
Public bug reported:
If not specifying description parameter on "create a security group"
API, an internal error happens like the following:
$ curl [..] -X POST http://192.168.11.62:8774/v2/138c5606916a468abec3dd9371e66975/os-security-groups -H "Content-Type: application/json" -H "Accept: application/json" -d '{"security_group": {"name": "test"}}'
HTTP/1.1 500 Internal Server Error
Content-Length: 128
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-1fbc1833-d87c-4f49-9b73-fc7c4bf894a6
Date: Tue, 02 Jun 2015 00:59:35 GMT
{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
$
nova-api.log is here:
2015-06-02 00:58:25.817 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 911, in dispatch
2015-06-02 00:58:25.817 TRACE nova.api.openstack return method(req=request, **action_args)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/compute/contrib/security_groups.py", line 204, in create
2015-06-02 00:58:25.817 TRACE nova.api.openstack context, group_name, group_description)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/opt/stack/nova/nova/network/security_group/neutron_driver.py", line 54, in create_security_group
2015-06-02 00:58:25.817 TRACE nova.api.openstack body).get('security_group')
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 102, in with_params
2015-06-02 00:58:25.817 TRACE nova.api.openstack ret = self.function(instance, *args, **kwargs)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 716, in create_security_group
2015-06-02 00:58:25.817 TRACE nova.api.openstack return self.post(self.security_groups_path, body=body)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 298, in post
2015-06-02 00:58:25.817 TRACE nova.api.openstack headers=headers, params=params)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 211, in do_request
2015-06-02 00:58:25.817 TRACE nova.api.openstack self._handle_fault_response(status_code, replybody)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 185, in _handle_fault_response
2015-06-02 00:58:25.817 TRACE nova.api.openstack exception_handler_v20(status_code, des_error_body)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 70, in exception_handler_v20
2015-06-02 00:58:25.817 TRACE nova.api.openstack status_code=status_code)
2015-06-02 00:58:25.817 TRACE nova.api.openstack BadRequest: Invalid input for description. Reason: 'None' is not a valid string.
2015-06-02 00:58:25.817 TRACE nova.api.openstack
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1460875
Title:
security group creation fails due to internal error if not specifying
description
Status in OpenStack Compute (Nova):
New
Bug description:
If not specifying description parameter on "create a security group"
API, an internal error happens like the following:
$ curl [..] -X POST http://192.168.11.62:8774/v2/138c5606916a468abec3dd9371e66975/os-security-groups -H "Content-Type: application/json" -H "Accept: application/json" -d '{"security_group": {"name": "test"}}'
HTTP/1.1 500 Internal Server Error
Content-Length: 128
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-1fbc1833-d87c-4f49-9b73-fc7c4bf894a6
Date: Tue, 02 Jun 2015 00:59:35 GMT
{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
$
nova-api.log is here:
2015-06-02 00:58:25.817 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 911, in dispatch
2015-06-02 00:58:25.817 TRACE nova.api.openstack return method(req=request, **action_args)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/compute/contrib/security_groups.py", line 204, in create
2015-06-02 00:58:25.817 TRACE nova.api.openstack context, group_name, group_description)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/opt/stack/nova/nova/network/security_group/neutron_driver.py", line 54, in create_security_group
2015-06-02 00:58:25.817 TRACE nova.api.openstack body).get('security_group')
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 102, in with_params
2015-06-02 00:58:25.817 TRACE nova.api.openstack ret = self.function(instance, *args, **kwargs)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 716, in create_security_group
2015-06-02 00:58:25.817 TRACE nova.api.openstack return self.post(self.security_groups_path, body=body)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 298, in post
2015-06-02 00:58:25.817 TRACE nova.api.openstack headers=headers, params=params)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 211, in do_request
2015-06-02 00:58:25.817 TRACE nova.api.openstack self._handle_fault_response(status_code, replybody)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 185, in _handle_fault_response
2015-06-02 00:58:25.817 TRACE nova.api.openstack exception_handler_v20(status_code, des_error_body)
2015-06-02 00:58:25.817 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 70, in exception_handler_v20
2015-06-02 00:58:25.817 TRACE nova.api.openstack status_code=status_code)
2015-06-02 00:58:25.817 TRACE nova.api.openstack BadRequest: Invalid input for description. Reason: 'None' is not a valid string.
2015-06-02 00:58:25.817 TRACE nova.api.openstack
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1460875/+subscriptions
Follow ups
References