Enable keystone caching

Since memcached is installed on the system, we should
also enable keystone caching with memcached.

Change-Id: Ibd5135bfc753336f8e70e1e419aba0488837935e
Closes-bug: 1854196
Signed-off-by: Stefan Dinescu <stefan.dinescu@windriver.com>
This commit is contained in:
Stefan Dinescu 2019-12-02 14:20:00 +02:00
parent 12d37d4f1f
commit 2b96f733ea
1 changed files with 18 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class KeystonePuppet(openstack.OpenstackBasePuppet):
return {
'keystone::db::postgresql::user': dbuser,
'keystone::cache_enabled': True,
'keystone::cache_backend': 'dogpile.cache.memcached',
'platform::client::params::admin_username': admin_username,
@ -150,6 +152,22 @@ class KeystonePuppet(openstack.OpenstackBasePuppet):
}
return config
def get_host_config(self, host):
# The valid format for IPv6 addresses is: inet6:[<ip_v6>]:port
# Although, for IPv4, the "inet" part is not mandatory, we
# specify if anyway, for consistency purposes.
if self._get_address_by_name(
constants.CONTROLLER_PLATFORM_NFS,
constants.NETWORK_TYPE_MGMT).family == constants.IPV6_FAMILY:
argument = "url:inet6:[%s]:11211" % host.mgmt_ip
else:
argument = "url:inet:%s:11211" % host.mgmt_ip
config = {
'keystone::cache_backend_argument': argument
}
return config
def _get_service_parameter_config(self):
service_parameters = self._get_service_parameter_configs(
constants.SERVICE_TYPE_IDENTITY)