diff --git a/manifests/cache.pp b/manifests/cache.pp index 8084bf28b..759ddaa1e 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -118,26 +118,44 @@ # be available. # Default to $::os_service_default # +# [*enable_retry_client*] +# (Optional) Enable retry client mechanisms to handle failure. +# Those mechanisms can be used to wrap all kind of pymemcache +# clients. The wrapper allows you to define how many attempts +# to make and how long to wait between attemots. +# Default to $::os_service_default +# +# [*retry_attempts*] +# (Optional) Number of times to attempt an action before failing. +# Default to $::os_service_default +# +# [*retry_delay*] +# (Optional) Number of seconds to sleep between each attempt. +# Default to $::os_service_default +# class neutron::cache ( - $config_prefix = $::os_service_default, - $expiration_time = $::os_service_default, - $backend = $::os_service_default, - $backend_argument = $::os_service_default, - $proxies = $::os_service_default, - $enabled = $::os_service_default, - $debug_cache_backend = $::os_service_default, - $memcache_servers = $::os_service_default, - $memcache_dead_retry = $::os_service_default, - $memcache_socket_timeout = $::os_service_default, - $memcache_pool_maxsize = $::os_service_default, - $memcache_pool_unused_timeout = $::os_service_default, - $memcache_pool_connection_get_timeout = $::os_service_default, - $manage_backend_package = true, - $tls_enabled = $::os_service_default, - $tls_cafile = $::os_service_default, - $tls_certfile = $::os_service_default, - $tls_keyfile = $::os_service_default, - $tls_allowed_ciphers = $::os_service_default, + $config_prefix = $::os_service_default, + $expiration_time = $::os_service_default, + $backend = $::os_service_default, + $backend_argument = $::os_service_default, + $proxies = $::os_service_default, + $enabled = $::os_service_default, + $debug_cache_backend = $::os_service_default, + $memcache_servers = $::os_service_default, + $memcache_dead_retry = $::os_service_default, + $memcache_socket_timeout = $::os_service_default, + $memcache_pool_maxsize = $::os_service_default, + $memcache_pool_unused_timeout = $::os_service_default, + $memcache_pool_connection_get_timeout = $::os_service_default, + $manage_backend_package = true, + $tls_enabled = $::os_service_default, + $tls_cafile = $::os_service_default, + $tls_certfile = $::os_service_default, + $tls_keyfile = $::os_service_default, + $tls_allowed_ciphers = $::os_service_default, + $enable_retry_client = $::os_service_default, + $retry_attempts = $::os_service_default, + $retry_delay = $::os_service_default, ) { include neutron::deps @@ -162,5 +180,8 @@ class neutron::cache ( tls_certfile => $tls_certfile, tls_keyfile => $tls_keyfile, tls_allowed_ciphers => $tls_allowed_ciphers, + enable_retry_client => $enable_retry_client, + retry_attempts => $retry_attempts, + retry_delay => $retry_delay, } } diff --git a/releasenotes/notes/add_cache_retry_options-cf1d15ebf9bd6648.yaml b/releasenotes/notes/add_cache_retry_options-cf1d15ebf9bd6648.yaml new file mode 100644 index 000000000..38d728c00 --- /dev/null +++ b/releasenotes/notes/add_cache_retry_options-cf1d15ebf9bd6648.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add cache client retry options for the pymemcache (dogpile.cache) backend. diff --git a/spec/classes/neutron_cache_spec.rb b/spec/classes/neutron_cache_spec.rb index 95172d845..0904332f1 100644 --- a/spec/classes/neutron_cache_spec.rb +++ b/spec/classes/neutron_cache_spec.rb @@ -29,6 +29,9 @@ describe 'neutron::cache' do :tls_certfile => '', :tls_keyfile => '', :tls_allowed_ciphers => '', + :enable_retry_client => '', + :retry_attempts => '', + :retry_delay => '', :manage_backend_package => true, ) end @@ -50,6 +53,9 @@ describe 'neutron::cache' do :memcache_pool_unused_timeout => '120', :memcache_pool_connection_get_timeout => '360', :tls_enabled => false, + :enable_retry_client => false, + :retry_attempts => 2, + :retry_delay => 0, :manage_backend_package => false, } end @@ -74,6 +80,9 @@ describe 'neutron::cache' do :tls_certfile => '', :tls_keyfile => '', :tls_allowed_ciphers => '', + :enable_retry_client => false, + :retry_attempts => 2, + :retry_delay => 0, :manage_backend_package => false, ) end