Merge "Autonatically set memcache_servers for keystone cache"

This commit is contained in:
Zuul 2020-04-07 14:59:54 +00:00 committed by Gerrit Code Review
commit 93c1e91e22
2 changed files with 11 additions and 5 deletions

View File

@ -225,6 +225,8 @@ class tripleo::profile::base::keystone (
if $step >= 4 or ( $step >= 3 and $sync_db ) {
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
$memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
class { 'keystone':
sync_db => $sync_db,
enable_bootstrap => $sync_db,
@ -246,7 +248,8 @@ class tripleo::profile::base::keystone (
}),
notification_topics => union($ceilometer_notification_topics,
$barbican_notification_topics,
$extra_notification_topics)
$extra_notification_topics),
cache_memcache_servers => $memcached_servers
}
if 'amqp' in [$oslomsg_rpc_proto, $oslomsg_notify_proto]{
@ -279,7 +282,6 @@ class tripleo::profile::base::keystone (
}
if $keystone_openidc_enabled {
$memcached_servers = suffix(any2array(normalize_ip_for_uri($memcached_ips)), ':11211')
class { 'keystone::federation::openidc':
memcached_servers => $memcached_servers,

View File

@ -30,6 +30,7 @@ describe 'tripleo::profile::base::keystone' do
:oslomsg_notify_username => 'keystone2',
:oslomsg_notify_password => 'baa',
:oslomsg_notify_port => '5678',
:memcached_ips => [ '192.168.0.3', '192.168.0.4', '192.168.0.5' ],
}
end
@ -62,7 +63,8 @@ describe 'tripleo::profile::base::keystone' do
it 'should trigger complete configuration' do
is_expected.to contain_class('keystone').with(
:default_transport_url => 'rabbit://keystone1:foo@192.168.0.1:1234/?ssl=0',
:notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0'
:notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0',
:cache_memcache_servers => [ '192.168.0.3:11211', '192.168.0.4:11211', '192.168.0.5:11211' ],
)
is_expected.to contain_class('keystone::config')
is_expected.to contain_class('keystone::logging')
@ -108,7 +110,8 @@ describe 'tripleo::profile::base::keystone' do
it 'should trigger keystone configuration' do
is_expected.to contain_class('keystone').with(
:default_transport_url => 'rabbit://keystone1:foo@192.168.0.1:1234/?ssl=0',
:notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0'
:notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0',
:cache_memcache_servers => [ '192.168.0.3:11211', '192.168.0.4:11211', '192.168.0.5:11211' ],
)
is_expected.to contain_class('keystone::config')
is_expected.to contain_class('keystone::logging')
@ -134,7 +137,8 @@ describe 'tripleo::profile::base::keystone' do
it 'should trigger keystone configuration' do
is_expected.to contain_class('keystone').with(
:default_transport_url => 'rabbit://keystone1:foo@192.168.0.1:1234/?ssl=0',
:notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0'
:notification_transport_url => 'rabbit://keystone2:baa@192.168.0.2:5678/?ssl=0',
:cache_memcache_servers => [ '192.168.0.3:11211', '192.168.0.4:11211', '192.168.0.5:11211' ],
)
is_expected.to contain_class('keystone::config')
is_expected.to contain_class('keystone::logging')