keystone_service provider fails with __init__() got an unexpected keyword argument 'token'

Bug #1639320 reported by jcat
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet-openstacklib
New
Undecided
Unassigned

Bug Description

Using stable/mitaka

The error only seemed to show up after enabling support for an extra domain using the keystone.identity.backends.ldap.Identity driver.

Error: Could not prefetch keystone_service provider 'openstack': Execution of '/usr/bin/openstack service list --quiet --format csv --long' returned 1: __init__() got an unexpected keyword argument 'token' (tried 44, for a total of 170 seconds)
Error: Not managing Keystone_service[Image Service] due to earlier Keystone API failures.
Error: /Stage[main]/Glance::Keystone::Auth/Keystone::Resource::Service_identity[glance]/Keystone_service[Image Service::image]/ensure: change from absent to present failed: Not managing Keystone_service[Image Service] due to earlier Keystone API failures.

Debug shows lots of this:

Debug: Prefetching openstack resources for keystone_service
Debug: Executing '/usr/bin/openstack service list --quiet --format csv --long'
Debug: Puppet::Provider::Openstack: Non-fatal error: 'Execution of '/usr/bin/openstack service list --quiet --format csv --long' returned 1: __init__() got an unexpected keyword argument 'token''. Retrying for 169 more seconds
Debug: Executing '/usr/bin/openstack service list --quiet --format csv --long'
Debug: Puppet::Provider::Openstack: Non-fatal error: 'Execution of '/usr/bin/openstack service list --quiet --format csv --long' returned 1: __init__() got an unexpected keyword argument 'token''. Retrying for 165 more seconds
Debug: Executing '/usr/bin/openstack service list --quiet --format csv --long'
Debug: Puppet::Provider::Openstack: Non-fatal error: 'Execution of '/usr/bin/openstack service list --quiet --format csv --long' returned 1: __init__() got an unexpected keyword argument 'token''. Retrying for 161 more seconds

Running the openstack client command manually [ openstack service list --quiet --format csv --long ] works fine.

I don't see anything obvious in the keystone logs.

Please let me know if you need any more info.

Revision history for this message
jcat (jcat) wrote :

ok - I've worked out why this was happening.

It relates to Puppet::Provider::Openstack::Auth from openstacklib, and they way environment variables are used to authenticate.

We have an alternative openrc file, under another name, that has OS_AUTH_TYPE='v3password' set.
If that had been sourced, and exported OS_AUTH_TYPE='v3password' into the environment used to run puppet, the openstack client fails with the error: __init__() got an unexpected keyword argument 'token'

I'm still not 100% sure why it happens, as after reading the provider, it looks like it should try and use the RC file, and of that doesn't work, load the environment variables starting with "OS_". Yet it seems that a combination of environment variables and the admin_token are being used to run the openstack client.

It's an understatement to say, I'm no ruby export, so it would be nice to know whether or not this is expected behaviour or a condition that could be coded round.

Hence I'll leave this bug open for now and change it to openstacklib, pending any input from people that know :)

Thanks in advance.

affects: puppet-keystone → puppet-openstacklib
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.