Merge "Add socket keepalive options for the pymemcache backend"

This commit is contained in:
Zuul 2022-01-31 16:29:21 +00:00 committed by Gerrit Code Review
commit 873589a11b
3 changed files with 46 additions and 0 deletions

View File

@ -64,6 +64,28 @@
# (floating point value) # (floating point value)
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*enable_socket_keepalive*]
# (Optional) Global toggle for the socket keepalive of dogpile's
# pymemcache backend
# Defaults to $::os_service_default
#
# [*socket_keepalive_idle*]
# (Optional) The time (in seconds) the connection needs to remain idle
# before TCP starts sending keepalive probes. Should be a positive integer
# most greater than zero.
# Defaults to $::os_service_default
#
# [*socket_keepalive_interval*]
# (Optional) The time (in seconds) between individual keepalive probes.
# Should be a positive integer most greater than zero.
# Defaults to $::os_service_default
#
# [*socket_keepalive_count*]
# (Optional) The maximum number of keepalive probes TCP should send before
# dropping the connection. Should be a positive integer most greater than
# zero.
# Defaults to $::os_service_default
#
# [*memcache_pool_maxsize*] # [*memcache_pool_maxsize*]
# (Optional) Max total number of open connections to every memcached server. # (Optional) Max total number of open connections to every memcached server.
# (oslo_cache.memcache_pool backend only). (integer value) # (oslo_cache.memcache_pool backend only). (integer value)
@ -133,6 +155,10 @@ class keystone::cache(
$memcache_servers = $::os_service_default, $memcache_servers = $::os_service_default,
$memcache_dead_retry = $::os_service_default, $memcache_dead_retry = $::os_service_default,
$memcache_socket_timeout = $::os_service_default, $memcache_socket_timeout = $::os_service_default,
$enable_socket_keepalive = $::os_service_default,
$socket_keepalive_idle = $::os_service_default,
$socket_keepalive_interval = $::os_service_default,
$socket_keepalive_count = $::os_service_default,
$memcache_pool_maxsize = $::os_service_default, $memcache_pool_maxsize = $::os_service_default,
$memcache_pool_unused_timeout = $::os_service_default, $memcache_pool_unused_timeout = $::os_service_default,
$memcache_pool_connection_get_timeout = $::os_service_default, $memcache_pool_connection_get_timeout = $::os_service_default,
@ -166,6 +192,10 @@ class keystone::cache(
memcache_servers => $memcache_servers, memcache_servers => $memcache_servers,
memcache_dead_retry => $memcache_dead_retry, memcache_dead_retry => $memcache_dead_retry,
memcache_socket_timeout => $memcache_socket_timeout, memcache_socket_timeout => $memcache_socket_timeout,
enable_socket_keepalive => $enable_socket_keepalive,
socket_keepalive_idle => $socket_keepalive_idle,
socket_keepalive_interval => $socket_keepalive_interval,
socket_keepalive_count => $socket_keepalive_count,
memcache_pool_maxsize => $memcache_pool_maxsize, memcache_pool_maxsize => $memcache_pool_maxsize,
memcache_pool_unused_timeout => $memcache_pool_unused_timeout, memcache_pool_unused_timeout => $memcache_pool_unused_timeout,
memcache_pool_connection_get_timeout => $memcache_pool_connection_get_timeout, memcache_pool_connection_get_timeout => $memcache_pool_connection_get_timeout,

View File

@ -0,0 +1,4 @@
---
features:
- |
Add socket keepalive options for the pymemcache (dogpile.cache) backend.

View File

@ -23,6 +23,10 @@ describe 'keystone::cache' do
:memcache_servers => '<SERVICE DEFAULT>', :memcache_servers => '<SERVICE DEFAULT>',
:memcache_dead_retry => '<SERVICE DEFAULT>', :memcache_dead_retry => '<SERVICE DEFAULT>',
:memcache_socket_timeout => '<SERVICE DEFAULT>', :memcache_socket_timeout => '<SERVICE DEFAULT>',
:enable_socket_keepalive => '<SERVICE DEFAULT>',
:socket_keepalive_idle => '<SERVICE DEFAULT>',
:socket_keepalive_interval => '<SERVICE DEFAULT>',
:socket_keepalive_count => '<SERVICE DEFAULT>',
:memcache_pool_maxsize => '<SERVICE DEFAULT>', :memcache_pool_maxsize => '<SERVICE DEFAULT>',
:memcache_pool_unused_timeout => '<SERVICE DEFAULT>', :memcache_pool_unused_timeout => '<SERVICE DEFAULT>',
:memcache_pool_connection_get_timeout => '<SERVICE DEFAULT>', :memcache_pool_connection_get_timeout => '<SERVICE DEFAULT>',
@ -48,6 +52,10 @@ describe 'keystone::cache' do
:memcache_servers => ['memcached01:11211', 'memcached02:11211'], :memcache_servers => ['memcached01:11211', 'memcached02:11211'],
:memcache_dead_retry => '60', :memcache_dead_retry => '60',
:memcache_socket_timeout => '300.0', :memcache_socket_timeout => '300.0',
:enable_socket_keepalive => false,
:socket_keepalive_idle => 1,
:socket_keepalive_interval => 1,
:socket_keepalive_count => 1,
:memcache_pool_maxsize => '10', :memcache_pool_maxsize => '10',
:memcache_pool_unused_timeout => '120', :memcache_pool_unused_timeout => '120',
:memcache_pool_connection_get_timeout => '360', :memcache_pool_connection_get_timeout => '360',
@ -71,6 +79,10 @@ describe 'keystone::cache' do
:memcache_servers => ['memcached01:11211', 'memcached02:11211'], :memcache_servers => ['memcached01:11211', 'memcached02:11211'],
:memcache_dead_retry => '60', :memcache_dead_retry => '60',
:memcache_socket_timeout => '300.0', :memcache_socket_timeout => '300.0',
:enable_socket_keepalive => false,
:socket_keepalive_idle => 1,
:socket_keepalive_interval => 1,
:socket_keepalive_count => 1,
:memcache_pool_maxsize => '10', :memcache_pool_maxsize => '10',
:memcache_pool_unused_timeout => '120', :memcache_pool_unused_timeout => '120',
:memcache_pool_connection_get_timeout => '360', :memcache_pool_connection_get_timeout => '360',