← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1838587] Re: request neutron with Incorrect body key return 500

 

** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  request neutron with Incorrect body key return 500

Status in neutron:
  Fix Released

Bug description:
  In current neutron, when I update resource with incorrect body,
  neutron server return 500 NeutronError. It should be fixed
  400(BadRequest)

  example:
  PUT /v2.0/networks/<network_id>
  body:
  {
      "subnet": {
          ...
       }
  }
  neutron server return 
  {"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalServerError", "detail": ""}}

  
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/pecan/core.py", line 683, in __call__
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     self.invoke_controller(controller, args, kwargs, state)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/pecan/core.py", line 574, in invoke_controller
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     result = controller(*args, **kwargs)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 139, in wrapped
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     setattr(e, '_RETRY_EXCEEDED', True)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 135, in wrapped
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 154, in wrapper
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     ectxt.value = e.inner_exc
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 142, in wrapper
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 183, in wrapped
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     LOG.debug("Retry wrapper got retriable exception: %s", e)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 179, in wrapped
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     return f(*dup_args, **dup_kwargs)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/opt/stack/neutron/neutron/pecan_wsgi/controllers/utils.py", line 76, in wrapped
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation   File "/opt/stack/neutron/neutron/pecan_wsgi/controllers/resource.py", line 62, in put
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation     resources = request.context['resources']
  Jul 31 20:56:08 nfs neutron-server[11250]: ERROR neutron.pecan_wsgi.hooks.translation KeyError: 'resources'

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



References