From 0470ca135b922db3071f03a2a747aeb35368fb85 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 14 Dec 2023 17:58:52 +0900 Subject: [PATCH] Support [cache] memcache_pool_flush_on_reconnect Depends-on: https://review.opendev.org/902861 Change-Id: Ic5e40835abb923d2e9f2243e7b8f7241ab924670 --- manifests/cache.pp | 7 +++++++ .../memcache_pool_flush_on_reconnect-c98b73f4388c4c2b.yaml | 5 +++++ spec/classes/zaqar_cache_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/memcache_pool_flush_on_reconnect-c98b73f4388c4c2b.yaml diff --git a/manifests/cache.pp b/manifests/cache.pp index 3334133..6e2827c 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -103,6 +103,11 @@ # client connection. (integer value) # Defaults to $facts['os_service_default'] # +# [*memcache_pool_flush_on_reconnect*] +# (Optional) Global toggle if memcache will be flushed on reconnect. +# (oslo_cache.memcache_pool backend only) +# Defaults to $facts['os_service_default'] +# # [*manage_backend_package*] # (Optional) Whether to install the backend package for the cache. # Defaults to true @@ -158,6 +163,7 @@ class zaqar::cache ( $memcache_pool_maxsize = $facts['os_service_default'], $memcache_pool_unused_timeout = $facts['os_service_default'], $memcache_pool_connection_get_timeout = $facts['os_service_default'], + $memcache_pool_flush_on_reconnect = $facts['os_service_default'], $manage_backend_package = true, $tls_enabled = $facts['os_service_default'], $tls_cafile = $facts['os_service_default'], @@ -186,6 +192,7 @@ class zaqar::cache ( memcache_pool_maxsize => $memcache_pool_maxsize, memcache_pool_unused_timeout => $memcache_pool_unused_timeout, memcache_pool_connection_get_timeout => $memcache_pool_connection_get_timeout, + memcache_pool_flush_on_reconnect => $memcache_pool_flush_on_reconnect, manage_backend_package => $manage_backend_package, tls_enabled => $tls_enabled, tls_cafile => $tls_cafile, diff --git a/releasenotes/notes/memcache_pool_flush_on_reconnect-c98b73f4388c4c2b.yaml b/releasenotes/notes/memcache_pool_flush_on_reconnect-c98b73f4388c4c2b.yaml new file mode 100644 index 0000000..5003f8c --- /dev/null +++ b/releasenotes/notes/memcache_pool_flush_on_reconnect-c98b73f4388c4c2b.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``zaqar::cache::memcache_pool_flush_on_reconnect`` parameter has + been added. diff --git a/spec/classes/zaqar_cache_spec.rb b/spec/classes/zaqar_cache_spec.rb index 726b09e..0344861 100644 --- a/spec/classes/zaqar_cache_spec.rb +++ b/spec/classes/zaqar_cache_spec.rb @@ -28,6 +28,7 @@ describe 'zaqar::cache' do :memcache_pool_maxsize => '', :memcache_pool_unused_timeout => '', :memcache_pool_connection_get_timeout => '', + :memcache_pool_flush_on_reconnect => '', :tls_enabled => '', :tls_cafile => '', :tls_certfile => '', @@ -57,6 +58,7 @@ describe 'zaqar::cache' do :memcache_pool_maxsize => '10', :memcache_pool_unused_timeout => '120', :memcache_pool_connection_get_timeout => '360', + :memcache_pool_flush_on_reconnect => false, :tls_enabled => false, :manage_backend_package => false, } @@ -81,6 +83,7 @@ describe 'zaqar::cache' do :memcache_pool_maxsize => '10', :memcache_pool_unused_timeout => '120', :memcache_pool_connection_get_timeout => '360', + :memcache_pool_flush_on_reconnect => false, :tls_enabled => false, :tls_cafile => '', :tls_certfile => '',