From d18f3f815008e97578fcb214a90a3c7295678e3a Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 16 Oct 2017 10:50:14 +0800 Subject: [PATCH] Set *_domain_name vars to 'Default' by default Keystone v2 api's are removed in [1], so it's required to set user_domain_name and project_domain_name otherwise all requests fallbacks to keystone v2.0 and fails. [1] https://review.openstack.org/#/c/499783/ Change-Id: If52cd4cea4d3fceb7e272366d20276a209b4dc5b Closes-Bug: #1723838 --- manifests/keystone/authtoken.pp | 8 ++++---- releasenotes/notes/default_domain-a85852fdf2a9df3d.yaml | 6 ++++++ spec/classes/designate_keystone_authtoken_spec.rb | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/default_domain-a85852fdf2a9df3d.yaml diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 329f0d70..86e273e4 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -22,11 +22,11 @@ # # [*user_domain_name*] # (Optional) Name of domain for $username -# Defaults to $::os_service_default +# Defaults to 'Default' # # [*project_domain_name*] # (Optional) Name of domain for $project_name -# Defaults to $::os_service_default +# Defaults to 'Default' # # [*insecure*] # (Optional) If true, explicitly allow TLS without checking server cert @@ -197,8 +197,8 @@ class designate::keystone::authtoken( $password = $::os_service_default, $auth_url = 'http://localhost:35357', $project_name = 'services', - $user_domain_name = $::os_service_default, - $project_domain_name = $::os_service_default, + $user_domain_name = 'Default', + $project_domain_name = 'Default', $insecure = $::os_service_default, $auth_section = $::os_service_default, $auth_type = 'password', diff --git a/releasenotes/notes/default_domain-a85852fdf2a9df3d.yaml b/releasenotes/notes/default_domain-a85852fdf2a9df3d.yaml new file mode 100644 index 00000000..7394505c --- /dev/null +++ b/releasenotes/notes/default_domain-a85852fdf2a9df3d.yaml @@ -0,0 +1,6 @@ +--- +issues: + - | + Keystone v2.0 API was removed so we need to set a default value + for user_domain_name and project_domain name, which will be + Default as it is already in some other classes in modules. diff --git a/spec/classes/designate_keystone_authtoken_spec.rb b/spec/classes/designate_keystone_authtoken_spec.rb index 31757673..f157f2ad 100644 --- a/spec/classes/designate_keystone_authtoken_spec.rb +++ b/spec/classes/designate_keystone_authtoken_spec.rb @@ -15,8 +15,8 @@ describe 'designate::keystone::authtoken' do is_expected.to contain_designate_config('keystone_authtoken/password').with_value('designate_password') is_expected.to contain_designate_config('keystone_authtoken/auth_url').with_value('http://localhost:35357') is_expected.to contain_designate_config('keystone_authtoken/project_name').with_value('services') - is_expected.to contain_designate_config('keystone_authtoken/user_domain_name').with_value('') - is_expected.to contain_designate_config('keystone_authtoken/project_domain_name').with_value('') + is_expected.to contain_designate_config('keystone_authtoken/user_domain_name').with_value('Default') + is_expected.to contain_designate_config('keystone_authtoken/project_domain_name').with_value('Default') is_expected.to contain_designate_config('keystone_authtoken/insecure').with_value('') is_expected.to contain_designate_config('keystone_authtoken/auth_section').with_value('') is_expected.to contain_designate_config('keystone_authtoken/auth_type').with_value('password')