From 5a349d4664828601235b89d55f469b579a24b031 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 15 Mar 2022 10:53:27 +0900 Subject: [PATCH] Memcached: Allow puppet to be aware IPv6 is used When memcached is using IPv6 network, some parameters like [keystone_authtoke] memcached_servers require each server name has inet6 prefix, as is described in the following example. inet6:[]: This change introduces the global parameter so that puppet can detect whether memcached is using IPv6 network. Backport note to stable/victoria: Fixed if statement because Heat requires value_if_false in victoria and older. Related-Bug: #1964824 Change-Id: I755cc96116a664f01622fcd30cdd0d82d184f0c7 (cherry picked from commit 6f8a5bc1ef16f9df5653c36bcf351026a49ea913) (cherry picked from commit 679a7caae41b82e25bd4a54fc314047525439aae) (cherry picked from commit b442b8d59256c5fb02c815bf85b83e1b276906c9) --- .../memcached/memcached-container-puppet.yaml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/deployment/memcached/memcached-container-puppet.yaml b/deployment/memcached/memcached-container-puppet.yaml index 2e5b674cd8..c9212d4b5f 100644 --- a/deployment/memcached/memcached-container-puppet.yaml +++ b/deployment/memcached/memcached-container-puppet.yaml @@ -254,15 +254,22 @@ outputs: - 11211 - {get_param: MemcachedPort} global_config_settings: - # NOTE: This config is necessary while there are still services - # consuming Memcached that do not support TLS. Once all services - # do support TLS, this config should be dropped. - if: - - enable_non_tls_port - - memcached_port: {get_param: MemcachedPort} - memcached_authtoken_port: 11211 - - memcached_port: {get_param: MemcachedPort} - memcached_authtoken_port: {get_param: MemcachedPort} + map_merge: + - + # NOTE: This config is necessary while there are still services + # consuming Memcached that do not support TLS. Once all services + # do support TLS, this config should be dropped. + if: + - enable_non_tls_port + - memcached_port: {get_param: MemcachedPort} + memcached_authtoken_port: 11211 + - memcached_port: {get_param: MemcachedPort} + memcached_authtoken_port: {get_param: MemcachedPort} + - + if: + - is_ipv6 + - memcached_ipv6: true + - {} # BEGIN DOCKER SETTINGS puppet_config: config_volume: 'memcached'