DEFAULT_SERVICE_REGIONS overrides services_region cookie

Bug #1772345 reported by Adrian Turjak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Adrian Turjak

Bug Description

DEFAULT_SERVICE_REGIONS makes it sound like it is setting default regions when a services_region cookie isn't present, when in fact it takes precedence over a cookie.

This is terrible UX because a user that can change to another valid region is forced on login to the region always defined in DEFAULT_SERVICE_REGIONS, and then always change manually to the region they want every time.

The cookie, a user controlled value, should always take precedence over a 'default' value. If we want to allow a forceful override then it should be called something else such as FORCED_SERVICE_REGIONS.

The settings don't even make this behavior clear, which further makes me think this is a bug or an unconsidered part of the implementation:
https://docs.openstack.org/horizon/latest/configuration/settings.html#default-service-regions

We should change the precedence to:
1. services_region cookie
2. DEFAULT_SERVICE_REGIONS endpoint
3. any valid region from the catalog

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/571086

Changed in horizon:
assignee: nobody → Adrian Turjak (adriant-y)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/571086
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=88fb01884010758d302f651b2525d96132326db1
Submitter: Zuul
Branch: master

commit 88fb01884010758d302f651b2525d96132326db1
Author: Adrian Turjak <email address hidden>
Date: Wed May 30 15:49:04 2018 +1200

    Rework DEFAULT_SERVICE_REGIONS

    DEFAULT_SERVICE_REGIONS is cumbersome when you have
    more than one keystone endpoint and all you want to do
    is set a global default service region.

    This adds '*' as an optional fallback key to mean global default.
    If an endpoint matches it will take precedence over the '*' value.

    This also fixes the precedence order for DEFAULT_SERVICE_REGIONS
    so that a user controlled cookie is used instead when that cookie
    is valid for the given catalog. This changes the way the setting
    works, but retains the intended result the setting was originally
    intended for.

    Change-Id: Ieefbd642d853fcfcf22a17d9edcc7daae72790a4
    blueprint: global-default-service-region
    Closes-Bug: #1772345
    Related-Bugs: #1359774 #1703390

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 14.0.0.0b3

This issue was fixed in the openstack/horizon 14.0.0.0b3 development milestone.

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.