Creating Keystone users with a password in the puppet module (Kilo&Liberty) throws error at second puppetrun
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| puppet-keystone |
High
|
Unassigned |
Bug Description
I am using the Kilo puppet recipes to setup Kilo on Ubuntu 14.04 to test the latest Puppet recipes with Vagrant.
I am creating an keystone admin user from within the puppet recipe.
Creating the keystone user works fine but the second puppetrun gives an error if the password is set for the user you want to create.
Error: /Stage[
* When you do not pass the password in the keystone_user native type it does not throw an error.
* The first run will create the user successfully and set the password
* After sourcing the credentials file and running manually "/usr/bin/openstack token issue --format value” also does not give an error.
( I could not immediately find where puppet decides this command is run and with which credentials. )
Example puppet keystone user config which breaks after the second run:
keystone_user { 'admin':
password => $::openstack:
email => 'admin@openstack',
ensure => present,
enabled => True,
}
I did not experience these issues with the Juno recipe
Piotr Kasprzak (piotr-kasprzak) wrote : | #1 |
Matt Fischer (mfisch) wrote : | #2 |
Also occurs on stable/kilo branch.
Changed in puppet-keystone: | |
importance: | Undecided → High |
Matt Fischer (mfisch) wrote : | #3 |
I've found this happens if you run puppet after sourcing an admin openrc.
Matt Fischer (mfisch) wrote : | #4 |
More details.
I can repro this by simply setting OS_AUTH_URL=http://
Alex Schultz (alex-schultz) wrote : | #5 |
So this appears to be an issue of v2 vs v3 and the puppet provider for the password parameter of keystone_user[0]. We've discovered that if your openrc contains a v2 url, you have sourced it and you attempt to run puppet it will result in this error. I believe the priority of the credentials is ENVIRONMENT > PUPPET so it may attempt to use a domain scoped token against the v2 endpoint resulting in error. We may need to check the auth url version and not try domains against a v2 auth url. Also you can also pass in replace_password = false and it'll skip all this logic.
summary: |
- Creating Keystone users with a password in the puppet module (Kilo) - throws error at second puppetrun + Creating Keystone users with a password in the puppet module + (Kilo&Liberty) throws error at second puppetrun |
Same problem / workaround here.
I can also confirm that the problem did not occur with the master branch from one month ago (i.e. before the keystone v3 stuff was merged).
I have captured all the http communication between the puppet module and and keystone here: /gist.github. com/pkasprzak/ 933cbe9d87eeb87 164fa
https:/
'e68fd27a4c7a46 f18b4b7555ecce6 fb4' is the id of the admin user for whom the problem occurs:
root@controlle r1:~# openstack user show e68fd27a4c7a46f 18b4b7555ecce6f b4 -----+- ------- ------- ------- ------- -----+ -----+- ------- ------- ------- ------- -----+ 18b4b7555ecce6f b4 | -----+- ------- ------- ------- ------- -----+
+------
| Field | Value |
+------
| domain_id | default |
| email | <email address hidden> |
| enabled | True |
| id | e68fd27a4c7a46f
| name | admin |
+------
Of course I can provide further information if requested.
Thanks!