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: I34a35b8be54983b926d2d7303dfb400dbf49a8f7
This commit is contained in:
@@ -144,6 +144,21 @@
|
|||||||
# be available.
|
# be available.
|
||||||
# Default to $::os_service_default
|
# 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 keystone::cache(
|
class keystone::cache(
|
||||||
$config_prefix = $::os_service_default,
|
$config_prefix = $::os_service_default,
|
||||||
$expiration_time = $::os_service_default,
|
$expiration_time = $::os_service_default,
|
||||||
@@ -169,6 +184,9 @@ class keystone::cache(
|
|||||||
$tls_certfile = $::os_service_default,
|
$tls_certfile = $::os_service_default,
|
||||||
$tls_keyfile = $::os_service_default,
|
$tls_keyfile = $::os_service_default,
|
||||||
$tls_allowed_ciphers = $::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 keystone::deps
|
include keystone::deps
|
||||||
@@ -205,6 +223,9 @@ class keystone::cache(
|
|||||||
tls_certfile => $tls_certfile,
|
tls_certfile => $tls_certfile,
|
||||||
tls_keyfile => $tls_keyfile,
|
tls_keyfile => $tls_keyfile,
|
||||||
tls_allowed_ciphers => $tls_allowed_ciphers,
|
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.
|
@@ -35,6 +35,9 @@ describe 'keystone::cache' do
|
|||||||
:tls_certfile => '<SERVICE DEFAULT>',
|
:tls_certfile => '<SERVICE DEFAULT>',
|
||||||
:tls_keyfile => '<SERVICE DEFAULT>',
|
:tls_keyfile => '<SERVICE DEFAULT>',
|
||||||
:tls_allowed_ciphers => '<SERVICE DEFAULT>',
|
:tls_allowed_ciphers => '<SERVICE DEFAULT>',
|
||||||
|
:enable_retry_client => '<SERVICE DEFAULT>',
|
||||||
|
:retry_attempts => '<SERVICE DEFAULT>',
|
||||||
|
:retry_delay => '<SERVICE DEFAULT>',
|
||||||
:manage_backend_package => true,
|
:manage_backend_package => true,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -60,6 +63,9 @@ describe 'keystone::cache' do
|
|||||||
:memcache_pool_unused_timeout => '120',
|
:memcache_pool_unused_timeout => '120',
|
||||||
:memcache_pool_connection_get_timeout => '360',
|
:memcache_pool_connection_get_timeout => '360',
|
||||||
:tls_enabled => false,
|
:tls_enabled => false,
|
||||||
|
:enable_retry_client => false,
|
||||||
|
:retry_attempts => 2,
|
||||||
|
:retry_delay => 0,
|
||||||
:manage_backend_package => false,
|
:manage_backend_package => false,
|
||||||
:token_caching => true,
|
:token_caching => true,
|
||||||
}
|
}
|
||||||
@@ -91,6 +97,9 @@ describe 'keystone::cache' do
|
|||||||
:tls_certfile => '<SERVICE DEFAULT>',
|
:tls_certfile => '<SERVICE DEFAULT>',
|
||||||
:tls_keyfile => '<SERVICE DEFAULT>',
|
:tls_keyfile => '<SERVICE DEFAULT>',
|
||||||
:tls_allowed_ciphers => '<SERVICE DEFAULT>',
|
:tls_allowed_ciphers => '<SERVICE DEFAULT>',
|
||||||
|
:enable_retry_client => false,
|
||||||
|
:retry_attempts => 2,
|
||||||
|
:retry_delay => 0,
|
||||||
:manage_backend_package => false,
|
:manage_backend_package => false,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user