From b7071d406cb41fab612765a566a3bd791201afeb Mon Sep 17 00:00:00 2001 From: yatin Date: Wed, 30 Aug 2017 12:11:23 +0530 Subject: [PATCH] Fix magnum cluster TLS cert generation Magnum cluster's cert creation requires admin_user, admin_password and admin_tenant_name to be set in [keystone_authtoken] section. Change-Id: Ice8e6537ac6796df032c4c4cf2a194d2214430fd Closes-Bug: #1670355 --- manifests/keystone/authtoken.pp | 6 ++++++ spec/classes/magnum_keystone_authtoken_spec.rb | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index bd38433..693bd99 100755 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -256,4 +256,10 @@ class magnum::keystone::authtoken( signing_dir => $signing_dir, token_cache_time => $token_cache_time, } + + magnum_config { + 'keystone_authtoken/admin_tenant_name': value => $project_name; + 'keystone_authtoken/admin_user' : value => $username; + 'keystone_authtoken/admin_password' : value => $password, secret => true; + } } diff --git a/spec/classes/magnum_keystone_authtoken_spec.rb b/spec/classes/magnum_keystone_authtoken_spec.rb index 258f515..d8b7470 100755 --- a/spec/classes/magnum_keystone_authtoken_spec.rb +++ b/spec/classes/magnum_keystone_authtoken_spec.rb @@ -19,6 +19,9 @@ describe 'magnum::keystone::authtoken' do is_expected.to contain_magnum_config('keystone_authtoken/password').with_value('magnum_password') is_expected.to contain_magnum_config('keystone_authtoken/auth_url').with_value('http://localhost:35357') is_expected.to contain_magnum_config('keystone_authtoken/project_name').with_value('services') + is_expected.to contain_magnum_config('keystone_authtoken/admin_user').with_value('magnum') + is_expected.to contain_magnum_config('keystone_authtoken/admin_password').with_value('magnum_password') + is_expected.to contain_magnum_config('keystone_authtoken/admin_tenant_name').with_value('services') is_expected.to contain_magnum_config('keystone_authtoken/user_domain_name').with_value('') is_expected.to contain_magnum_config('keystone_authtoken/project_domain_name').with_value('') is_expected.to contain_magnum_config('keystone_authtoken/insecure').with_value('') @@ -100,6 +103,9 @@ describe 'magnum::keystone::authtoken' do is_expected.to contain_magnum_config('keystone_authtoken/password').with_value(params[:password]).with_secret(true) is_expected.to contain_magnum_config('keystone_authtoken/auth_url').with_value(params[:auth_url]) is_expected.to contain_magnum_config('keystone_authtoken/project_name').with_value(params[:project_name]) + is_expected.to contain_magnum_config('keystone_authtoken/admin_user').with_value(params[:username]) + is_expected.to contain_magnum_config('keystone_authtoken/admin_password').with_value(params[:password]).with_secret(true) + is_expected.to contain_magnum_config('keystone_authtoken/admin_tenant_name').with_value(params[:project_name]) is_expected.to contain_magnum_config('keystone_authtoken/user_domain_name').with_value(params[:user_domain_name]) is_expected.to contain_magnum_config('keystone_authtoken/project_domain_name').with_value(params[:project_domain_name]) is_expected.to contain_magnum_config('keystone_authtoken/insecure').with_value(params[:insecure])