From 987489a97b5eb083199a432098b8176e7a185d4d Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Sun, 29 Mar 2020 16:33:03 +0200 Subject: [PATCH] Fix os version test On RHEL7 we see: Error: Could not find resource 'Service[pcsd]' for relationship from 'File[etc-pacemaker-authkey]' on node overcloud-controller-2.localdomain I think a small typo slipped into: 56a11120019d "Update os variables" if (versioncmp($::os['release']['major'], '7.0') < 0) { should be if (versioncmp($::os['release']['full'], '7.0') < 0) { Otherwise the first if is always true and we end up with pcsd_mode = false which is why we get the error 'Error: Could not find resource 'Service[pcsd]' for relationship from 'File[etc-pacemaker-authkey]' Tested this and I correctly get past the errors on rhel7. Change-Id: I7e7f6bc378b3c0f3f3f6e286a09bc8339d3ce70e Closes-Bug: #1869586 --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index 72320801..681dc7f2 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -35,7 +35,7 @@ class pacemaker::params { $pcs_bin = '/sbin/pcs' $pcsd_sysconfig = '/etc/sysconfig/pcsd' $pcmk_sysconfig = '/etc/sysconfig/pacemaker' - if (versioncmp($::os['release']['major'], '7.0') < 0) { + if (versioncmp($::os['release']['full'], '7.0') < 0) { $package_list = ['pacemaker','pcs','fence-agents','cman'] # TODO in el6.6, $pcsd_mode should be true $pcsd_mode = false