osc commands fail when using admin_token plugin in keystoneauth1

Bug #1642897 reported by Alfredo Moralejo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystoneauth
New
Undecided
Unassigned
os-client-config
New
Undecided
Unassigned
tripleo
New
Undecided
Unassigned

Bug Description

Whith following env:

export OS_IMAGE_API_VERSION=1
export OS_IDENTITY_API_VERSION=3
export OS_TOKEN=760408b174b74d00af1bf348718405a6
export OS_URL=http://127.0.0.1:35357/v3

Using following command returns error:

[root@packstack1 ~]# openstack domain list --quiet
__init__() got an unexpected keyword argument 'project_domain_id'

With debug enabled:

command: domain list -> openstackclient.identity.v3.domain.ListDomain
__init__() got an unexpected keyword argument 'project_domain_id'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 393, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 198, in prepare_to_run_command
    return super(OpenStackShell, self).prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 429, in prepare_to_run_command
    self.client_manager.setup_auth()
  File "/usr/lib/python2.7/site-packages/openstackclient/common/clientmanager.py", line 78, in setup_auth
    self._cli_options.config,
  File "/usr/lib/python2.7/site-packages/openstackclient/common/client_config.py", line 195, in load_auth_plugin
    auth_plugin = loader.load_from_options(**config['auth'])
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 164, in load_from_options
    return self.create_plugin(**kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 125, in create_plugin
    return self.plugin_class(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'project_domain_id'
clean_up ListDomain: __init__() got an unexpected keyword argument 'project_domain_id'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 393, in run_subcommand
    self.prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 198, in prepare_to_run_command
    return super(OpenStackShell, self).prepare_to_run_command(cmd)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 429, in prepare_to_run_command
    self.client_manager.setup_auth()
  File "/usr/lib/python2.7/site-packages/openstackclient/common/clientmanager.py", line 78, in setup_auth
    self._cli_options.config,
  File "/usr/lib/python2.7/site-packages/openstackclient/common/client_config.py", line 195, in load_auth_plugin
    auth_plugin = loader.load_from_options(**config['auth'])
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 164, in load_from_options
    return self.create_plugin(**kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 125, in create_plugin
    return self.plugin_class(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'project_domain_id'

END return value: 1

This worked until 1.22.

Note that this is breaking all projects using puppet to deploy, tripleo, packstack, etc...

Revision history for this message
Alfredo Moralejo (amoralej) wrote :

Problem has been introduced by https://github.com/openstack/os-client-config/commit/b5d65b74f60ce743b03b49a6c176700d658cfe98. Reverting it, it works as expected.

Revision history for this message
Alfredo Moralejo (amoralej) wrote :

Some more investigation shows that issue appears as soon as admin_token plugin in keystoneauth1 is used. Before the mentioned commit, when using token_endpoint in osc, the token_endpoint plugin in openstackclient lib was used and worked fine, but his commit moves it to keystoneauth1.

If i force admin_token in os-client-config version 1.22.0 using --os-auth-type admin_token, i get the same issue:

# openstack domain list --quiet
+---------+---------+---------+--------------------+
| ID | Name | Enabled | Description |
+---------+---------+---------+--------------------+
| default | Default | True | The default domain |
+---------+---------+---------+--------------------+
# openstack --os-auth-type admin_token domain list --quiet
__init__() got an unexpected keyword argument 'project_domain_id'

summary: - osc commands fail when using os-client-config >= 1.23.0
+ osc commands fail when using admin_token plugin in keystoneauth1
Revision history for this message
Steve Martinelli (stevemar) wrote :
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.