Add cache client retry options for the pymemcache backend
This patch specifies a set of options required to setup the retrying wrapper feature of pymemcache (dogpile.cache) cache backend. Original oslo.cache change: https://review.opendev.org/c/openstack/oslo.cache/+/803747 Co-Authored-By: Hervé Beraud <hberaud@redhat.com> Depends-On: https://review.opendev.org/826869 Change-Id: If116745a74baec288570b03a1c0dfcd0b9fa4a6c
This commit is contained in:
@@ -140,6 +140,21 @@
|
||||
# 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 nova::cache (
|
||||
$config_prefix = $::os_service_default,
|
||||
$expiration_time = $::os_service_default,
|
||||
@@ -164,6 +179,9 @@ class nova::cache (
|
||||
$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 nova::deps
|
||||
@@ -192,5 +210,8 @@ class nova::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,
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add cache client retry options for the pymemcache (dogpile.cache) backend.
|
@@ -33,6 +33,9 @@ describe 'nova::cache' do
|
||||
:tls_certfile => '<SERVICE DEFAULT>',
|
||||
:tls_keyfile => '<SERVICE DEFAULT>',
|
||||
:tls_allowed_ciphers => '<SERVICE DEFAULT>',
|
||||
:enable_retry_client => '<SERVICE DEFAULT>',
|
||||
:retry_attempts => '<SERVICE DEFAULT>',
|
||||
:retry_delay => '<SERVICE DEFAULT>',
|
||||
:manage_backend_package => true,
|
||||
)
|
||||
end
|
||||
@@ -58,6 +61,9 @@ describe 'nova::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
|
||||
@@ -86,6 +92,9 @@ describe 'nova::cache' do
|
||||
:tls_certfile => '<SERVICE DEFAULT>',
|
||||
:tls_keyfile => '<SERVICE DEFAULT>',
|
||||
:tls_allowed_ciphers => '<SERVICE DEFAULT>',
|
||||
:enable_retry_client => false,
|
||||
:retry_attempts => 2,
|
||||
:retry_delay => 0,
|
||||
:manage_backend_package => false,
|
||||
)
|
||||
end
|
||||
|
Reference in New Issue
Block a user