Remove deprecated keystone cache parameters

Change-Id: Iae8a1263ef40c83e107a08a5d0f2b6f98214a8f0
This commit is contained in:
Tobias Urdin 2020-08-18 09:17:18 +02:00
parent 5181859291
commit 5ae2172cbc
4 changed files with 28 additions and 142 deletions

View File

@ -109,57 +109,39 @@ class keystone::cache(
include keystone::deps
# Pick old stry hierdata to keep backword compatibility
$config_prefix_real = pick($::keystone::cache_config_prefix, $config_prefix)
$expiration_time_real = pick($::keystone::cache_expiration_time, $expiration_time)
$backend_real = pick($::keystone::cache_backend, $backend)
$backend_argument_real = pick($::keystone::cache_backend_argument, $backend_argument)
$proxies_real = pick($::keystone::cache_proxies, $proxies)
$enabled_real = pick($::keystone::cache_enabled, $enabled)
$debug_cache_backend_real = pick($::keystone::debug_cache_backend, $debug_cache_backend)
$memcache_servers_real = pick($::keystone::cache_memcache_servers, $memcache_servers)
$memcache_dead_retry_real = pick($::keystone::memcache_dead_retry_real, $memcache_dead_retry)
$memcache_socket_timeout_real = pick($::keytstone::memcache_socket_timeout_real, $memcache_socket_timeout)
$memcache_pool_maxsize_real = pick($::keystone::memcache_pool_maxsize, $memcache_pool_maxsize)
$memcache_pool_unused_timeout_real = pick($::keystone::memcache_pool_unused_timeout, $memcache_pool_unused_timeout)
$memcache_pool_connection_get_timeout_real =
pick($::keystone::memcache_pool_connection_get_timeout, $memcache_pool_connection_get_timeout)
$manage_backend_package_real = pick($::keystone::manage_backend_package_real, $manage_backend_package)
$token_caching_real = pick($::keystone::token_caching, $token_caching)
if is_string($memcache_servers_real) {
$memcache_servers_array = split($memcache_servers_real, ',')
if is_string($memcache_servers) {
$memcache_servers_array = split($memcache_servers, ',')
} else {
$memcache_servers_array = $memcache_servers_real
$memcache_servers_array = $memcache_servers
}
if !is_service_default($memcache_servers_real) {
if !is_service_default($memcache_servers) {
Service<| title == 'memcached' |> -> Anchor['keystone::service::begin']
}
keystone_config {
'memcache/dead_retry': value => $memcache_dead_retry_real;
'memcache/pool_maxsize': value => $memcache_pool_maxsize_real;
'memcache/pool_unused_timeout': value => $memcache_pool_unused_timeout_real;
'memcache/socket_timeout': value => $memcache_socket_timeout_real;
'token/caching': value => $token_caching_real;
'memcache/dead_retry': value => $memcache_dead_retry;
'memcache/pool_maxsize': value => $memcache_pool_maxsize;
'memcache/pool_unused_timeout': value => $memcache_pool_unused_timeout;
'memcache/socket_timeout': value => $memcache_socket_timeout;
'token/caching': value => $token_caching;
}
oslo::cache { 'keystone_config':
config_prefix => $config_prefix_real,
expiration_time => $expiration_time_real,
backend => $backend_real,
backend_argument => $backend_argument_real,
proxies => $proxies_real,
enabled => $enabled_real,
debug_cache_backend => $debug_cache_backend_real,
config_prefix => $config_prefix,
expiration_time => $expiration_time,
backend => $backend,
backend_argument => $backend_argument,
proxies => $proxies,
enabled => $enabled,
debug_cache_backend => $debug_cache_backend,
memcache_servers => $memcache_servers_array,
memcache_dead_retry => $memcache_dead_retry_real,
memcache_socket_timeout => $memcache_socket_timeout_real,
memcache_pool_maxsize => $memcache_pool_maxsize_real,
memcache_pool_unused_timeout => $memcache_pool_unused_timeout_real,
memcache_pool_connection_get_timeout => $memcache_pool_connection_get_timeout_real,
manage_backend_package => $manage_backend_package_real,
memcache_dead_retry => $memcache_dead_retry,
memcache_socket_timeout => $memcache_socket_timeout,
memcache_pool_maxsize => $memcache_pool_maxsize,
memcache_pool_unused_timeout => $memcache_pool_unused_timeout,
memcache_pool_connection_get_timeout => $memcache_pool_connection_get_timeout,
manage_backend_package => $manage_backend_package,
}
}

View File

@ -457,88 +457,6 @@
# (Optional) Minimum number of SQL connections to keep open in a pool.
# Defaults to: undef
#
# [*cache_backend*]
# (Optional) Dogpile.cache backend module. It is recommended that Memcache with pooling
# (keystone.cache.memcache_pool) or Redis (dogpile.cache.redis) be used in production.
# This has no effect unless cache_enabled is true and cache_memcache_servers is set.
# Defaults to undef
#
# [*cache_backend_argument*]
# (Optional) List of arguments in format of argname:value supplied to the backend module.
# Specify this option once per argument to be passed to the dogpile.cache backend.
# This has no effect unless cache_backend and cache_enabled is set.
# Default to undef
#
# [*cache_enabled*]
# (Optional) Setting this boolean will enable the caching backend for Keystone.
# Defaults to undef
#
# [*cache_memcache_servers*]
# (Optional) List of memcache servers to be used with the caching backend to
# configure cache/memcache_servers. This has no effect unless cache_backend
# is set and cache_enabled is true.
# Specified as a comma separated string of 'server:port,server:port' or an
# array of servers ['server:port', 'server:port'].
# Default to undef
#
# [*debug_cache_backend*]
# (Optional) Extra debugging from the cache backend (cache keys, get/set/delete calls).
# Default to undef
#
# [*cache_config_prefix*]
# (Optional) Prefix for building the configuration dictionary for
# the cache region. This should not need to be changed unless there
# is another dogpile.cache region with the same configuration name.
# (string value)
# Defaults to undef
#
# [*cache_expiration_time*]
# (Optional) Default TTL, in seconds, for any cached item in the
# dogpile.cache region. This applies to any cached method that
# doesn't have an explicit cache expiration time defined for it.
# (integer value)
# Defaults to undef
#
# [*cache_proxies*]
# (Optional) Proxy classes to import that will affect the way the
# dogpile.cache backend functions. See the dogpile.cache documentation on
# changing-backend-behavior. (list value)
# Defaults to undef
#
# [*token_caching*]
# (Optional) Toggle for token system caching. This has no effect unless
# cache_backend, cache_enabled and cache_memcache_servers is set.
# Default to undef
#
# [*memcache_dead_retry*]
# (Optional) Number of seconds memcached server is considered dead before it
# is tried again. This is used for the cache memcache_dead_retry and the
# memcache dead_retry values.
# Defaults to undef
#
# [*memcache_socket_timeout*]
# (Optional) Timeout in seconds for every call to a server.
# (floating point value)
# Defaults to undef
#
# [*memcache_pool_maxsize*]
# (Optional) Max total number of open connections to every memcached server.
# Defaults to undef
#
# [*memcache_pool_unused_timeout*]
# (Optional) Number of seconds a connection to memcached is held unused in
# the pool before it is closed.
# Defaults to undef
#
# [*memcache_pool_connection_get_timeout*]
# (Optional) Number of seconds that an operation will wait to get a memcache
# client connection. (integer value)
# Defaults to undef
#
# [*manage_backend_package*]
# (Optional) (Optional) Whether to install the backend package for the cache.
# Defaults to undef
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
@ -633,27 +551,11 @@ class keystone(
$validate_auth_url = undef,
$validate_cacert = undef,
$database_min_pool_size = undef,
$cache_backend = undef,
$cache_backend_argument = undef,
$cache_enabled = undef,
$cache_memcache_servers = undef,
$debug_cache_backend = undef,
$cache_config_prefix = undef,
$cache_expiration_time = undef,
$cache_proxies = undef,
$token_caching = undef,
$memcache_dead_retry = undef,
$memcache_socket_timeout = undef,
$memcache_pool_maxsize = undef,
$memcache_pool_unused_timeout = undef,
$memcache_pool_connection_get_timeout = undef,
$manage_backend_package = undef,
) inherits keystone::params {
include keystone::deps
include keystone::logging
include keystone::policy
include keystone::cache
if $token_driver {
warning('keystone::token_driver is deprecated, has no effect and will be removed in a later release')

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The deprecated cache related parameters in the keystone class is removed and
the keystone::cache is no longer included by default.
Deployments should explicitly include the keystone::cache class.

View File

@ -30,10 +30,6 @@ describe 'keystone' do
'password_hash_rounds' => '<SERVICE DEFAULT>',
'revoke_driver' => 'sql',
'revoke_by_id' => true,
'cache_backend' => '<SERVICE DEFAULT>',
'cache_backend_argument' => '<SERVICE DEFAULT>',
'cache_enabled' => '<SERVICE DEFAULT>',
'cache_memcache_servers' => '<SERVICE DEFAULT>',
'enable_ssl' => false,
'ssl_certfile' => '/etc/keystone/ssl/certs/keystone.pem',
'ssl_keyfile' => '/etc/keystone/ssl/private/keystonekey.pem',