diff --git a/manifests/cache.pp b/manifests/cache.pp index f32e6e34d..2ccfd8d1d 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -155,6 +155,22 @@ # (Optional) Number of seconds to sleep between each attempt. # Default to $::os_service_default # +# [*hashclient_retry_attempts*] +# (Optional) Amount of times a client should be tried +# before it is marked dead and removed from the pool in +# the HashClient's internal mechanisms. +# Default to $::os_service_default +# +# [*hashclient_retry_delay*] +# (Optional) Time in seconds that should pass between +# retry attempts in the HashClient's internal mechanisms. +# Default to $::os_service_default +# +# [*dead_timeout*] +# (Optional) Time in seconds before attempting to add a node +# back in the pool in the HashClient's internal mechanisms. +# Default to $::os_service_default +# class nova::cache ( $config_prefix = $::os_service_default, $expiration_time = $::os_service_default, @@ -182,6 +198,9 @@ class nova::cache ( $enable_retry_client = $::os_service_default, $retry_attempts = $::os_service_default, $retry_delay = $::os_service_default, + $hashclient_retry_attempts = $::os_service_default, + $hashclient_retry_delay = $::os_service_default, + $dead_timeout = $::os_service_default, ) { include nova::deps @@ -213,5 +232,8 @@ class nova::cache ( enable_retry_client => $enable_retry_client, retry_attempts => $retry_attempts, retry_delay => $retry_delay, + hashclient_retry_attempts => $hashclient_retry_attempts, + hashclient_retry_delay => $hashclient_retry_delay, + dead_timeout => $dead_timeout, } } diff --git a/releasenotes/notes/add_cache_hashclient_retry_options-d0ce282343bb7fe9.yaml b/releasenotes/notes/add_cache_hashclient_retry_options-d0ce282343bb7fe9.yaml new file mode 100644 index 000000000..116e436ed --- /dev/null +++ b/releasenotes/notes/add_cache_hashclient_retry_options-d0ce282343bb7fe9.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Add options to configure pymemcache's HashClient retrying mechanisms + (dogpile.cache) backend. diff --git a/spec/classes/nova_cache_spec.rb b/spec/classes/nova_cache_spec.rb index 34093fec1..3e2399d47 100644 --- a/spec/classes/nova_cache_spec.rb +++ b/spec/classes/nova_cache_spec.rb @@ -36,6 +36,9 @@ describe 'nova::cache' do :enable_retry_client => '', :retry_attempts => '', :retry_delay => '', + :hashclient_retry_delay => '', + :dead_timeout => '', + :manage_backend_package => true, :manage_backend_package => true, ) end @@ -64,6 +67,9 @@ describe 'nova::cache' do :enable_retry_client => false, :retry_attempts => 2, :retry_delay => 0, + :hashclient_retry_attempts => 2, + :hashclient_retry_delay => 1, + :dead_timeout => 60, :manage_backend_package => false, } end @@ -95,6 +101,9 @@ describe 'nova::cache' do :enable_retry_client => false, :retry_attempts => 2, :retry_delay => 0, + :hashclient_retry_attempts => 2, + :hashclient_retry_delay => 1, + :dead_timeout => 60, :manage_backend_package => false, ) end