unable to view details page of router if the router has more than one external gateways attached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Unable to view details page of the router when more than one gateway interface is attached.
The same can be achieved in CLI through the following commands
neutron net-create --provider:
neutron subnet-create --name BAT-T0-bgw5-sub1 --gateway 11.127.0.1 --enable_dhcp=False BAT-T0-bgw5 11.127.0.0/29
neutron port-create BAT-T0-bgw5 --name BAT-T0-
neutron net-create --provider:
neutron subnet-create --name BAT-T0-bgw6-sub1 --gateway 11.127.0.9 --enable_dhcp=False BAT-T0-bgw6 11.127.0.8/29
neutron port-create BAT-T0-bgw6 --name BAT-T0-
neutron router-create peso-router-bgw1
neutron router-
neutron router-
external_
Now click on router properties in UI. The UI displays something went wrong
=======
============= Cause of the issue==
In details method views.py in project router
if router.
The external_
But when more than one gateway is created, they are created with different keys('network_id_1' and 'network_id_2'), raising key error
=======
So the dictionary should be iterated to get items and the values of the keys should be retrieved
I tried to do the CLI commands but got errors for these two commands: interface- add peso-router-bgw1 BAT-T0-bgw5-sub1 interface- add peso-router-bgw1 BAT-T0-bgw6-sub1
neutron router-
neutron router-
I then added two interfaces to the router in Horizon and the router details panel is good.
You mentioned the external gateways of a router at the end, but that should be added with CLI command "neutron router-gateway-add" instead of "neutron router- interface- add". And there's only one gateway can be set with Horizon or CLI.