Fix idempotency regex during scale-up check
When a new node must be added in the cluster, an Exec resource calls pcs, only if the node is not already present in the cluster. The current regex doesn't match pcs' output because of a unecessary beg-of-line marker, so fix it accordingly. Change-Id: Ie0f549ba968f4f11b30705cc9c80856186dfccda Closes-Bug: #1950294
This commit is contained in:
parent
d3a119e9e1
commit
e3df586ef7
|
@ -310,7 +310,7 @@ class pacemaker::corosync(
|
|||
}
|
||||
}
|
||||
exec {"Adding Cluster node: ${node_to_add} to Cluster ${cluster_name}":
|
||||
unless => "${::pacemaker::pcs_bin} status 2>&1 | grep -e \"^Online:.* ${node_name} .*\"",
|
||||
unless => "${::pacemaker::pcs_bin} status 2>&1 | grep -we \"Online:.* ${node_name} .*\"",
|
||||
command => "${::pacemaker::pcs_bin} cluster node add ${node_to_add} ${node_add_start_part} --wait",
|
||||
timeout => $cluster_start_timeout,
|
||||
tries => $cluster_start_tries,
|
||||
|
@ -319,7 +319,7 @@ class pacemaker::corosync(
|
|||
tag => 'pacemaker-scaleup',
|
||||
}
|
||||
exec {"node-cluster-start-${node_name}":
|
||||
unless => "${::pacemaker::pcs_bin} status 2>&1 | grep -e \"^Online:.* ${node_name} .*\"",
|
||||
unless => "${::pacemaker::pcs_bin} status 2>&1 | grep -we \"Online:.* ${node_name} .*\"",
|
||||
command => "${::pacemaker::pcs_bin} cluster start ${node_name} --wait",
|
||||
timeout => $cluster_start_timeout,
|
||||
tries => $cluster_start_tries,
|
||||
|
|
Loading…
Reference in New Issue