From 3a9081f6128d4de0bef5e5563ca2e8d7a4ea6083 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 3 Nov 2022 16:16:40 +0900 Subject: [PATCH] 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] c332d43db6b81d44f56a5a4a67d9988df763b4de Closes-Bug: #1995565 Change-Id: Ib909f45b237a478119d4f90ce9f7b752668bad9d (cherry picked from commit a0a0fc2fa8872dc60284b31161def2b128ba8966) --- manifests/resource/bundle.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/resource/bundle.pp b/manifests/resource/bundle.pp index cbf75c49..ed5e6056 100644 --- a/manifests/resource/bundle.pp +++ b/manifests/resource/bundle.pp @@ -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 {