← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1353114] Re: Improper API error message when updating router

 

That's expected behavior: we don't give out information in case policy
doesn't allow the operation, so user doesn't know if he/she hits proper
router_id.

** Changed in: neutron
       Status: New => Invalid

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

Title:
  Improper API error message when updating router

Status in OpenStack Neutron (virtual network service):
  Invalid

Bug description:
  Used the python-neutron API to update a router. Now based on my policy  below in /etc/neutron/policy.json 
  "create_router:external_gateway_info:enable_snat": "rule:admin_only",
      "update_router:external_gateway_info:enable_snat": "rule:admin_only",

  You expect that when u try to update enable_snat: false/true you
  expect to see a policy violation error message

  Instead when i update the router with below message I got this exception on update router
  /v2_0/client.py", line 1212, in _handle_fault_response
      exception_handler_v20(status_code, des_error_body)
    File "/Users/akalambu/python_venv/venv/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 74, in exception_handler_v20
      message=error_dict)
  NeutronClientException: The resource could not be found.

  When I had following
   body = {
  "router":
  {
      "name" : "pns-router",
      "external_gateway_info":
      {
          "network_id": net_id,
   "enable_snat" : False
               }
  }
     }

  It should not be a resource not found but something like 
  Policy does not allow update of snat on a router

  This makes debugging hard when you have misleading messages from the
  API

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


References