Merge "Select correct memcache server value according to IP version"

This commit is contained in:
Zuul 2024-12-10 18:51:18 +00:00 committed by Gerrit Code Review
commit 3385a0c087
2 changed files with 18 additions and 5 deletions

View File

@ -16,6 +16,12 @@ class packstack::horizon ()
default => false,
}
include packstack::memcached
$cache_server_ip = lookup('CONFIG_IP_VERSION') ? {
'ipv6' => '::1',
default => '127.0.0.1',
}
class { 'horizon':
secret_key => lookup('CONFIG_HORIZON_SECRET_KEY'),
keystone_url => lookup('CONFIG_KEYSTONE_PUBLIC_URL'),
@ -23,7 +29,7 @@ class packstack::horizon ()
allowed_hosts => '*',
django_session_engine => 'django.contrib.sessions.backends.cache',
cache_backend => 'django.core.cache.backends.memcached.PyMemcacheCache',
cache_server_ip => '127.0.0.1',
cache_server_ip => $cache_server_ip,
cache_server_port => '11211',
file_upload_temp_dir => '/var/tmp',
listen_ssl => $horizon_ssl,
@ -58,8 +64,6 @@ class packstack::horizon ()
include horizon::dashboards::manila
}
include packstack::memcached
$firewall_port = lookup('CONFIG_HORIZON_PORT')
firewall { "001 horizon ${firewall_port} incoming":

View File

@ -77,7 +77,6 @@ class packstack::swift::proxy ()
'swift::proxy::gatekeeper',
'swift::proxy::healthcheck',
'swift::proxy::proxy_logging',
'swift::proxy::cache',
'swift::proxy::listing_formats',
'swift::proxy::tempurl',
'swift::proxy::crossdomain',
@ -90,6 +89,14 @@ class packstack::swift::proxy ()
'swift::proxy::dlo',
]: }
$memcache_servers = lookup('CONFIG_IP_VERSION') ? {
'ipv6' => ['[::1]:11211'],
default => ['127.0.0.1:11211'],
}
class {'swift::proxy::cache':
memcache_servers => $memcache_servers,
}
class { 'swift::proxy::bulk':
max_containers_per_extraction => 10000,
max_failed_extractions => 1000,
@ -120,5 +127,7 @@ class packstack::swift::proxy ()
allow_versioned_writes => true,
}
class { 'swift::objectexpirer': }
class { 'swift::objectexpirer':
memcache_servers => $memcache_servers,
}
}