openstackclient domain scoped token acquisition broken by change in os-client-config

Bug #1535676 reported by Javier Peña
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
os-client-config
Fix Released
High
Monty Taylor

Bug Description

Commit https://github.com/openstack/os-client-config/commit/a8532f6c8d221628b697ddb0d134e2a000ef61d6 has broken the ability to get an openstackclient domain scoped token. If I try something like:

export OS_USER_ID=d009e69842bb48019cc089a056de2a2a
export OS_IDENTITY_API_VERSION=3
export OS_PASSWORD=password
export OS_DOMAIN_NAME=heat
export OS_AUTH_URL=http://127.0.0.1:35357/v3
export OS_USERNAME=heat_admin
openstack token issue --format value

I get the following error:

Missing parameter(s):
Set a scope, such as a project or domain, set a project scope with --os-project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with --os-domain-name, OS_DOMAIN_NAME or auth.domain_name

Digging further, the issue comes from https://github.com/openstack/os-client-config/commit/a8532f6c8d221628b697ddb0d134e2a000ef61d6#diff-8da2322324c75c94659621b90d46bd68R899 . This function calls self._handle_domain_id(cloud), which removed config['auth']['domain_name'] from the configuration if it is present, and replaces it with config['auth']['user_domain_name'] and config['auth']['project_domain_name'].

However, openstackclient expects config['auth'['domain_name'] (or domain_id) to be present, as shown in https://github.com/openstack/python-openstackclient/blob/master/openstackclient/api/auth.py#L149-L158

I am not sure if this should be considered an openstackclient or an os-client-config bug, opening here since it was a commit to os-client-config that surfaced it.

Monty Taylor (mordred)
Changed in python-openstackclient:
status: New → Confirmed
status: Confirmed → New
Changed in os-client-config:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Monty Taylor (mordred)
Dean Troyer (dtroyer)
no longer affects: python-openstackclient
Changed in os-client-config:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-client-config (master)

Reviewed: https://review.openstack.org/269704
Committed: https://git.openstack.org/cgit/openstack/os-client-config/commit/?id=a2db877b41fad494fe9daa09b5c77914638ac605
Submitter: Jenkins
Branch: master

commit a2db877b41fad494fe9daa09b5c77914638ac605
Author: Monty Taylor <email address hidden>
Date: Tue Jan 19 10:12:02 2016 -0500

    Don't set project_domain if not project scoped

    The code to expand domain_{name,id} to {user,project}_domain_{name,id}
    is flawed in that it sets a project_domain_{name,id} even if a
    project_{name,id} is not set. There is a valid use case for not having
    a project_{name,id} - specifically getting a domain-scoped token.

    In the case where we do not set a project, check for that and don't make
    further assumptions that the domain input needs to be "fixed".

    Closes-Bug: #1535676
    Change-Id: I825fe4bc375687208bb176bb5990c23fe87c8f9d

Changed in os-client-config:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/os-client-config 1.15.0

This issue was fixed in the openstack/os-client-config 1.15.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstacksdk 0.10.0

This issue was fixed in the openstack/python-openstacksdk 0.10.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.