Automatically set memcache_servers for keystone cache
... so that operators can enable keystone caching with memcache easilty. Change-Id: Ie1ff8e774e3a2115ca7b19a2183c43d3c15849d6 (cherry picked from commit c570d18f93c26f921fd7dd5260b6ba38dfcc30c4)
This commit is contained in:
parent
5c76ddc47f
commit
e8f473f5bc
@ -235,6 +235,7 @@ 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,
|
||||
@ -257,7 +258,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]{
|
||||
@ -292,7 +294,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':
|
||||
openidc_cache_type => 'memcache',
|
||||
|
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user