add_interface_router with an empty dict returns 500 error

Bug #1347880 reported by Steve Kowalik
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Low
Unassigned

Bug Description

If add_interface_router is called with a router id and a dictionary that does not contain the magic keys of 'port_id' or 'subnet_id', there is no useful error message.

Changed in neutron:
assignee: nobody → Steve Kowalik (stevenk)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Steve Kowalik (<email address hidden>) on branch: master
Review: https://review.openstack.org/107558
Reason: Seems to be already covered by the existing case

Akihiro Motoki (amotoki)
Changed in neutron:
status: In Progress → New
Revision history for this message
Akihiro Motoki (amotoki) wrote :

If we run the following neutronclient script,

  nc = client.Client(username='demo', password='pass', tenant_name='demo', auth_url='http://127.0.0.1:5000/v2.0')
  nc.add_interface_router('63cbef8d-cd1b-4865-bf06-092d36207d7e', {})

we will get the following error.

2014-08-08 05:55:53.937 ERROR neutron.api.v2.resource [req-87747d4b-2277-4793-b8f5-20f819ba2897 demo d7811391742e4ce69d21f427f58f64af] add_router_interface failed
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource Traceback (most recent call last):
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 87, in resource
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource result = method(request=request, **args)
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 199, in _handle_action
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource return getattr(self._plugin, name)(*arg_list, **kwargs)
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource TypeError: add_router_interface() takes exactly 4 arguments (3 given)
2014-08-08 05:55:53.937 TRACE neutron.api.v2.resource

Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
milestone: none → juno-3
summary: - add_interface_router does not return a useful error message
+ add_interface_router with an empty dict returns 500 error
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → juno-rc1
Revision history for this message
Kyle Mestery (mestery) wrote :

Moving low priority bug out of Juno-RC1.

Changed in neutron:
milestone: juno-rc1 → kilo-1
Kyle Mestery (mestery)
Changed in neutron:
milestone: kilo-1 → kilo-2
Kyle Mestery (mestery)
Changed in neutron:
milestone: kilo-2 → none
Steve Kowalik (stevenk)
Changed in neutron:
assignee: Steve Kowalik (stevenk) → nobody
Changed in neutron:
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
goocher (farmerworking)
Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
status: In Progress → Confirmed
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 365 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Ann Taraday (akamyshnikova) → nobody
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Seems like this is resolved (??)

curl -g -i -X PUT http://10.0.4.130:9696/v2.0/routers/deecfcf8-6a4d-494d-938e-515f5c9d5885/add_router_interface.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 35c18f317fc248dca48ef121366006a0" -d '{"subnet_id": {}}'
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 114
X-Openstack-Request-Id: req-257fdf93-dc71-4a77-b7d2-d839cabb0c20
Date: Wed, 07 Sep 2016 05:27:00 GMT

{"NeutronError": {"message": "Bad router request: '{}' is not a valid UUID.", "type": "BadRequest", "detail": ""}}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.