← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1604662] Re: Bulk creation for security group returns 500 error.

 

Python-neutronclient  and openstackclient also do not support bulk
creation of security groups.

** Also affects: python-neutronclient
   Importance: Undecided
       Status: New

** Changed in: python-neutronclient
     Assignee: (unassigned) => Reedip (reedip-banerjee)

** Also affects: python-openstackclient
   Importance: Undecided
       Status: New

** Changed in: python-openstackclient
     Assignee: (unassigned) => Reedip (reedip-banerjee)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1604662

Title:
  Bulk creation for security group returns 500 error.

Status in neutron:
  Confirmed
Status in python-neutronclient:
  New
Status in python-openstackclient:
  New

Bug description:
  
  API request
  ============
  vagrant@ubuntu:~$ curl -i -X POST -H "X-Auth-Token: $TOKEN" http://192.168.122.139:9696/v2.0/security-groups -d '{"security_groups":[{"security_group":{"name":"hobo1"}}]}'
  HTTP/1.1 500 Internal Server Error
  Content-Type: application/json
  Content-Length: 150
  X-Openstack-Request-Id: req-48d5282e-f0b6-48b8-887c-7aa0c953ee88
  Date: Wed, 20 Jul 2016 03:54:06 GMT

  {"NeutronError": {"message": "Request Failed: internal server error
  while processing your request.", "type": "HTTPInternalServerError",
  "detail": ""}}

  trace in neutron server
  =======================
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource [req-48d5282e-f0b6-48b8-887c-7aa0c953ee88 e01bc3eadeb045edb02fc6b2af4b5d49 867929bfedca4a719e17a7f3293845de -
   - -] create failed: No details.
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource Traceback (most recent call last):
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/resource.py", line 79, in resource
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     result = method(request=request, **args)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 401, in create
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     return self._create(request, body, **kwargs)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 148, in wrapper
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     self.force_reraise()
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 138, in wrapper
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 500, in _create
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     objs = do_create(body, bulk=True)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 496, in do_create
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     request.context, reservation.reservation_id)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     self.force_reraise()
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 489, in do_create
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource     return obj_creator(request.context, **kwargs)
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource TypeError: create_security_group_bulk() got an unexpected keyword argument 'security_groups'
  2016-07-20 12:54:06.234 5351 ERROR neutron.api.v2.resource
  2016-07-20 12:54:06.241 5351 INFO neutron.wsgi [req-48d5282e-f0b6-48b8-887c-7aa0c953ee88 e01bc3eadeb045edb02fc6b2af4b5d49 867929bfedca4a719e17a7f3293845de - - -] 192.168.122.139 - - [20/Jul/2016 12:54:06] "POST /v2.0/security-groups HTTP/1.1" 500 344 0.203171

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1604662/+subscriptions


References