From 4bd2555d890aed15af589216b3589b3e1c8b565b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 16 Apr 2021 21:29:05 +0900 Subject: [PATCH] Make memcached port parameters globally available The memcached_port parameter and the memcached_authtoken_port parameter are used in each api service. Because memcached and each api services are not always collocated, we should use global hieradata to ensure the parameters defined in memcached service resource are propagated to all nodes in the deployment. Change-Id: I54d45bbb26a4a04cb3cf87b9bd8a2290998279fc (cherry picked from commit a7d2386438d6d4a969ad67a2de58ac6c1ffa075a) --- .../memcached/memcached-container-puppet.yaml | 20 +++++++++---------- environments/ssl/enable-memcached-tls.yaml | 3 --- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/deployment/memcached/memcached-container-puppet.yaml b/deployment/memcached/memcached-container-puppet.yaml index b74182f15c..c6961c4bda 100644 --- a/deployment/memcached/memcached-container-puppet.yaml +++ b/deployment/memcached/memcached-container-puppet.yaml @@ -221,16 +221,6 @@ outputs: source: {get_param: MemcachedIpSubnet} memcached::logstdout: true tripleo::profile::base::memcached::enable_internal_memcached_tls: {get_param: MemcachedTLS} - - - # 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: - internal_tls_enabled @@ -263,6 +253,16 @@ outputs: - enable_non_tls_port - 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} # BEGIN DOCKER SETTINGS puppet_config: config_volume: 'memcached' diff --git a/environments/ssl/enable-memcached-tls.yaml b/environments/ssl/enable-memcached-tls.yaml index 6f73a8b5ff..2be6acf0cd 100644 --- a/environments/ssl/enable-memcached-tls.yaml +++ b/environments/ssl/enable-memcached-tls.yaml @@ -5,6 +5,3 @@ parameter_defaults: MemcachedTLS: true MemcachedPort: 11212 - ExtraConfig: - memcached_port: 11212 - memcached_authtoken_port: 11211