diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index e2db1a0f5..9b9e5fcc9 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -172,19 +172,20 @@ # (Optional) The region in which the identity server can be found. # Defaults to $::os_service_default. # -# [*revocation_cache_time*] -# (Optional) Determines the frequency at which the list of revoked tokens is -# retrieved from the Identity service (in seconds). A high number of -# revocation events combined with a low cache duration may significantly -# reduce performance. Only valid for PKI tokens. Integer value -# Defaults to $::os_service_default. -# # [*token_cache_time*] # (Optional) In order to prevent excessive effort spent validating tokens, # the middleware caches previously-seen tokens for a configurable duration # (in seconds). Set to -1 to disable caching completely. Integer value # Defaults to $::os_service_default. # +# DEPRECATED PARAMETERS +# +# [*revocation_cache_time*] +# (Optional) Determines the frequency at which the list of revoked tokens is +# retrieved from the Identity service (in seconds). A high number of +# revocation events combined with a low cache duration may significantly +# reduce performance. Only valid for PKI tokens. Integer value +# Defaults to undef # class nova::keystone::authtoken( $username = 'nova', @@ -220,14 +221,18 @@ class nova::keystone::authtoken( $memcached_servers = $::os_service_default, $manage_memcache_package = false, $region_name = $::os_service_default, - $revocation_cache_time = $::os_service_default, $token_cache_time = $::os_service_default, + # DEPRECATED PARAMETERS + $revocation_cache_time = undef, ) { if is_service_default($password) { fail('Please set password for nova service user') } + if $revocation_cache_time { + warning('revocation_cache_time parameter is deprecated, has no effect and will be removed in the future.') + } keystone::resource::authtoken { 'nova_config': username => $username, @@ -263,7 +268,6 @@ class nova::keystone::authtoken( memcached_servers => $memcached_servers, manage_memcache_package => $manage_memcache_package, region_name => $region_name, - revocation_cache_time => $revocation_cache_time, token_cache_time => $token_cache_time, } } diff --git a/manifests/metadata/novajoin/authtoken.pp b/manifests/metadata/novajoin/authtoken.pp index 1b293d393..7841444f3 100644 --- a/manifests/metadata/novajoin/authtoken.pp +++ b/manifests/metadata/novajoin/authtoken.pp @@ -172,19 +172,21 @@ # (Optional) The region in which the identity server can be found. # Defaults to $::os_service_default. # -# [*revocation_cache_time*] -# (Optional) Determines the frequency at which the list of revoked tokens is -# retrieved from the Identity service (in seconds). A high number of -# revocation events combined with a low cache duration may significantly -# reduce performance. Only valid for PKI tokens. Integer value -# Defaults to $::os_service_default. -# # [*token_cache_time*] # (Optional) In order to prevent excessive effort spent validating tokens, # the middleware caches previously-seen tokens for a configurable duration # (in seconds). Set to -1 to disable caching completely. Integer value # Defaults to $::os_service_default. # +# DEPRECATED PARAMETERS +# +# [*revocation_cache_time*] +# (Optional) Determines the frequency at which the list of revoked tokens is +# retrieved from the Identity service (in seconds). A high number of +# revocation events combined with a low cache duration may significantly +# reduce performance. Only valid for PKI tokens. Integer value +# Defaults to undef +# class nova::metadata::novajoin::authtoken( $username = 'novajoin', $password = $::os_service_default, @@ -219,14 +221,19 @@ class nova::metadata::novajoin::authtoken( $memcached_servers = $::os_service_default, $manage_memcache_package = false, $region_name = $::os_service_default, - $revocation_cache_time = $::os_service_default, $token_cache_time = $::os_service_default, + # DEPRECATED PARAMETERS + $revocation_cache_time = undef, ) { if is_service_default($password) { fail('Please set password for novajoin service user') } + if $revocation_cache_time { + warning('revocation_cache_time parameter is deprecated, has no effect and will be removed in the future.') + } + keystone::resource::authtoken { 'novajoin_config': username => $username, password => $password, @@ -261,7 +268,6 @@ class nova::metadata::novajoin::authtoken( memcached_servers => $memcached_servers, manage_memcache_package => $manage_memcache_package, region_name => $region_name, - revocation_cache_time => $revocation_cache_time, token_cache_time => $token_cache_time, } } diff --git a/releasenotes/notes/deprecate_revocation_cache_time_parameter-9f91fd37091db26f.yaml b/releasenotes/notes/deprecate_revocation_cache_time_parameter-9f91fd37091db26f.yaml new file mode 100644 index 000000000..438a91369 --- /dev/null +++ b/releasenotes/notes/deprecate_revocation_cache_time_parameter-9f91fd37091db26f.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - revocation_cache_time option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/classes/nova_keystone_authtoken_spec.rb b/spec/classes/nova_keystone_authtoken_spec.rb index 28b23ac03..922d3e84c 100644 --- a/spec/classes/nova_keystone_authtoken_spec.rb +++ b/spec/classes/nova_keystone_authtoken_spec.rb @@ -43,7 +43,6 @@ describe 'nova::keystone::authtoken' do is_expected.to contain_nova_config('keystone_authtoken/memcache_use_advanced_pool').with_value('') is_expected.to contain_nova_config('keystone_authtoken/memcached_servers').with_value('') is_expected.to contain_nova_config('keystone_authtoken/region_name').with_value('') - is_expected.to contain_nova_config('keystone_authtoken/revocation_cache_time').with_value('') is_expected.to contain_nova_config('keystone_authtoken/token_cache_time').with_value('') end end @@ -86,7 +85,6 @@ describe 'nova::keystone::authtoken' do ['memcached01:11211','memcached02:11211'], :manage_memcache_package => true, :region_name => 'region2', - :revocation_cache_time => '11', :token_cache_time => '301', }) end @@ -124,7 +122,6 @@ describe 'nova::keystone::authtoken' do is_expected.to contain_nova_config('keystone_authtoken/memcache_use_advanced_pool').with_value(params[:memcache_use_advanced_pool]) is_expected.to contain_nova_config('keystone_authtoken/memcached_servers').with_value('memcached01:11211,memcached02:11211') is_expected.to contain_nova_config('keystone_authtoken/region_name').with_value(params[:region_name]) - is_expected.to contain_nova_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time]) is_expected.to contain_nova_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time]) end diff --git a/spec/classes/nova_metadata_novajoin_authtoken_spec.rb b/spec/classes/nova_metadata_novajoin_authtoken_spec.rb index eb50100b3..0851a4a3f 100644 --- a/spec/classes/nova_metadata_novajoin_authtoken_spec.rb +++ b/spec/classes/nova_metadata_novajoin_authtoken_spec.rb @@ -43,7 +43,6 @@ describe 'nova::metadata::novajoin::authtoken' do is_expected.to contain_novajoin_config('keystone_authtoken/memcache_use_advanced_pool').with_value('') is_expected.to contain_novajoin_config('keystone_authtoken/memcached_servers').with_value('') is_expected.to contain_novajoin_config('keystone_authtoken/region_name').with_value('') - is_expected.to contain_novajoin_config('keystone_authtoken/revocation_cache_time').with_value('') is_expected.to contain_novajoin_config('keystone_authtoken/token_cache_time').with_value('') end end @@ -86,7 +85,6 @@ describe 'nova::metadata::novajoin::authtoken' do ['memcached01:11211','memcached02:11211'], :manage_memcache_package => true, :region_name => 'region2', - :revocation_cache_time => '11', :token_cache_time => '301', }) end @@ -124,7 +122,6 @@ describe 'nova::metadata::novajoin::authtoken' do is_expected.to contain_novajoin_config('keystone_authtoken/memcache_use_advanced_pool').with_value(params[:memcache_use_advanced_pool]) is_expected.to contain_novajoin_config('keystone_authtoken/memcached_servers').with_value('memcached01:11211,memcached02:11211') is_expected.to contain_novajoin_config('keystone_authtoken/region_name').with_value(params[:region_name]) - is_expected.to contain_novajoin_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time]) is_expected.to contain_novajoin_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time]) end