Bulk creation for security group returns 500 error.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Unassigned | ||
python-neutronclient |
Invalid
|
Undecided
|
Unassigned | ||
python-openstackclient |
Invalid
|
Undecided
|
Unassigned |
Bug Description
API request
============
vagrant@ubuntu:~$ curl -i -X POST -H "X-Auth-Token: $TOKEN" http://
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Content-Length: 150
X-Openstack-
Date: Wed, 20 Jul 2016 03:54:06 GMT
{"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalSe
trace in neutron server
=======
2016-07-20 12:54:06.234 5351 ERROR neutron.
- -] create failed: No details.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.234 5351 ERROR neutron.
2016-07-20 12:54:06.241 5351 INFO neutron.wsgi [req-48d5282e-
Changed in neutron: | |
assignee: | nobody → Kengo Hobo (hobo-kengo) |
summary: |
- Bulk creation for security group does return 500 error. + Bulk creation for security group returns 500 error. |
Changed in neutron: | |
status: | Confirmed → In Progress |
Changed in neutron: | |
status: | In Progress → Invalid |
status: | Invalid → Incomplete |
tags: | added: low-hanging-fruit |
Changed in neutron: | |
assignee: | Reedip (reedip-banerjee) → nobody |
Changed in neutron: | |
assignee: | nobody → Reedip (reedip-banerjee) |
status: | Incomplete → In Progress |
We should be able to create security groups in bulk. The extension starts the API controller with bulk operations enabled: https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ extensions/ securitygroup. py#L320
The docs (http:// developer. openstack. org/api- ref-networking- v2-ext. html) don't show explicitly the request body for a bulk create operation. This is an example for networks (which I confirmed works correctly):
{
"admin_ state_up" : true
"admin_ state_up" : true
"networks": [
{
"name": "sample_network3",
},
{
"name": "sample_network4",
}
]
}
Following this example, in my opinion the body for a security groups bulk create should be:
{ groups" : [ group-1" ,
"descripti on": "My security group number 1" group-2" ,
"descripti on": "My security group number 2"
"security_
{
"name": "my-security-
},
{
"name": "my-security-
}
]
}
It also returns a 500 and the Traceback is http:// paste.openstack .org/show/ 538906/