cinder-common: support configuring keystonemiddleware for memcached

block-storage counterpart of the recent change to openstack-compute.

Signed-off-by: Marek Szuba <m.szuba@gsi.de>
Change-Id: I91133cb937d52a784d4d287c8abc156ef9c95829
This commit is contained in:
Marek Szuba 2021-09-06 11:58:12 +01:00
parent 948f1e9501
commit 32c18ef0da
2 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,7 @@ default['openstack']['block-storage']['conf'].tap do |conf|
conf['keystone_authtoken']['project_name'] = 'service'
conf['keystone_authtoken']['user_domain_name'] = 'Default'
conf['keystone_authtoken']['project_domain_name'] = 'Default'
conf['keystone_authtoken']['memcache_security_strategy'] = nil
conf['nova']['auth_type'] = 'password'
conf['nova']['region_name'] = node['openstack']['region']
conf['nova']['username'] = 'nova'

View File

@ -48,6 +48,8 @@ if node['openstack']['mq']['service_type'] == 'rabbit'
rabbit_transport_url 'block_storage'
end
memcache_servers = memcached_servers.join ','
glance_api_endpoint = internal_endpoint 'image_api'
cinder_api_bind = node['openstack']['bind_service']['all']['block-storage']
cinder_api_bind_address = bind_address cinder_api_bind
@ -77,6 +79,12 @@ node.default['openstack']['block-storage']['conf'].tap do |conf|
conf['DEFAULT']['osapi_volume_listen'] = cinder_api_bind_address
conf['DEFAULT']['osapi_volume_listen_port'] = cinder_api_bind['port']
conf['keystone_authtoken']['auth_url'] = auth_url
unless memcache_servers.empty?
conf['keystone_authtoken']['memcached_servers'] = memcache_servers
unless conf['keystone_authtoken']['memcache_security_strategy'].nil?
conf['keystone_authtoken']['memcache_secret_key'] = get_password 'token', 'openstack-block-storage_memcache_secret'
end
end
conf['nova']['auth_url'] = auth_url
end