Avoid pick_default to detect promoted_max

This fixes the regression caused by [1], and avoid usage of
pick_default, which converts undef to an empty string ('').

Usage of an empty string causes type validation failure later when
the pcmk_bundle resource is defined.

[1] c332d43db6

Closes-Bug: #1995565
Change-Id: Ib909f45b237a478119d4f90ce9f7b752668bad9d
This commit is contained in:
Takashi Kajinami 2022-11-03 16:16:40 +09:00
parent c332d43db6
commit a0a0fc2fa8
1 changed files with 5 additions and 1 deletions

View File

@ -162,7 +162,11 @@ define pacemaker::resource::bundle(
}
# promoted_max supersedes masters in pacemaker 2 (pcs >= 0.10)
$used_promoted_max = pick_default($promoted_max, $masters)
if $promoted_max {
$used_promoted_max = $promoted_max
} else {
$used_promoted_max = $masters
}
$used_masters = undef
} else {
if $promoted_max {