← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1343458] Re: Nova's fault wrap hiding real error status code from Neutron (and maybe others)

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-rc1

-- 
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/1343458

Title:
  Nova's fault wrap hiding real error status code from Neutron (and
  maybe others)

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  As a user I expect something that would produce a 404 to return a 404.
  Such as:

  $ nova net-delete some_garbage

  REQ: curl -i 'http://127.0.0.1:8774/v2/4eb9fda29831446cbfd22ab82a901284/os-tenant-networks/asdfasdfasdf' -X DELETE -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: demo" -H "X-Auth-Token: {SHA1}c7b9ac5b9d6c88abd70694db6cbb175c223f988a"
  RESP: [500] CaseInsensitiveDict({'date': 'Thu, 17 Jul 2014 18:00:59 GMT', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-9f02f305-c01d-462c-abd4-0f9a283d992f'})
  RESP BODY: {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}

  DEBUG (shell:802) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-9f02f305-c01d-462c-abd4-0f9a283d992f)
  Traceback (most recent call last):
    File "/opt/stack/python-novaclient/novaclient/shell.py", line 799, in main
      OpenStackComputeShell().main(argv)
    File "/opt/stack/python-novaclient/novaclient/shell.py", line 729, in main
      args.func(self.cs, args)
    File "/opt/stack/python-novaclient/novaclient/v1_1/contrib/tenant_networks.py", line 78, in do_net_delete
      cs.tenant_networks.delete(args.network_id)
    File "/opt/stack/python-novaclient/novaclient/v1_1/contrib/tenant_networks.py", line 36, in delete
      self._delete('/os-tenant-networks/%s' % base.getid(network))
    File "/opt/stack/python-novaclient/novaclient/base.py", line 109, in _delete
      _resp, _body = self.api.client.delete(url)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 491, in delete
      return self._cs_request(url, 'DELETE', **kwargs)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 459, in _cs_request
      **kwargs)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 441, in _time_request
      resp, body = self.request(url, method, **kwargs)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 435, in request
      raise exceptions.from_response(resp, body, url, method)
  InternalServerError: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-9f02f305-c01d-462c-abd4-0f9a283d992f)
  ERROR (InternalServerError): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-9f02f305-c01d-462c-abd4-0f9a283d992f)

  
  When it is not implemented that makes sense. On my cloud installation I also receive this from neutron:

  2014-07-14 16:39:08.200 29740 INFO neutron.wsgi [-] 10.23.245.95,10.13.143.233 - - [14/Jul/2014 16:39:08] "DELETE /v2.0/networks/jlh_delete_me.json HTTP/1.1" 
  404 176 0.010104

  
  I believe nova.api.openstack.FaultWrapper is messing up the return from Neutron and showing the user a 500 (the default response to exceptions) instead of the expected 404.

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


References