Keystone v3 fails to authenticate the request because of the incorrect user and project domain variables

Bug #1634474 reported by kbaikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
kbaikov

Bug Description

Steps to reproduce:
1. Create the deployment from env. (source .openrc; rally deployment create --fromenv --name=foo)
.openrc file contains: OS_USER_DOMAIN_NAME='foo' and OS_PROJECT_DOMAIN_NAME='foo'.

2. make sure that 'rally deployment config' shows the correct OS_USER_DOMAIN_NAME='foo' and OS_PROJECT_DOMAIN_NAME='foo'

3. run it some rally scenario (e.g. rally --debug task start repos/rally/samples/tasks/scenarios/keystone/create-and-delete-user.json)
The same happens if you supply the config file (--config-file rally.conf)

4. get an error: Unauthorized: The request you have made requires authentication. (HTTP 401)
Full error: http://paste.openstack.org/show/584852/

5. So the breakpoints in keystone/users.py shows us that uclients.nova() is called with incorrect credentials (project_domain='default' and user_domain='default') instead of "foo" as in .openrc file.

6. so obviously USER_CONTEXT_OPTS in keystone/users.py overwrites the project_domain and user_domain with "default" value. To confirm that i locally changed the default value to "foo" and all the scenarios run successfully.

7. The Fix: move DEFAULT_CONFIG on Line 141 in keystone/users.py inside the __init__ method of the same class UserGenerator

Similar bugs:
https://bugs.launchpad.net/rally/+bug/1582777
https://bugs.launchpad.net/rally/+bug/1593229

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to rally (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/387998

kbaikov (kbaikov)
Changed in rally:
assignee: nobody → kbaikov (kbaikov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to rally (master)

Reviewed: https://review.openstack.org/387998
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=a6b84564a1b1bacce16f129af085d492d38e46da
Submitter: Jenkins
Branch: master

commit a6b84564a1b1bacce16f129af085d492d38e46da
Author: kbaikov <email address hidden>
Date: Tue Oct 18 14:31:12 2016 +0200

    Avoid variables overwrite by keystone default config

    Keystone would overwrite deployment variables
    project_domain and user_domain variables with "default"

    To avoid that DEFAULT_CONFIG is instantiated in
    the __init__ method now

    Closes-Bug: 1634474

    Change-Id: Ib81298223f31a68d9f79e267654dc35eba58cb95

Changed in rally:
status: New → Fix Released
Revision history for this message
kbaikov (kbaikov) wrote :

The fix was merged and also tested the fix locally.
Works for me.

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.