Pacemaker: Replace hiera by lookup (2)

The hiera function is deprecated and does not work with the latest
hieradata version 5. It should be replaced by the new lookup
function[1].

[1] https://puppet.com/docs/puppet/7/hiera_automatic.html

With the lookup function, we can define value type and merge behavior,
but these are kept default at this moment to limit scope of this change
to just simple replacement. Adding value type might be useful to make
sure the value is in expected type (especially when a boolean value is
expected), but we will revisit that later.

example:
lookup(<NAME>, [<VALUE TYPE>], [<MERGE BEHAVIOR>], [<DEFAULT VALUE>])

This covers the remaining manifests to set up pacemaker resource.

Change-Id: I749b979a7333f68a646f36afa912603b1af0a943
This commit is contained in:
Takashi Kajinami 2022-05-25 00:17:10 +09:00
parent 6511afb1a0
commit 8427725125
13 changed files with 219 additions and 213 deletions

View File

@ -69,8 +69,8 @@ define tripleo::pacemaker::haproxy_with_vip(
$op_params = '',
$pcs_tries = 1,
$nic = undef,
$ensure = true)
{
$ensure = true
){
if($ensure) {
if $ip_address =~ Stdlib::Compat::Ipv6 {
$netmask = '128'
@ -90,7 +90,7 @@ define tripleo::pacemaker::haproxy_with_vip(
$nic_real = $vip_nic
}
$haproxy_in_container = hiera('haproxy_docker', false)
$haproxy_in_container = lookup('haproxy_docker', undef, undef, false)
$constraint_target_name = $haproxy_in_container ? {
true => 'haproxy-bundle',
default => 'haproxy-clone'

View File

@ -20,21 +20,21 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('ceph_nfs_short_bootstrap_node_name')
# Defaults to lookup('ceph_nfs_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
class tripleo::profile::pacemaker::ceph_nfs (
$bootstrap_node = hiera('ceph_nfs_short_bootstrap_node_name'),
$step = hiera('step'),
$pcs_tries = hiera('pcs_tries', 20),
$bootstrap_node = lookup('ceph_nfs_short_bootstrap_node_name'),
$step = Integer(lookup('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@ -42,7 +42,7 @@ class tripleo::profile::pacemaker::ceph_nfs (
$pacemaker_master = false
}
$ganesha_vip = hiera('ganesha_vip')
$ganesha_vip = lookup('ganesha_vip')
# NB: Until the IPaddr2 RA has a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1445628
# we need to specify the nic when creating the ipv6 vip.
if $ganesha_vip =~ Stdlib::Compat::Ipv6 {
@ -124,10 +124,10 @@ class tripleo::profile::pacemaker::ceph_nfs (
}
# See comment on pacemaker::property at step2
if (hiera('ceph_nfs_short_node_names_override', undef)) {
$ceph_nfs_short_node_names = hiera('ceph_nfs_short_node_names_override')
if (lookup('ceph_nfs_short_node_names_override', undef, undef, undef)) {
$ceph_nfs_short_node_names = lookup('ceph_nfs_short_node_names_override')
} else {
$ceph_nfs_short_node_names = hiera('ceph_nfs_short_node_names')
$ceph_nfs_short_node_names = lookup('ceph_nfs_short_node_names')
}
$ceph_nfs_short_node_names.each |String $node_name| {

View File

@ -32,16 +32,16 @@
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('redis_short_bootstrap_node_name')
# Defaults to lookup('redis_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*container_backend*]
# (optional) Container backend to use when creating the bundle
@ -58,7 +58,7 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
@ -69,7 +69,7 @@
# Defaults to '/etc/ceph'
#
class tripleo::profile::pacemaker::cinder::backup_bundle (
$bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'),
$bootstrap_node = lookup('cinder_backup_short_bootstrap_node_name'),
$cinder_backup_docker_image = undef,
$docker_volumes = [],
$docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'},
@ -77,10 +77,10 @@ class tripleo::profile::pacemaker::cinder::backup_bundle (
$ceph_conf_path = '/etc/ceph',
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/openstack-cinder-backup.log',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$step = Integer(lookup('step')),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@ -97,11 +97,11 @@ class tripleo::profile::pacemaker::cinder::backup_bundle (
include tripleo::profile::base::cinder::backup
if $step >= 2 and $pacemaker_master {
$cinder_backup_short_node_names = hiera('cinder_backup_short_node_names')
if (hiera('pacemaker_short_node_names_override', undef)) {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names_override')
$cinder_backup_short_node_names = lookup('cinder_backup_short_node_names')
if (lookup('pacemaker_short_node_names_override', undef, undef, undef)) {
$pacemaker_short_node_names = lookup('pacemaker_short_node_names_override')
} else {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names')
$pacemaker_short_node_names = lookup('pacemaker_short_node_names')
}
$pcmk_cinder_backup_nodes = intersection($cinder_backup_short_node_names, $pacemaker_short_node_names)

View File

@ -32,16 +32,16 @@
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('redis_short_bootstrap_node_name')
# Defaults to lookup('redis_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*container_backend*]
# (optional) Container backend to use when creating the bundle
@ -62,24 +62,24 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
# Defaults to 'root'
#
class tripleo::profile::pacemaker::cinder::volume_bundle (
$bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'),
$bootstrap_node = lookup('cinder_volume_short_bootstrap_node_name'),
$cinder_volume_docker_image = undef,
$docker_volumes = [],
$docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'},
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$step = Integer(lookup('step')),
$container_backend = 'podman',
$ceph_conf_path = '/etc/ceph',
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/openstack-cinder-volume.log',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
@ -96,12 +96,12 @@ class tripleo::profile::pacemaker::cinder::volume_bundle (
include tripleo::profile::base::cinder::volume
if $step >= 2 and $pacemaker_master {
$cinder_volume_short_node_names = hiera('cinder_volume_short_node_names')
$cinder_volume_short_node_names = lookup('cinder_volume_short_node_names')
if (hiera('pacemaker_short_node_names_override', undef)) {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names_override')
if (lookup('pacemaker_short_node_names_override', undef, undef, undef)) {
$pacemaker_short_node_names = lookup('pacemaker_short_node_names_override')
} else {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names')
$pacemaker_short_node_names = lookup('pacemaker_short_node_names')
}
$pcmk_cinder_volume_nodes = intersection($cinder_volume_short_node_names, $pacemaker_short_node_names)

View File

@ -20,11 +20,11 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*bind_address*]
# (Optional) The address that the local mysql instance should bind to.
# Defaults to hiera('mysql_bind_host')
# Defaults to lookup('mysql_bind_host')
#
# [*clustercheck_user*]
# (Optional) The name of the clustercheck user.
@ -32,14 +32,14 @@
#
# [*clustercheck_password*]
# (Optional) The password for the clustercheck user.
# Defaults to hiera('mysql_clustercheck_password')
# Defaults to lookup('mysql_clustercheck_password')
#
#
class tripleo::profile::pacemaker::clustercheck (
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
$clustercheck_user = 'clustercheck',
$clustercheck_password = hiera('mysql_clustercheck_password'),
$bind_address = hiera('mysql_bind_host'),
$clustercheck_password = lookup('mysql_clustercheck_password'),
$bind_address = lookup('mysql_bind_host'),
) {
if $step >= 1 {

View File

@ -7,20 +7,20 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*enable_instanceha*]
# (Optional) Boolean driving the Instance HA controlplane configuration
# Defaults to false
#
class tripleo::profile::pacemaker::compute_instanceha (
$step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
$enable_instanceha = hiera('tripleo::instanceha', false),
$step = Integer(lookup('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$enable_instanceha = lookup('tripleo::instanceha', undef, undef, false),
) {
if $step >= 2 and $enable_instanceha {
pacemaker::property { 'compute-instanceha-role-node-property':

View File

@ -28,7 +28,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('mysql_short_bootstrap_node_name')
# Defaults to lookup('mysql_short_bootstrap_node_name')
#
# [*bind_address*]
# (Optional) The address that the local mysql instance should bind to.
@ -49,23 +49,23 @@
# service_certificate: <service certificate path>
# service_key: <service key path>
# principal: "mysql/<overcloud controller fqdn>"
# Defaults to hiera('tripleo::profile::base::database::mysql::certificate_specs', {}).
# Defaults to lookup('tripleo::profile::base::database::mysql::certificate_specs', undef, undef, {}).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*gmcast_listen_addr*]
# (Optional) This variable defines the address on which the node listens to
# connections from other nodes in the cluster.
# Defaults to hiera('mysql_bind_host')
# Defaults to lookup('mysql_bind_host')
#
# [*innodb_flush_log_at_trx_commit*]
# (Optional) Disk flush behavior for MySQL under Galera. A value of
# '1' indicates flush to disk per transaction. A value of '2' indicates
# flush to disk every second, flushing all unflushed transactions in
# one step.
# Defaults to hiera('innodb_flush_log_at_trx_commit', '1')
# Defaults to lookup('innodb_flush_log_at_trx_commit', undef, undef, '1')
#
# [*clustercheck_user*]
# (Optional) The name of the clustercheck user.
@ -73,7 +73,7 @@
#
# [*clustercheck_password*]
# (Optional) The password for the clustercheck user.
# Defaults to hiera('mysql_clustercheck_password')
# Defaults to lookup('mysql_clustercheck_password')
#
# [*sst_method*]
# (Optional) Method used by galera to perform State Snapshot Transfers
@ -117,26 +117,26 @@
#
# [*ipv6*]
# (Optional) Whether to deploy MySQL on IPv6 network.
# Defaults to str2bool(hiera('mysql_ipv6', false))
# Defaults to str2bool(lookup('mysql_ipv6', undef, undef, false))
#
# [*mysql_server_options*]
# (Optional) Extras options to deploy MySQL. Useful when deploying Galera cluster.
# Should be an hash.
# Defaults to hiera('tripleo::profile::base::database::mysql::mysql_server_options', {}
# Defaults to lookup('tripleo::profile::base::database::mysql::mysql_server_options', {}
#
# [*mysql_auth_ed25519*]
# (Optional) Use MariaDB's ed25519 authentication plugin to authenticate
# a user when connecting to the server
# Defaults to hiera('mysql_auth_ed25519', false)
# Defaults to lookup('mysql_auth_ed25519', undef, undef, false)
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*container_backend*]
# (optional) Container backend to use when creating the bundle
@ -153,7 +153,7 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
@ -203,33 +203,33 @@
class tripleo::profile::pacemaker::database::mysql_bundle (
$mysql_docker_image = undef,
$control_port = 3123,
$bootstrap_node = hiera('mysql_short_bootstrap_node_name'),
$bootstrap_node = lookup('mysql_short_bootstrap_node_name'),
$bind_address = $::hostname,
$ca_file = undef,
$cipher_list = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES:!SSLv3:!TLSv1',
$gcomm_cipher = 'AES128-SHA256',
$certificate_specs = hiera('tripleo::profile::base::database::mysql::certificate_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$gmcast_listen_addr = hiera('mysql_bind_host'),
$innodb_flush_log_at_trx_commit = hiera('innodb_flush_log_at_trx_commit', '1'),
$certificate_specs = lookup('tripleo::profile::base::database::mysql::certificate_specs', undef, undef, {}),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$gmcast_listen_addr = lookup('mysql_bind_host'),
$innodb_flush_log_at_trx_commit = lookup('innodb_flush_log_at_trx_commit', undef, undef, '1'),
$clustercheck_user = 'clustercheck',
$clustercheck_password = hiera('mysql_clustercheck_password'),
$clustercheck_password = lookup('mysql_clustercheck_password'),
$sst_method = 'rsync',
$mariabackup_user = 'mariabackup',
$mariabackup_password = '',
$sst_tls_cipher = undef,
$sst_tls_options = undef,
$ipv6 = str2bool(hiera('mysql_ipv6', false)),
$mysql_server_options = hiera('tripleo::profile::base::database::mysql::mysql_server_options', {}),
$mysql_auth_ed25519 = hiera('mysql_auth_ed25519', false),
$ipv6 = str2bool(lookup('mysql_ipv6', undef, undef, false)),
$mysql_server_options = lookup('tripleo::profile::base::database::mysql::mysql_server_options', undef, undef, {}),
$mysql_auth_ed25519 = lookup('mysql_auth_ed25519', undef, undef, false),
$two_node_mode = false,
$container_backend = 'podman',
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/galera-bundle.log',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$step = Integer(lookup('step')),
$open_files_limit = 16384,
$start_timeout = undef,
$promote_timeout = 300,
@ -252,16 +252,17 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
$log_file_real = ''
}
# FQDN are lowercase in /etc/hosts, so are pacemaker node names
$galera_node_names_lookup = downcase(hiera('mysql_short_node_names_override',
hiera('mysql_short_node_names', $::hostname)))
if (hiera('mysql_node_names_override', undef)) {
$galera_fqdns_names_lookup = downcase(hiera('mysql_node_names_override'))
$galera_node_names_lookup = downcase(
lookup('mysql_short_node_names_override', undef, undef,
lookup('mysql_short_node_names', undef, undef, $::hostname)))
if (lookup('mysql_node_names_override', undef, undef, undef)) {
$galera_fqdns_names_lookup = downcase(lookup('mysql_node_names_override'))
} else {
# is this an additional nova cell?
if hiera('nova_is_additional_cell', undef) {
$galera_fqdns_names_lookup = downcase(hiera('mysql_cell_node_names', $::hostname))
if lookup('nova_is_additional_cell', undef, undef, undef) {
$galera_fqdns_names_lookup = downcase(lookup('mysql_cell_node_names', undef, undef, $::hostname))
} else {
$galera_fqdns_names_lookup = downcase(hiera('mysql_node_names', $::hostname))
$galera_fqdns_names_lookup = downcase(lookup('mysql_node_names', undef, undef, $::hostname))
}
}
@ -403,7 +404,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle (
$remove_default_accounts = false
}
$mysql_root_password = hiera('mysql::server::root_password')
$mysql_root_password = lookup('mysql::server::root_password')
if $step >= 1 {
# Kolla sets the root password, expose it to the MySQL package
@ -448,10 +449,10 @@ MYSQL_HOST=localhost\n",
}
if $pacemaker_master {
if (hiera('mysql_short_node_names_override', undef)) {
$mysql_short_node_names = hiera('mysql_short_node_names_override')
if (lookup('mysql_short_node_names_override', undef, undef, undef)) {
$mysql_short_node_names = lookup('mysql_short_node_names_override')
} else {
$mysql_short_node_names = hiera('mysql_short_node_names')
$mysql_short_node_names = lookup('mysql_short_node_names')
}
$mysql_short_node_names.each |String $node_name| {

View File

@ -28,16 +28,16 @@
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('redis_short_bootstrap_node_name')
# Defaults to lookup('redis_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*certificate_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
@ -48,16 +48,16 @@
# service_certificate: <service certificate path>
# service_key: <service key path>
# principal: "haproxy/<overcloud controller fqdn>"
# Defaults to hiera('redis_certificate_specs', {}).
# Defaults to lookup('redis_certificate_specs', undef, undef, {}).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*redis_network*]
# (Optional) The network name where the redis endpoint is listening on.
# This is set by t-h-t.
# Defaults to hiera('redis_network', undef)
# Defaults to lookup('redis_network', undef, undef, undef)
#
# [*extra_config_file*]
# (Optional) When TLS proxy is in use, name of a host-specific Redis
@ -106,7 +106,7 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
@ -116,24 +116,24 @@
# (optional) Use --force when creating the ocf resource via pcs
# Defaults to false
class tripleo::profile::pacemaker::database::redis_bundle (
$certificate_specs = hiera('redis_certificate_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$bootstrap_node = hiera('redis_short_bootstrap_node_name'),
$certificate_specs = lookup('redis_certificate_specs', undef, undef, {}),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$bootstrap_node = lookup('redis_short_bootstrap_node_name'),
$redis_docker_image = undef,
$redis_docker_control_port = 3124,
$container_backend = 'podman',
$pcs_tries = hiera('pcs_tries', 20),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/redis-bundle.log',
$step = Integer(hiera('step')),
$redis_network = hiera('redis_network', undef),
$step = Integer(lookup('step')),
$redis_network = lookup('redis_network', undef, undef, undef),
$extra_config_file = '/etc/redis-tls.conf',
$tls_tunnel_local_name = 'localhost',
$tls_tunnel_base_port = 6660,
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 6379,
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
$force_ocf = false,
) {
@ -163,8 +163,8 @@ class tripleo::profile::pacemaker::database::redis_bundle (
$tls_certfile = $certificate_specs['service_certificate']
$tls_keyfile = $certificate_specs['service_key']
$redis_node_names = hiera('redis_short_node_names', [$::hostname])
$redis_node_ips = hiera('redis_node_ips', [$tls_proxy_bind_ip])
$redis_node_names = lookup('redis_short_node_names', undef, undef, [$::hostname])
$redis_node_ips = lookup('redis_node_ips', undef, undef, [$tls_proxy_bind_ip])
# keep a mapping of [node name, node ip, replication port]
$replication_tuples = zip($redis_node_names, $redis_node_ips).map |$index, $pair| {
@ -218,10 +218,10 @@ slave-announce-port ${local_tuple[0][2]}
if $step >= 2 {
if $pacemaker_master {
if (hiera('redis_short_node_names_override', undef)) {
$redis_short_node_names = hiera('redis_short_node_names_override')
if (lookup('redis_short_node_names_override', undef, undef, undef)) {
$redis_short_node_names = lookup('redis_short_node_names_override')
} else {
$redis_short_node_names = hiera('redis_short_node_names')
$redis_short_node_names = lookup('redis_short_node_names')
}
$redis_nodes_count = count($redis_short_node_names)

View File

@ -20,34 +20,34 @@
#
# [*haproxy_docker_image*]
# (Optional) The docker image to use for creating the pacemaker bundle
# Defaults to hiera('tripleo::profile::pacemaker::haproxy::haproxy_docker_image', undef)
# Defaults to lookup('tripleo::profile::pacemaker::haproxy::haproxy_docker_image', undef, undef, undef)
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('haproxy_short_bootstrap_node_name')
# Defaults to lookup('haproxy_short_bootstrap_node_name')
#
# [*enable_load_balancer*]
# (Optional) Whether load balancing is enabled for this cluster
# Defaults to hiera('enable_load_balancer', true)
# Defaults to lookup('enable_load_balancer', undef, undef, true)
#
# [*ca_bundle*]
# (Optional) The path to the CA file that will be used for the TLS
# configuration. It's only used if internal TLS is enabled.
# Defaults to hiera('tripleo::haproxy::ca_bundle', undef)
# Defaults to lookup('tripleo::haproxy::ca_bundle', undef, undef, undef)
#
# [*crl_file*]
# (Optional) The path to the file that contains the certificate
# revocation list. It's only used if internal TLS is enabled.
# Defaults to hiera('tripleo::haproxy::crl_file', undef)
# Defaults to lookup('tripleo::haproxy::crl_file', undef, undef, undef)
#
# [*deployed_ssl_cert_path*]
# (Optional) The filepath of the certificate as it will be stored in
# the controller.
# Defaults to hiera('tripleo::haproxy::service_certificate', undef)
# Defaults to lookup('tripleo::haproxy::service_certificate', undef, undef, undef)
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*internal_certs_directory*]
# (Optional) Directory the holds the certificates to be used when
@ -82,16 +82,16 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
@ -101,28 +101,28 @@
# (optional) Force a specific nic interface name when creating all the VIPs
# The listening nic can be customized on a per-VIP basis by creating a hiera
# dict called: force_vip_nic_overrides[<vip/network name>] = 'dummy'
# Defaults to hiera('tripleo::pacemaker::force_nic', undef)
# Defaults to lookup('tripleo::pacemaker::force_nic', undef, undef, undef)
#
class tripleo::profile::pacemaker::haproxy_bundle (
$haproxy_docker_image = hiera('tripleo::profile::pacemaker::haproxy::haproxy_docker_image', undef),
$bootstrap_node = hiera('haproxy_short_bootstrap_node_name'),
$enable_load_balancer = hiera('enable_load_balancer', true),
$ca_bundle = hiera('tripleo::haproxy::ca_bundle', undef),
$crl_file = hiera('tripleo::haproxy::crl_file', undef),
$enable_internal_tls = hiera('enable_internal_tls', false),
$haproxy_docker_image = lookup('tripleo::profile::pacemaker::haproxy::haproxy_docker_image', undef, undef, undef),
$bootstrap_node = lookup('haproxy_short_bootstrap_node_name'),
$enable_load_balancer = lookup('enable_load_balancer', undef, undef, true),
$ca_bundle = lookup('tripleo::haproxy::ca_bundle', undef, undef, undef),
$crl_file = lookup('tripleo::haproxy::crl_file', undef, undef, undef),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$internal_certs_directory = undef,
$internal_keys_directory = undef,
$deployed_ssl_cert_path = hiera('tripleo::haproxy::service_certificate', undef),
$deployed_ssl_cert_path = lookup('tripleo::haproxy::service_certificate', undef, undef, undef),
$meta_params = '',
$op_params = '',
$container_backend = 'podman',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
$force_nic = hiera('tripleo::pacemaker::force_nic', undef),
$force_nic = lookup('tripleo::pacemaker::force_nic', undef, undef, undef),
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/haproxy-bundle.log',
$step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(lookup('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
) {
include tripleo::profile::base::haproxy
@ -137,15 +137,15 @@ class tripleo::profile::pacemaker::haproxy_bundle (
} else {
$log_file_real = ''
}
$force_vip_nic_overrides = hiera('force_vip_nic_overrides', {})
$force_vip_nic_overrides = lookup('force_vip_nic_overrides', undef, undef, {})
validate_legacy(Hash, 'validate_hash', $force_vip_nic_overrides)
if $step >= 2 and $enable_load_balancer {
if $pacemaker_master {
if (hiera('haproxy_short_node_names_override', undef)) {
$haproxy_short_node_names = hiera('haproxy_short_node_names_override')
if (lookup('haproxy_short_node_names_override', undef, undef, undef)) {
$haproxy_short_node_names = lookup('haproxy_short_node_names_override')
} else {
$haproxy_short_node_names = hiera('haproxy_short_node_names')
$haproxy_short_node_names = lookup('haproxy_short_node_names')
}
$haproxy_short_node_names.each |String $node_name| {
@ -166,7 +166,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
# parameters here to configure pacemaker VIPs. The configuration
# of pacemaker VIPs could move into puppet-tripleo or we should
# make use of less specific hiera parameters here for the settings.
$haproxy_nodes = hiera('haproxy_short_node_names')
$haproxy_nodes = lookup('haproxy_short_node_names')
$haproxy_nodes_count = count($haproxy_nodes)
@ -294,7 +294,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
container_backend => $container_backend,
tries => $pcs_tries,
}
$control_vip = hiera('controller_virtual_ip')
$control_vip = lookup('controller_virtual_ip')
if has_key($force_vip_nic_overrides, 'controller_virtual_ip') {
$control_vip_nic = $force_vip_nic_overrides['controller_virtual_ip']
} else {
@ -310,7 +310,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
pcs_tries => $pcs_tries,
}
$public_vip = hiera('public_virtual_ip')
$public_vip = lookup('public_virtual_ip')
if has_key($force_vip_nic_overrides, 'public_virtual_ip') {
$public_vip_nic = $force_vip_nic_overrides['public_virtual_ip']
} else {
@ -327,9 +327,9 @@ class tripleo::profile::pacemaker::haproxy_bundle (
pcs_tries => $pcs_tries,
}
$redis = hiera('redis_enabled', false)
$redis = lookup('redis_enabled', undef, undef, false)
if $redis {
$redis_vip = hiera('redis_vip')
$redis_vip = lookup('redis_vip')
if has_key($force_vip_nic_overrides, 'redis_vip') {
$redis_vip_nic = $force_vip_nic_overrides['redis_vip']
} else {
@ -348,7 +348,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
}
# Set up all vips for isolated networks
$network_vips = hiera('network_virtual_ips', {})
$network_vips = lookup('network_virtual_ips', undef, undef, {})
$network_vips.each |String $net_name, $vip_info| {
$virtual_ip = $vip_info[ip_address]
if has_key($force_vip_nic_overrides, $net_name) {

View File

@ -20,7 +20,7 @@
#
# [*ceph_nfs_enabled*]
# (Optional) Whether or not the ceph_nfs service is enabled
# Defaults to hiera('ceph_nfs_enabled', false)
# Defaults to lookup('ceph_nfs_enabled', undef, undef, false)
#
# [*manila_share_docker_image*]
# (Optional) The docker image to use for creating the pacemaker bundle
@ -36,16 +36,16 @@
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('redis_short_bootstrap_node_name')
# Defaults to lookup('redis_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*container_backend*]
# (optional) Container backend to use when creating the bundle
@ -66,26 +66,26 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
# Defaults to 'root'
#
class tripleo::profile::pacemaker::manila::share_bundle (
$bootstrap_node = hiera('manila_share_short_bootstrap_node_name'),
$bootstrap_node = lookup('manila_share_short_bootstrap_node_name'),
$manila_share_docker_image = undef,
$docker_volumes = [],
$docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'},
$ceph_nfs_enabled = hiera('ceph_nfs_enabled', false),
$ceph_nfs_enabled = lookup('ceph_nfs_enabled', undef, undef, false),
$container_backend = 'podman',
$ceph_conf_path = '/etc/ceph',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/openstack-manila-share.log',
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$step = Integer(lookup('step')),
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@ -101,12 +101,12 @@ class tripleo::profile::pacemaker::manila::share_bundle (
include tripleo::profile::base::manila::share
if $step >= 2 and $pacemaker_master {
$manila_share_short_node_names = hiera('manila_share_short_node_names')
$manila_share_short_node_names = lookup('manila_share_short_node_names')
if (hiera('pacemaker_short_node_names_override', undef)) {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names_override')
if (lookup('pacemaker_short_node_names_override', undef, undef, undef)) {
$pacemaker_short_node_names = lookup('pacemaker_short_node_names_override')
} else {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names')
$pacemaker_short_node_names = lookup('pacemaker_short_node_names')
}
$pcmk_cinder_volume_nodes = intersection($manila_share_short_node_names, $pacemaker_short_node_names)
@ -123,7 +123,7 @@ class tripleo::profile::pacemaker::manila::share_bundle (
if $step >= 5 {
if $pacemaker_master {
$manila_cephfs_protocol_helper_type = hiera('manila::backend::cephfs::cephfs_protocol_helper_type', '')
$manila_cephfs_protocol_helper_type = lookup('manila::backend::cephfs::cephfs_protocol_helper_type', undef, undef, '')
$docker_vol_arr = delete(any2array($docker_volumes), '').flatten()
unless empty($docker_vol_arr) {

View File

@ -28,21 +28,21 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('ovn_dbs_short_bootstrap_node_name')
# Defaults to lookup('ovn_dbs_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*ovn_dbs_vip*]
# (Optional) The vip to be used for OVN DB servers. It is expected that
# the vip resource to be created before calling this class.
# Defaults to hiera('ovn_dbs_vip')
# Defaults to lookup('ovn_dbs_vip')
#
# [*nb_db_port*]
# The TCP port in which the OVN Northbound DB listens to.
@ -75,7 +75,7 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
@ -83,7 +83,7 @@
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*ca_file*]
# (Optional) The path to the CA file that will be used for the TLS
@ -108,7 +108,7 @@
# (optional) Force a specific nic interface name when creating all the VIPs
# The listening nic can be customized on a per-VIP basis by creating a hiera
# dict called: force_vip_nic_overrides[<vip/network name>] = 'dummy'
# Defaults to hiera('tripleo::pacemaker::force_nic', undef)
# Defaults to lookup('tripleo::pacemaker::force_nic', undef, undef, undef)
#
# [*monitor_interval_master*]
# (Optional) monitor interval for ovn dbs resource
@ -127,25 +127,25 @@
class tripleo::profile::pacemaker::ovn_dbs_bundle (
$ovn_dbs_docker_image = undef,
$ovn_dbs_control_port = 3125,
$bootstrap_node = hiera('ovn_dbs_short_bootstrap_node_name'),
$step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
$ovn_dbs_vip = hiera('ovn_dbs_vip'),
$bootstrap_node = lookup('ovn_dbs_short_bootstrap_node_name'),
$step = Integer(lookup('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$ovn_dbs_vip = lookup('ovn_dbs_vip'),
$nb_db_port = 6641,
$sb_db_port = 6642,
$meta_params = '',
$op_params = '',
$container_backend = 'podman',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = undef,
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/ovn-dbs-bundle.log',
$enable_internal_tls = hiera('enable_internal_tls', false),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$ca_file = undef,
$dbs_timeout = 60,
$listen_on_master_ip_only = 'yes',
$force_ocf = false,
$force_nic = hiera('tripleo::pacemaker::force_nic', undef),
$force_nic = lookup('tripleo::pacemaker::force_nic', undef, undef, undef),
$monitor_interval_master = 10,
$monitor_interval_slave = 30,
$replication_probe_interval = 60000,
@ -162,7 +162,7 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle (
} else {
$log_file_real = ''
}
$force_vip_nic_overrides = hiera('force_vip_nic_overrides', {})
$force_vip_nic_overrides = lookup('force_vip_nic_overrides', undef, undef, {})
validate_legacy(Hash, 'validate_hash', $force_vip_nic_overrides)
if $step >= 3 {
@ -217,10 +217,10 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle (
'options' => 'rw',
},
}
if (hiera('ovn_dbs_short_node_names_override', undef)) {
$ovn_dbs_short_node_names = hiera('ovn_dbs_short_node_names_override')
if (lookup('ovn_dbs_short_node_names_override', undef, undef, undef)) {
$ovn_dbs_short_node_names = lookup('ovn_dbs_short_node_names_override')
} else {
$ovn_dbs_short_node_names = hiera('ovn_dbs_short_node_names')
$ovn_dbs_short_node_names = lookup('ovn_dbs_short_node_names')
}
$ovn_dbs_nodes_count = count($ovn_dbs_short_node_names)
$ovn_dbs_short_node_names.each |String $node_name| {

View File

@ -20,21 +20,21 @@
#
# [*pacemaker_master*]
# (Optional) The hostname of the pacemaker master
# Defaults to hiera('ovn_dbs_short_bootstrap_node_name')
# Defaults to lookup('ovn_dbs_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*ovn_dbs_vip*]
# (Optional) The vip to be used for OVN DB servers. It is expected that
# the vip resource to be created before calling this class.
# Defaults to hiera('ovn_dbs_vip')
# Defaults to lookup('ovn_dbs_vip')
#
# [*nb_db_port*]
# The TCP port in which the OVN Northbound DB listens to.
@ -46,10 +46,10 @@
#
class tripleo::profile::pacemaker::ovn_northd (
$pacemaker_master = hiera('ovn_dbs_short_bootstrap_node_name'),
$step = Integer(hiera('step')),
$pcs_tries = hiera('pcs_tries', 20),
$ovn_dbs_vip = hiera('ovn_dbs_vip'),
$pacemaker_master = lookup('ovn_dbs_short_bootstrap_node_name'),
$step = Integer(lookup('step')),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$ovn_dbs_vip = lookup('ovn_dbs_vip'),
$nb_db_port = 6641,
$sb_db_port = 6642
) {

View File

@ -36,60 +36,60 @@
#
# [*erlang_cookie*]
# (Optional) Content of erlang cookie.
# Defaults to hiera('rabbitmq::erlang_cookie').
# Defaults to lookup('rabbitmq::erlang_cookie').
#
# [*user_ha_queues*]
# (Optional) The number of HA queues in to be configured in rabbitmq
# Defaults to hiera('rabbitmq::nr_ha_queues'), which is usually 0 meaning
# Defaults to lookup('rabbitmq::nr_ha_queues'), which is usually 0 meaning
# that the queues number will be CEIL(N/2) where N is the number of rabbitmq
# nodes.
#
# [*rpc_scheme*]
# (Optional) Protocol for oslo messaging rpc backend.
# Defaults to hiera('oslo_messaging_rpc_scheme').
# Defaults to lookup('oslo_messaging_rpc_scheme').
#
# [*rpc_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# when rabbit is configured for rpc messaging backend
# Defaults to hiera('oslo_messaging_rpc_bootstrap_node_name')
# Defaults to lookup('oslo_messaging_rpc_bootstrap_node_name')
#
# [*rpc_nodes*]
# (Optional) Array of host(s) for oslo messaging rpc nodes.
# Defaults to hiera('oslo_messaging_rpc_node_names', []).
# Defaults to lookup('oslo_messaging_rpc_node_names', undef, undef, []).
#
# [*notify_scheme*]
# (Optional) oslo messaging notify backend indicator.
# Defaults to hiera('oslo_messaging_notify_scheme').
# Defaults to lookup('oslo_messaging_notify_scheme').
#
# [*notify_bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# when rabbit is configured for rpc messaging backend
# Defaults to hiera('oslo_messaging_notify_bootstrap_node_name')
# Defaults to lookup('oslo_messaging_notify_bootstrap_node_name')
#
# [*notify_nodes*]
# (Optional) Array of host(s) for oslo messaging notify nodes.
# Defaults to hiera('oslo_messaging_notify_node_names', []).
# Defaults to lookup('oslo_messaging_notify_node_names', undef, undef, []).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
# Defaults to lookup('enable_internal_tls', undef, undef, false)
#
# [*rabbitmq_cacert*]
# (Optional) When internal tls is enabled this should point to the CA file
# Defaults to hiera('rabbitmq::ssl_cacert', '/etc/ipa/ca.crt')
# Defaults to lookup('rabbitmq::ssl_cacert', undef, undef, '/etc/ipa/ca.crt')
#
# [*rabbitmq_extra_policies*]
# (Optional) Hash of extra policies for the HA queues
# Defaults to hiera('rabbitmq_extra_policies', {'ha-promote-on-shutdown' => 'always'})
# Defaults to lookup('rabbitmq_extra_policies', {'ha-promote-on-shutdown' => 'always'})
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
# Defaults to lookup('pcs_tries', undef, undef, 20)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*container_backend*]
# (optional) Container backend to use when creating the bundle
@ -106,7 +106,7 @@
#
# [*tls_priorities*]
# (optional) Sets PCMK_tls_priorities in /etc/sysconfig/pacemaker when set
# Defaults to hiera('tripleo::pacemaker::tls_priorities', undef)
# Defaults to lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef)
#
# [*bundle_user*]
# (optional) Set the --user= switch to be passed to pcmk
@ -148,25 +148,26 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
$rabbitmq_docker_control_port = 3122,
$docker_volumes = [],
$docker_environment = {'KOLLA_CONFIG_STRATEGY' => 'COPY_ALWAYS'},
$erlang_cookie = hiera('rabbitmq::erlang_cookie'),
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rpc_scheme = hiera('oslo_messaging_rpc_scheme'),
$rpc_bootstrap_node = hiera('oslo_messaging_rpc_short_bootstrap_node_name'),
$rpc_nodes = hiera('oslo_messaging_rpc_node_names_override',
hiera('oslo_messaging_rpc_node_names', [])),
$notify_scheme = hiera('oslo_messaging_notify_scheme'),
$notify_bootstrap_node = hiera('oslo_messaging_notify_short_bootstrap_node_name'),
$notify_nodes = hiera('oslo_messaging_notify_node_names_override',
hiera('oslo_messaging_notify_node_names', [])),
$enable_internal_tls = hiera('enable_internal_tls', false),
$rabbitmq_cacert = hiera('rabbitmq::ssl_cacert', '/etc/ipa/ca.crt'),
$rabbitmq_extra_policies = hiera('rabbitmq_extra_policies', {'ha-promote-on-shutdown' => 'always'}),
$pcs_tries = hiera('pcs_tries', 20),
$step = Integer(hiera('step')),
$erlang_cookie = lookup('rabbitmq::erlang_cookie'),
$user_ha_queues = lookup('rabbitmq::nr_ha_queues', undef, undef, 0),
$rpc_scheme = lookup('oslo_messaging_rpc_scheme'),
$rpc_bootstrap_node = lookup('oslo_messaging_rpc_short_bootstrap_node_name'),
$rpc_nodes = lookup('oslo_messaging_rpc_node_names_override', undef, undef,
lookup('oslo_messaging_rpc_node_names', undef, undef, [])),
$notify_scheme = lookup('oslo_messaging_notify_scheme'),
$notify_bootstrap_node = lookup('oslo_messaging_notify_short_bootstrap_node_name'),
$notify_nodes = lookup('oslo_messaging_notify_node_names_override', undef, undef,
lookup('oslo_messaging_notify_node_names', undef, undef, [])),
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$rabbitmq_cacert = lookup('rabbitmq::ssl_cacert', undef, undef, '/etc/ipa/ca.crt'),
$rabbitmq_extra_policies = lookup('rabbitmq_extra_policies', undef, undef,
{'ha-promote-on-shutdown' => 'always'}),
$pcs_tries = lookup('pcs_tries', undef, undef, 20),
$step = Integer(lookup('step')),
$container_backend = 'podman',
$log_driver = 'k8s-file',
$log_file = '/var/log/containers/stdouts/rabbitmq-bundle.log',
$tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef),
$tls_priorities = lookup('tripleo::pacemaker::tls_priorities', undef, undef, undef),
$bundle_user = 'root',
$force_ocf = false,
$debug = false,
@ -177,8 +178,8 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
$stop_timeout = 200,
) {
# is this an additional nova cell?
if hiera('nova_is_additional_cell', undef) {
$rpc_nodes_real = hiera('oslo_messaging_rpc_cell_node_names', [])
if lookup('nova_is_additional_cell', undef, undef, undef) {
$rpc_nodes_real = lookup('oslo_messaging_rpc_cell_node_names', undef, undef, [])
} else {
$rpc_nodes_real = $rpc_nodes
}
@ -186,11 +187,11 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
if $rpc_scheme == 'rabbit' {
$bootstrap_node = $rpc_bootstrap_node
$rabbit_nodes = $rpc_nodes_real
$rabbit_short_nodes = hiera('oslo_messaging_rpc_short_node_names', [])
$rabbit_short_nodes = lookup('oslo_messaging_rpc_short_node_names', undef, undef, [])
} elsif $notify_scheme == 'rabbit' {
$bootstrap_node = $notify_bootstrap_node
$rabbit_nodes = $notify_nodes
$rabbit_short_nodes = hiera('oslo_messaging_notify_short_node_names', [])
$rabbit_short_nodes = lookup('oslo_messaging_notify_short_node_names', undef, undef, [])
} else {
$bootstrap_node = undef
$rabbit_nodes = []
@ -236,11 +237,15 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
if $step >= 2 {
if $pacemaker_master {
if $rpc_scheme == 'rabbit' {
$rabbitmq_short_node_names = hiera('oslo_messaging_rpc_short_node_names_override',
hiera('oslo_messaging_rpc_short_node_names'))
$rabbitmq_short_node_names = lookup(
'oslo_messaging_rpc_short_node_names_override',
undef, undef,
lookup('oslo_messaging_rpc_short_node_names'))
} elsif $notify_scheme == 'rabbit' {
$rabbitmq_short_node_names = hiera('oslo_messaging_notify_short_node_names_override',
hiera('oslo_messaging_notify_short_node_names'))
$rabbitmq_short_node_names = lookup(
'oslo_messaging_notify_short_node_names_override',
undef, undef,
lookup('oslo_messaging_notify_short_node_names'))
}
$rabbitmq_nodes_count = count($rabbitmq_short_node_names)
$rabbitmq_short_node_names.each |String $node_name| {