Neutron with NSX plugin generates an error when adding of interface to external network to tenants router

Bug #1504104 reported by Igor Zinovik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vmware-nsx
New
Undecided
Unassigned

Bug Description

Neutron server with NSX core plugin throws UnboundLocalError when operator tries
to add interface to router into external network.

Scenario for reproduction:
1. Create External network and subnet for it
$ neutron net-create --router:external --provider:network_type flat --provider:physical_network network-222 External
$ neutron subnet-create --name ExtSubnet --allocation-pool start=172.16.0.128,end=172.16.0.250 --gateway 172.16.0.1 --disable-dhcp External 172.16.0.0/24

2. Create tenant router and add interface to it in External network
$ neutron router-create Admin-router --router_type shared
$ neutron router-interface-add Admin-router ExternSubnet
Request Failed: internal server error while processing your request

Nevertheless Horizon 'Network topology' view shows that router is connected to External network.

Environment: vCenter 5.5, NSX 6.1.4, Neutron NSX plugin tag 2015.1.2 (3de8db42e331500381b68852af1679cc53c3ab09)

Neutron log shows a traceback
2015-10-08 11:32:59.876 25187 INFO neutron.wsgi [-] (25187) accepted ('192.168.0.2', 45302)
2015-10-08 11:32:59.880 25187 INFO neutron.wsgi [-] 192.168.0.2 - - [08/Oct/2015 11:32:59] "OPTIONS / HTTP/1.0" 200 262 0.001621
2015-10-08 11:33:00.214 25188 ERROR neutron.api.v2.resource [req-47743236-f1f6-4a90-8df2-2dfc0ef81431 ] add_router_interface failed
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource Traceback (most recent call last):
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 83, in resource
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource result = method(request=request, **args)
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/oslo_db/api.py", line 131, in wrapper
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 209, in _handle_action
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource return getattr(self._plugin, name)(*arg_list, **kwargs)
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py", line 1413, in add_router_interface
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource context, router_id, interface_info)
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/shared_router_driver.py", line 553
, in add_router_interface
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource network_id, address_groups)
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/dist-packages/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py", line 1301, in update_internal_in
terface
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource 'net_moref': vcns_network_id})
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource UnboundLocalError: local variable 'vcns_network_id' referenced before assignment
2015-10-08 11:33:00.214 25188 TRACE neutron.api.v2.resource

Revision history for this message
Igor Zinovik (izinovik) wrote :

Neutron server reports itself as
root@node-1:~# neutron-server --version
neutron-server 2015.1.1

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.