Router interface add port without subnet raise indexerror

Bug #1472242 reported by Tristan Cacqueray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

Trace:
ERROR neutron.api.v2.resource [req-dbf179d1-62ac-4537-be15-c2088669f75c ] add_router_interface failed
TRACE neutron.api.v2.resource Traceback (most recent call last):
TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 83, in resource
TRACE neutron.api.v2.resource result = method(request=request, **args)
TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 207, in _handle_action
TRACE neutron.api.v2.resource return getattr(self._plugin, name)(*arg_list, **kwargs)
TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/db/l3_dvr_db.py", line 306, in add_router_interface
TRACE neutron.api.v2.resource router_id, port['tenant_id'], port['id'], subnets[-1]['id'],
TRACE neutron.api.v2.resource IndexError: list index out of range

Steps to reproduce:
router_id=$(neutron router-create test | grep ' id ' | awk '{ print $4 }')
neutron net-create test
port_id=$(neutron port-create test | grep ' id ' | awk '{ print $4 }')
neutron router-interface-add $router_id port=$port_id

Impact:
Raise an IndexError exception instead of NeutronError

Revision history for this message
Sridhar Gaddam (sridhargaddam) wrote :

The issue is fixed as part of the following patch - https://review.openstack.org/#/c/193440/

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.