Merge "Revert Horizon's Memecached config to use IP addresses" into stable/wallaby

This commit is contained in:
Zuul 2021-10-27 18:13:45 +00:00 committed by Gerrit Code Review
commit fb31f96cc0
1 changed files with 5 additions and 15 deletions

View File

@ -52,15 +52,9 @@
# (Optional) A hash of parameters to enable features specific to Neutron
# Defaults to hiera('horizon::neutron_options', {})
#
# [*memcached_hosts*]
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
# Defaults to hiera('memcached_node_names', [])
#
# DEPRECATED PARAMETERS
#
# [*memcached_ips*]
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
# Defaults to undef
# Defaults to hiera('memcached_node_ips', [])
#
# [*heat_api_enabled*]
# (Optional) Indicate whether Heat is available in the deployment.
@ -81,15 +75,11 @@ class tripleo::profile::base::horizon (
$enable_internal_tls = hiera('enable_internal_tls', false),
$horizon_network = hiera('horizon_network', undef),
$neutron_options = hiera('horizon::neutron_options', {}),
$memcached_hosts = hiera('memcached_node_names', []),
$memcached_ips = hiera('memcached_node_ips', []),
$heat_api_enabled = hiera('heat_api_enabled', false),
$octavia_api_enabled = hiera('octavia_api_enabled', false),
$manila_api_enabled = hiera('manila_api_enabled', false),
# DEPRECATED PARAMETERS
$memcached_ips = undef
) {
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$is_bootstrap = true
} else {
@ -112,10 +102,10 @@ class tripleo::profile::base::horizon (
include tripleo::profile::base::apache
include apache::mod::remoteip
if $memcached_hosts_real[0] =~ Stdlib::Compat::Ipv6 {
$horizon_memcached_servers = prefix(any2array(normalize_ip_for_uri($memcached_hosts_real)), 'inet6:')
if $memcached_ips[0] =~ Stdlib::Compat::Ipv6 {
$horizon_memcached_servers = prefix(any2array(normalize_ip_for_uri($memcached_ips)), 'inet6:')
} else {
$horizon_memcached_servers = any2array(normalize_ip_for_uri($memcached_hosts_real))
$horizon_memcached_servers = any2array(normalize_ip_for_uri($memcached_ips))
}
class { 'horizon':