Merge "Move stonith resource creation to step2" into stable/victoria

This commit is contained in:
Zuul 2021-04-15 11:10:24 +00:00 committed by Gerrit Code Review
commit 787f128c11
1 changed files with 8 additions and 1 deletions

View File

@ -146,7 +146,14 @@ class tripleo::profile::base::pacemaker (
$pacemaker_master = false $pacemaker_master = false
} }
# enable_fencing guides the enablement of the stonith-enabled cluster-wide property
# enable_stonith_resources drives the creation of the stonith resources themselves and happens at
# step2. The reason for step2 is the following:
# During step1 the cluster is created (and also the pcmk remote resources in case of IHA)
# Since stonith resources are created on each node separately we need to have the guarantee that
# all cluster nodes + remote exist before creating stonith resources for them
$enable_fencing = str2bool(hiera('enable_fencing', false)) and $step >= 5 $enable_fencing = str2bool(hiera('enable_fencing', false)) and $step >= 5
$enable_stonith_resources = str2bool(hiera('enable_fencing', false)) and $step >= 2
if $step >= 1 { if $step >= 1 {
if (hiera('pacemaker_short_node_names_override', undef)) { if (hiera('pacemaker_short_node_names_override', undef)) {
@ -212,7 +219,7 @@ class tripleo::profile::base::pacemaker (
} }
Class['pacemaker::stonith'] -> Exec<|tag == 'pacemaker-scaleup'|> Class['pacemaker::stonith'] -> Exec<|tag == 'pacemaker-scaleup'|>
} }
if $enable_fencing { if $enable_stonith_resources {
include tripleo::fencing include tripleo::fencing
# enable stonith after all Pacemaker resources have been created # enable stonith after all Pacemaker resources have been created