diff --git a/manifests/api.pp b/manifests/api.pp index cce910c4..e974a701 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -171,6 +171,11 @@ # (optional) CA certificate file to use to verify connecting clients # Defaults to $::os_service_default # +# [*memcached_servers*] +# (optinal) a list of memcached server(s) to use for caching. If left +# undefined, tokens will instead be cached in-process. +# Defaults to $::os_service_default. +# class cinder::api ( $keystone_password, $keystone_enabled = true, @@ -207,6 +212,7 @@ class cinder::api ( $cert_file = $::os_service_default, $key_file = $::os_service_default, $ca_file = $::os_service_default, + $memcached_servers = $::os_service_default, # DEPRECATED PARAMETERS $validation_options = {}, ) inherits cinder::params { @@ -325,9 +331,10 @@ class cinder::api ( } cinder_config { - 'keystone_authtoken/auth_uri' : value => $auth_uri; - 'keystone_authtoken/identity_uri' : value => $identity_uri; - 'keymgr/encryption_auth_url' : value => $keymgr_encryption_auth_url; + 'keystone_authtoken/auth_uri': value => $auth_uri; + 'keystone_authtoken/identity_uri': value => $identity_uri; + 'keystone_authtoken/memcached_servers': value => join(any2array($memcached_servers), ','); + 'keymgr/encryption_auth_url': value => $keymgr_encryption_auth_url; } if $keystone_enabled { diff --git a/releasenotes/notes/keystone-authtoken-memcached-47d5145d2b4d9b67.yaml b/releasenotes/notes/keystone-authtoken-memcached-47d5145d2b4d9b67.yaml new file mode 100644 index 00000000..a36691bf --- /dev/null +++ b/releasenotes/notes/keystone-authtoken-memcached-47d5145d2b4d9b67.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Added the ability to manage the memcached servers + for keystone_authtoken in cinder::api diff --git a/spec/classes/cinder_api_spec.rb b/spec/classes/cinder_api_spec.rb index 1e47131a..b7a12089 100644 --- a/spec/classes/cinder_api_spec.rb +++ b/spec/classes/cinder_api_spec.rb @@ -64,6 +64,7 @@ describe 'cinder::api' do is_expected.to contain_cinder_config('keystone_authtoken/admin_password').with( :value => 'foo' ) + is_expected.to contain_cinder_config('keystone_authtoken/memcached_servers').with_value('') is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_name').with_value('') is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_password').with_value('') @@ -294,6 +295,17 @@ describe 'cinder::api' do end end + describe "with memcached servers for keystone authtoken" do + let :params do + req_params.merge({ + :memcached_servers => '1.1.1.1:11211', + }) + end + it 'configures memcached servers' do + is_expected.to contain_cinder_config('keystone_authtoken/memcached_servers').with_value('1.1.1.1:11211') + end + end + describe 'with a custom osapi_max_limit' do let :params do req_params.merge({'osapi_max_limit' => '10000'})