region name is none when multipe keystones are configured

Bug #1087108 reported by xyj
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Gabriel Hurley

Bug Description

All codes are lastest.
 horizon (c4746aacfad55048cbb0269f8f5c6dc2679128db),
django_openstack_auth(8a88978154e50ecc385d483e5b4e4f010a578c6d),
keystoneclient (5939541bc771e1205394b05e757d7b23b3aca862).

horizon's local_settings.py:
AVAILABLE_REGIONS = [
    ('http://xxx.com', 'test1'),
    ('http://xxx.com', 'test2')
]

after login , region name in top left corner is None.

after deep into the code, I found the follow in keystoneclient:
keystoneclient/v2_0/tokens.py -> TokenManager>authenticate
        reset = 0
        if self.api.management_url is None:
            reset = 1
            self.api.management_url = self.api.auth_url
        token_ref = self._create('/tokens', params, "access",
                                 return_raw=return_raw)
        if reset:
            self.api.management_url = None

why management_url is reset?

in openstack_auth/backend.py:
        user = create_user_from_token(request, token, client.management_url)
if management_url is None, the user.endpoint is None.

in openstack_auth/views.py:
        region_name = dict(Login.get_region_choices()).get(region)
so ...region_name is None.

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This should be fixed as of two days ago with the release of django_openstack_auth 1.0.6. Try updating that package in your installation and see if it's fixed. There were changes in keystoneclient v0.2 which had to be caught up to.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
importance: Undecided → High
milestone: none → grizzly-2
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-2 → 2013.1
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.