mutil-region router-panel display

Bug #1389489 reported by LIU Yulong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Low
Victor Coutellier

Bug Description

Related to this bp:
https://blueprints.launchpad.net/horizon/+spec/hide-router-panel-by-config

1. regionOne neutron has configuration service_plugins = router
2.regionTwo neutron has no service_plugins setting. l3 router is not enabled.

3.the local_settings.py was used to decide whether the router is enabled.
https://github.com/openstack/horizon/blob/master/openstack_dashboard/local/local_settings.py.example#L180

OPENSTACK_NEUTRON_NETWORK = {
    'enable_router': True,
    'enable_quotas': True,
    'enable_ipv6': True,
    'enable_distributed_router': False,
    'enable_ha_router': False,
    'enable_lb': True,
    'enable_firewall': True,
    'enable_vpn': True,
    # The profile_support option is used to detect if an external router can be
    # configured via the dashboard. When using specific plugins the
    # profile_support can be turned on if needed.
    'profile_support': None,
    #'profile_support': 'cisco',
    # Set which provider network types are supported. Only the network types
    # in this list will be available to choose from when creating a network.
    # Network types include local, flat, vlan, gre, and vxlan.
    'supported_provider_types': ['*'],
}

How to decide the value of 'enable_router' ?
If enable_router is set to True, regionTwo will get some errors like "unable to get floating list".
If enable_router is set to False, regionOne are unable to see the router panel.

Tags: neutron
tags: added: neutron
Revision history for this message
Akihiro Motoki (amotoki) wrote :

The availability of 'router' neutron extensions should be checked in the related code. It is not enough only to check 'enable_router' setting. This setting was originally kept for operators who would like to disable L3 feature GUI but still want to use L3 neutron feature (as admin). Basically it is not a good idea to depend on 'enable_router' setting completely. After Pike, we dropped nova floating IP support so the thing is now much simpler and it is a good chance to clean up the code.

Changed in horizon:
status: New → Triaged
importance: Undecided → Low
Changed in horizon:
assignee: nobody → Victor Coutellier (alistarle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/851914

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
Victor Coutellier (alistarle) wrote (last edit ):

I propose a fix but I am still working on making UT pass, indeed, it change a lot of things in the existing tests.

I also use the is_router_enabled function already present and used here and there to dynamically check if the extension is really enabled in addition to the configuration flag, so it minimize a lot the code.

I basically take example on the trunk pages who already do this job: https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/trunks/panel.py#L31

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.