Bug 1472981

Summary: python-openstackclient: running "openstack --os-token" fails with __init__() got an unexpected keyword argument 'token'
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: python-openstackclientAssignee: Julie Pichon <jpichon>
Status: CLOSED NOTABUG QA Contact: Shai Revivo <srevivo>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 12.0 (Pike)CC: apevec, lhh, sasha, srevivo
Target Milestone: rc   
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-23 21:39:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Chuzhoy 2017-07-19 17:39:22 UTC
python-openstackclient: running "openstack --os-token" fails with __init__() got an unexpected keyword argument 'token'

Environment:
python-openstackclient-3.11.0-0.20170613232431.c69304e.el7ost.noarch
instack-undercloud-7.1.1-0.20170710151630.el7ost.noarch
openstack-puppet-modules-10.0.0-0.20170315222135.0333c73.el7.1.noarch
openstack-tripleo-heat-templates-7.0.0-0.20170710191337.el7ost.noarch


Steps to reproduce:

on a deployed setup try to run:
openstack --os-token <token> --os-url <url> user list

Result:
__init__() got an unexpected keyword argument 'token'

Comment 1 Julie Pichon 2017-08-16 09:48:18 UTC
This seems to be working for me locally:

$ openstack --os-token $MY_TOKEN --os-url http://192.168.24.1:5000/v3 user list
+----------------------------------+------------------+
| ID                               | Name             |
+----------------------------------+------------------+
| 03686a4f8f5644dcb452efc235a73045 | neutron          |
| 1688126f64bb4265ad9d63d412541e89 | aodh             |
[...]
$ rpm -qa python-openstackclient
python-openstackclient-3.11.0-0.20170613232431.c69304e.el7ost.noarch

Does it work when explicitly setting the --os-auth-type flag to "token" or "admin_token"?
Do you have other OS_* OpenStack environment variables set, like a username?

Looking around I get the impression this not-ideal error message happens when there's a conflict between authentication methods (e.g. https://bugs.launchpad.net/devstack/+bug/1549095 ).

Comment 2 Alexander Chuzhoy 2017-08-23 21:39:13 UTC
Additional OS_ vars were initialized , which caused this.

Closing as not a bug.
Thanks a lot Julie.