Merge "Fix pacemaker cluster configuration"
This commit is contained in:
commit
734547ddf2
@ -1,4 +1,5 @@
|
|||||||
corosync
|
corosync
|
||||||
os-apply-config
|
os-apply-config
|
||||||
|
os-is-bootstrap-host
|
||||||
os-refresh-config
|
os-refresh-config
|
||||||
os-svc-install
|
os-svc-install
|
||||||
|
@ -4,3 +4,9 @@ set -eux
|
|||||||
os-svc-enable -n pacemaker
|
os-svc-enable -n pacemaker
|
||||||
|
|
||||||
os-svc-restart -n pacemaker
|
os-svc-restart -n pacemaker
|
||||||
|
|
||||||
|
# Give pacemaker some time to boot up, otherwise configuration commands
|
||||||
|
# time out. The issue is tracked here:
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1111747
|
||||||
|
# This workaround can be removed once the issue above is fixed.
|
||||||
|
sleep 30
|
||||||
|
8
elements/pacemaker/os-refresh-config/post-configure.d/16-base-opts-pacemaker
Normal file → Executable file
8
elements/pacemaker/os-refresh-config/post-configure.d/16-base-opts-pacemaker
Normal file → Executable file
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
if os-is-bootstrap-host; then
|
||||||
QUORUM_POLICY=$(os-apply-config --key pacemaker.quorum_policy --type raw --key-default ignore)
|
QUORUM_POLICY=$(os-apply-config --key pacemaker.quorum_policy --type raw --key-default ignore)
|
||||||
RECHECK_INTERVAL=$(os-apply-config --key pacemaker.recheck_interval --type raw --key-default 5)
|
RECHECK_INTERVAL=$(os-apply-config --key pacemaker.recheck_interval --type raw --key-default 5)
|
||||||
STONITH_ENABLED=$(os-apply-config --key pacemaker.stonith_enabled --type raw --key-default false)
|
STONITH_ENABLED=$(os-apply-config --key pacemaker.stonith_enabled --type raw --key-default false)
|
||||||
|
|
||||||
crm configure property no-quorum-policy=$QUORUM_POLICY \
|
crm_attribute -t crm_config -n stonith-enabled -v $STONITH_ENABLED
|
||||||
cluster-recheck-interval=$RECHECK_INTERVAL"min" \
|
crm_attribute -t crm_config -n no-quorum-policy -v $QUORUM_POLICY
|
||||||
stonith-enabled=$STONITH_ENABLED
|
crm_attribute -t crm_config -n cluster-recheck-interval -v "${RECHECK_INTERVAL}min"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user