Wrong order (and login priority) of region list in horizon

Bug #1439791 reported by Max Lvov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Wang Bo

Bug Description

When regions are configured (NOT via local_settings.py but by adding multiple endpoints to keystone), regardless of what horizon is used for logging in, you will be logged into first region in drop down list. Drop down list itself, unsorted (I guess it is just python dictionary)
Affected version: icehouse on ubuntu 12.04

Changed in horizon:
importance: Undecided → Low
Revision history for this message
Wang Bo (chestack) wrote :

1. user available_region_list has been sorted: https://github.com/openstack/horizon/blob/master/openstack_dashboard/templatetags/context_selection.py#L100

2. In which region after the user log in is stored in request.COOKIES

Revision history for this message
Wang Bo (chestack) wrote :

Max, could #1 comment address your issue? If not I'd like keep working on it.

Changed in horizon:
assignee: nobody → Wang Bo (chestack)
Revision history for this message
Max Lvov (usrleon) wrote :

Wang Bo, first point certainly yes, the second one: you said region I will be logged in determined by cookie variable, but at the moment I faced this problem it didn't work that way. Every time I login to any of regions, I got redirected to horizon of first region in list (despite I really logged in third) so if you didn't change anything in this context I believe it still there.
Unfortunately I cannot test it right now.

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/292197

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

Reviewed: https://review.openstack.org/292197
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d9ebebb736fef29d559511690e0c393607ce4311
Submitter: Jenkins
Branch: master

commit d9ebebb736fef29d559511690e0c393607ce4311
Author: Bo Wang <email address hidden>
Date: Mon Mar 14 11:47:05 2016 +0800

    Make region list case-insensitive sorted

    Function sorted() output the result as ASCII sequence in default.
    sorted(['Region1', 'myregion']) will not change sequence.
    Fix it for tenant list too.

    Change-Id: I2e4e546ac70af1f758b618cf253f518a475b8392
    Closes-Bug: #1439791

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0rc1

This issue was fixed in the openstack/horizon 9.0.0.0rc1 release candidate.

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.