Browse Source

Prefix memcached_servers IPv6 address with `inet6:`

Depends-On: https://review.opendev.org/661136
Change-Id: Idd45b594c5ca13c97dc8817024cc4cbc7cfbdd63
changes/99/661299/2 15.0.0
Harald Jensås 3 years ago
parent
commit
908503e3e9
  1. 2
      manifests/cache.pp
  2. 4
      spec/defines/oslo_cache_spec.rb

2
manifests/cache.pp

@ -143,7 +143,7 @@ define oslo::cache(
}
if !is_service_default($memcache_servers) {
$memcache_servers_orig = join(any2array($memcache_servers), ',')
$memcache_servers_orig = join(any2array(inet6_prefix($memcache_servers)), ',')
} else {
$memcache_servers_orig = $memcache_servers
}

4
spec/defines/oslo_cache_spec.rb

@ -34,7 +34,7 @@ describe 'oslo::cache' do
:proxies => ['proxy1', 'proxy2'],
:enabled => true,
:debug_cache_backend => true,
:memcache_servers => ['host1:11211', 'host2:11211'],
:memcache_servers => ['host1:11211', 'host2:11211','[fd12:3456:789a:1::1]:11211'],
:memcache_dead_retry => '300',
:memcache_socket_timeout => '3',
:memcache_pool_maxsize => '10',
@ -51,7 +51,7 @@ describe 'oslo::cache' do
is_expected.to contain_keystone_config('cache/proxies').with_value('proxy1,proxy2')
is_expected.to contain_keystone_config('cache/enabled').with_value('true')
is_expected.to contain_keystone_config('cache/debug_cache_backend').with_value('true')
is_expected.to contain_keystone_config('cache/memcache_servers').with_value('host1:11211,host2:11211')
is_expected.to contain_keystone_config('cache/memcache_servers').with_value('host1:11211,host2:11211,inet6:[fd12:3456:789a:1::1]:11211')
is_expected.to contain_keystone_config('cache/memcache_dead_retry').with_value('300')
is_expected.to contain_keystone_config('cache/memcache_socket_timeout').with_value('3')
is_expected.to contain_keystone_config('cache/memcache_pool_maxsize').with_value('10')

Loading…
Cancel
Save