Public bug reported:

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:network_type vlan
--provider:physical_network default --provider:segmentation_id 3956
--router:external=True BAT-T0-bgw5

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-bgw5-bgw-port --device-
owner baremetal:BGW-1 --binding:host_id BGW-1 --fixed-ip
ip_address=11.127.0.1

neutron net-create --provider:network_type vlan
--provider:physical_network default --provider:segmentation_id 3957
--router:external=True BAT-T0-bgw6

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-bgw6-bgw-port --device-
owner baremetal:BGW-2 --binding:host_id BGW-2 --fixed-ip
ip_address=11.127.0.9

neutron router-create peso-router-bgw1
neutron router-interface-add peso-router-bgw1 BAT-T0-bgw5-sub1
neutron router-interface-add peso-router-bgw1 BAT-T0-bgw6-sub1

external_gateway_info | {"network_id_2": "a36dc0e0-92af-4984-ab7d-
7907032d426c", "network_id_1": "e31e4364-1885-452f-a476-4b7f19d7fe7e"} |

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.external_gateway_info:

            ext_net_id = router.external_gateway_info['network_id']

The external_gateway_info expects a key 'network_id'
But when more than one gateway is created, they are created with different 
keys('network_id_1' and 'network_id_2'), raising key error
================Possible Solution====================================
So the dictionary should be iterated to get items and the values of the keys 
should be retrieved

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1723007

Title:
  unable to view details page of router if the router has more than one
  external gateways attached

Status in OpenStack Dashboard (Horizon):
  New

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:network_type vlan
  --provider:physical_network default --provider:segmentation_id 3956
  --router:external=True BAT-T0-bgw5

  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-bgw5-bgw-port --device-
  owner baremetal:BGW-1 --binding:host_id BGW-1 --fixed-ip
  ip_address=11.127.0.1

  neutron net-create --provider:network_type vlan
  --provider:physical_network default --provider:segmentation_id 3957
  --router:external=True BAT-T0-bgw6

  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-bgw6-bgw-port --device-
  owner baremetal:BGW-2 --binding:host_id BGW-2 --fixed-ip
  ip_address=11.127.0.9

  neutron router-create peso-router-bgw1
  neutron router-interface-add peso-router-bgw1 BAT-T0-bgw5-sub1
  neutron router-interface-add peso-router-bgw1 BAT-T0-bgw6-sub1

  external_gateway_info | {"network_id_2": "a36dc0e0-92af-4984-ab7d-
  7907032d426c", "network_id_1": "e31e4364-1885-452f-a476-4b7f19d7fe7e"}
  |

  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.external_gateway_info:

              ext_net_id = router.external_gateway_info['network_id']

  The external_gateway_info expects a key 'network_id'
  But when more than one gateway is created, they are created with different 
keys('network_id_1' and 'network_id_2'), raising key error
  ================Possible Solution====================================
  So the dictionary should be iterated to get items and the values of the keys 
should be retrieved

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to