Merge "Use pcs 0.9 style authkey/remotes when doing an upgrade"

This commit is contained in:
Zuul 2020-08-11 23:16:05 +00:00 committed by Gerrit Code Review
commit 5c587180cc
2 changed files with 20 additions and 0 deletions

View File

@ -121,6 +121,14 @@ class tripleo::profile::base::pacemaker (
if $pcs_password == undef {
fail('The $pcs_password param is undefined, did you forget to include tripleo::profile::base::pacemaker in your role?')
}
# During FFU when override keys are set we need to use the old authkey style
# This should be kept until FFU from CentOS 7->8 is being supported
if count(hiera('pacemaker_node_ips_override', [])) > 0 {
$force_old_style_remotes_real = true
} else {
$force_old_style_remotes_real = false
}
Pcmk_resource <| |> {
tries => 10,
@ -167,6 +175,7 @@ class tripleo::profile::base::pacemaker (
setup_cluster => $pacemaker_master,
cluster_setup_extras => $cluster_setup_extras,
remote_authkey => $remote_authkey,
force_authkey => $force_old_style_remotes_real,
cluster_members_addr => $pacemaker_node_ips_real,
pcsd_bind_addr => $pcsd_bind_addr,
tls_priorities => $tls_priorities,
@ -224,6 +233,9 @@ class tripleo::profile::base::pacemaker (
try_sleep => $remote_try_sleep,
pcs_user => $pcs_user,
pcs_password => $pcs_password,
# When we force the use of old style remotes we must also use --force
force => $force_old_style_remotes_real,
force_oldstyle => $force_old_style_remotes_real,
before => Exec["exec-wait-for-${remote_short_node}"],
notify => Exec["exec-wait-for-${remote_short_node}"],
}

View File

@ -66,12 +66,20 @@ class tripleo::profile::base::pacemaker_remote (
if $pcs_password == undef {
fail('The $pcs_password param is and the hiera key "hacluster_pwd" hiera key are both undefined, this is not allowed')
}
# During FFU when override keys are set we need to use the old authkey style
# This should be kept until FFU from CentOS 7->8 is being supported
if count(hiera('pacemaker_remote_node_ips_override', [])) > 0 {
$force_authkey = true
} else {
$force_authkey = false
}
class { 'pacemaker::remote':
pcs_user => $pcs_user,
pcs_password => $pcs_password,
remote_authkey => $remote_authkey,
use_pcsd => true,
pcsd_bind_addr => $pcsd_bind_addr,
force_authkey => $force_authkey,
tls_priorities => $tls_priorities,
}
if str2bool(hiera('docker_enabled', false)) {