cache: Deprecate support for legacy backend specific options
These options were deprecated in favor of the new generic options. Depends-on: https://review.opendev.org/977500 Change-Id: I4abbba5860c9f3744cab8ead1edaee53eb9c78ba Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -52,6 +52,18 @@
|
||||
# Typically this should be left set to false. (boolean value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*socket_timeout*]
|
||||
# (Optional) Timeout in seconds for every call to a server.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*username*]
|
||||
# (Optional) The user name for authentication to backend.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*password*]
|
||||
# (Optional) The password for authentication to backend.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*memcache_servers*]
|
||||
# (Optional) Memcache servers in the format of "host:port".
|
||||
# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
|
||||
@@ -64,12 +76,6 @@
|
||||
# backends only). (integer value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*memcache_socket_timeout*]
|
||||
# (Optional) Timeout in seconds for every call to a server.
|
||||
# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
|
||||
# (floating point value)
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*enable_socket_keepalive*]
|
||||
# (Optional) Global toggle for the socket keepalive of dogpile's
|
||||
# pymemcache backend
|
||||
@@ -117,34 +123,14 @@
|
||||
# (Optional) Whether SASL is enabled in memcached
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*memcache_username*]
|
||||
# (Optional) The user name for the memcached with SASL enabled
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*memcache_password*]
|
||||
# (Optional) The password for the memcached with SASL enabled
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*redis_server*]
|
||||
# (Optional) Redis server in the format of "host:port".
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*redis_username*]
|
||||
# (Optional) The user name for redis
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*redis_password*]
|
||||
# (Optional) The password for redis
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*redis_sentinels*]
|
||||
# (Optional) Redis sentinel servers in the format of host:port
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*redis_socket_timeout*]
|
||||
# (Optional) Timeout in seconds for every call to a server
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*redis_sentinel_service_name*]
|
||||
# (Optional) Service name of the redis sentinel cluster.
|
||||
# Defaults to $facts['os_service_default']
|
||||
@@ -229,6 +215,32 @@
|
||||
# back in the pool in the HashClient's internal mechanisms.
|
||||
# Default to undef
|
||||
#
|
||||
# [*memcache_username*]
|
||||
# (Optional) The user name for the memcached with SASL enabled
|
||||
# Default to undef
|
||||
#
|
||||
# [*memcache_password*]
|
||||
# (Optional) The password for the memcached with SASL enabled
|
||||
# Default to undef
|
||||
#
|
||||
# [*redis_username*]
|
||||
# (Optional) The user name for redis
|
||||
# Default to undef
|
||||
#
|
||||
# [*redis_password*]
|
||||
# (Optional) The password for redis
|
||||
# Default to undef
|
||||
#
|
||||
# [*memcache_socket_timeout*]
|
||||
# (Optional) Timeout in seconds for every call to a server.
|
||||
# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
|
||||
# (floating point value)
|
||||
# Default to undef
|
||||
#
|
||||
# [*redis_socket_timeout*]
|
||||
# (Optional) Timeout in seconds for every call to a server
|
||||
# Default to undef
|
||||
#
|
||||
class watcher::cache (
|
||||
$config_prefix = $facts['os_service_default'],
|
||||
$expiration_time = $facts['os_service_default'],
|
||||
@@ -238,9 +250,11 @@ class watcher::cache (
|
||||
$proxies = $facts['os_service_default'],
|
||||
$enabled = $facts['os_service_default'],
|
||||
$debug_cache_backend = $facts['os_service_default'],
|
||||
$socket_timeout = $facts['os_service_default'],
|
||||
$username = $facts['os_service_default'],
|
||||
$password = $facts['os_service_default'],
|
||||
$memcache_servers = $facts['os_service_default'],
|
||||
$memcache_dead_retry = $facts['os_service_default'],
|
||||
$memcache_socket_timeout = $facts['os_service_default'],
|
||||
$enable_socket_keepalive = $facts['os_service_default'],
|
||||
$socket_keepalive_idle = $facts['os_service_default'],
|
||||
$socket_keepalive_interval = $facts['os_service_default'],
|
||||
@@ -250,13 +264,8 @@ class watcher::cache (
|
||||
$memcache_pool_connection_get_timeout = $facts['os_service_default'],
|
||||
$memcache_pool_flush_on_reconnect = $facts['os_service_default'],
|
||||
$memcache_sasl_enabled = $facts['os_service_default'],
|
||||
$memcache_username = $facts['os_service_default'],
|
||||
$memcache_password = $facts['os_service_default'],
|
||||
$redis_server = $facts['os_service_default'],
|
||||
$redis_username = $facts['os_service_default'],
|
||||
$redis_password = $facts['os_service_default'],
|
||||
$redis_sentinels = $facts['os_service_default'],
|
||||
$redis_socket_timeout = $facts['os_service_default'],
|
||||
$redis_sentinel_service_name = $facts['os_service_default'],
|
||||
$tls_enabled = $facts['os_service_default'],
|
||||
$tls_cafile = $facts['os_service_default'],
|
||||
@@ -270,8 +279,15 @@ class watcher::cache (
|
||||
$hashclient_retry_timeout = $facts['os_service_default'],
|
||||
$hashclient_dead_timeout = $facts['os_service_default'],
|
||||
Boolean $manage_backend_package = true,
|
||||
# DEPRECATED PARAMETERS
|
||||
$hashclient_retry_delay = undef,
|
||||
$dead_timeout = undef,
|
||||
$memcache_username = undef,
|
||||
$memcache_password = undef,
|
||||
$redis_username = undef,
|
||||
$redis_password = undef,
|
||||
$memcache_socket_timeout = undef,
|
||||
$redis_socket_timeout = undef,
|
||||
) {
|
||||
include watcher::deps
|
||||
|
||||
@@ -284,6 +300,9 @@ class watcher::cache (
|
||||
proxies => $proxies,
|
||||
enabled => $enabled,
|
||||
debug_cache_backend => $debug_cache_backend,
|
||||
socket_timeout => $socket_timeout,
|
||||
username => $username,
|
||||
password => $password,
|
||||
memcache_servers => $memcache_servers,
|
||||
memcache_dead_retry => $memcache_dead_retry,
|
||||
memcache_socket_timeout => $memcache_socket_timeout,
|
||||
|
||||
10
releasenotes/notes/general-opt-names-0af25e366d80dcf1.yaml
Normal file
10
releasenotes/notes/general-opt-names-0af25e366d80dcf1.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The following parameters of the ``watcher::cache`` class have
|
||||
been deprecated in favor of the new generic parameters.
|
||||
|
||||
- ``memcache_username`` and ``redis_username`` (Use ``username``)
|
||||
- ``memcache_password`` and ``redis_password`` (Use ``password``)
|
||||
- ``memcache_socket_timeout`` and ``redis_socket_timeout``
|
||||
(Use ``socket_timeout``)
|
||||
@@ -19,9 +19,12 @@ describe 'watcher::cache' do
|
||||
:proxies => '<SERVICE DEFAULT>',
|
||||
:enabled => '<SERVICE DEFAULT>',
|
||||
:debug_cache_backend => '<SERVICE DEFAULT>',
|
||||
:socket_timeout => '<SERVICE DEFAULT>',
|
||||
:username => '<SERVICE DEFAULT>',
|
||||
:password => '<SERVICE DEFAULT>',
|
||||
:memcache_servers => '<SERVICE DEFAULT>',
|
||||
:memcache_dead_retry => '<SERVICE DEFAULT>',
|
||||
:memcache_socket_timeout => '<SERVICE DEFAULT>',
|
||||
:memcache_socket_timeout => nil,
|
||||
:enable_socket_keepalive => '<SERVICE DEFAULT>',
|
||||
:socket_keepalive_idle => '<SERVICE DEFAULT>',
|
||||
:socket_keepalive_interval => '<SERVICE DEFAULT>',
|
||||
@@ -31,13 +34,13 @@ describe 'watcher::cache' do
|
||||
:memcache_pool_connection_get_timeout => '<SERVICE DEFAULT>',
|
||||
:memcache_pool_flush_on_reconnect => '<SERVICE DEFAULT>',
|
||||
:memcache_sasl_enabled => '<SERVICE DEFAULT>',
|
||||
:memcache_username => '<SERVICE DEFAULT>',
|
||||
:memcache_password => '<SERVICE DEFAULT>',
|
||||
:memcache_username => nil,
|
||||
:memcache_password => nil,
|
||||
:redis_server => '<SERVICE DEFAULT>',
|
||||
:redis_username => '<SERVICE DEFAULT>',
|
||||
:redis_password => '<SERVICE DEFAULT>',
|
||||
:redis_username => nil,
|
||||
:redis_password => nil,
|
||||
:redis_sentinels => '<SERVICE DEFAULT>',
|
||||
:redis_socket_timeout => '<SERVICE DEFAULT>',
|
||||
:redis_socket_timeout => nil,
|
||||
:redis_sentinel_service_name => '<SERVICE DEFAULT>',
|
||||
:tls_enabled => '<SERVICE DEFAULT>',
|
||||
:tls_cafile => '<SERVICE DEFAULT>',
|
||||
@@ -67,9 +70,12 @@ describe 'watcher::cache' do
|
||||
:proxies => ['proxy01:8888', 'proxy02:8888'],
|
||||
:enabled => true,
|
||||
:debug_cache_backend => false,
|
||||
:socket_timeout => 3.0,
|
||||
:username => 'user',
|
||||
:password => 'pass',
|
||||
:memcache_servers => ['memcached01:11211', 'memcached02:11211'],
|
||||
:memcache_dead_retry => '60',
|
||||
:memcache_socket_timeout => '300.0',
|
||||
:memcache_socket_timeout => 3.1,
|
||||
:enable_socket_keepalive => false,
|
||||
:socket_keepalive_idle => 1,
|
||||
:socket_keepalive_interval => 1,
|
||||
@@ -85,7 +91,7 @@ describe 'watcher::cache' do
|
||||
:redis_username => 'redisuser',
|
||||
:redis_password => 'redispass',
|
||||
:redis_sentinels => ['host1:26379', 'host2:26379'],
|
||||
:redis_socket_timeout => 1.0,
|
||||
:redis_socket_timeout => 3.2,
|
||||
:redis_sentinel_service_name => 'mymaster',
|
||||
:tls_enabled => false,
|
||||
:enable_retry_client => false,
|
||||
@@ -110,9 +116,12 @@ describe 'watcher::cache' do
|
||||
:proxies => ['proxy01:8888', 'proxy02:8888'],
|
||||
:enabled => true,
|
||||
:debug_cache_backend => false,
|
||||
:socket_timeout => 3.0,
|
||||
:username => 'user',
|
||||
:password => 'pass',
|
||||
:memcache_servers => ['memcached01:11211', 'memcached02:11211'],
|
||||
:memcache_dead_retry => '60',
|
||||
:memcache_socket_timeout => '300.0',
|
||||
:memcache_socket_timeout => 3.1,
|
||||
:enable_socket_keepalive => false,
|
||||
:socket_keepalive_idle => 1,
|
||||
:socket_keepalive_interval => 1,
|
||||
@@ -128,7 +137,7 @@ describe 'watcher::cache' do
|
||||
:redis_username => 'redisuser',
|
||||
:redis_password => 'redispass',
|
||||
:redis_sentinels => ['host1:26379', 'host2:26379'],
|
||||
:redis_socket_timeout => 1.0,
|
||||
:redis_socket_timeout => 3.2,
|
||||
:redis_sentinel_service_name => 'mymaster',
|
||||
:tls_enabled => false,
|
||||
:tls_cafile => '<SERVICE DEFAULT>',
|
||||
|
||||
Reference in New Issue
Block a user