Merge "Fix pacemaker cluster configuration"
This commit is contained in:
commit
734547ddf2
@ -1,4 +1,5 @@
|
||||
corosync
|
||||
os-apply-config
|
||||
os-is-bootstrap-host
|
||||
os-refresh-config
|
||||
os-svc-install
|
||||
|
@ -4,3 +4,9 @@ set -eux
|
||||
os-svc-enable -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
|
||||
|
14
elements/pacemaker/os-refresh-config/post-configure.d/16-base-opts-pacemaker
Normal file → Executable file
14
elements/pacemaker/os-refresh-config/post-configure.d/16-base-opts-pacemaker
Normal file → Executable file
@ -2,10 +2,12 @@
|
||||
|
||||
set -eu
|
||||
|
||||
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)
|
||||
STONITH_ENABLED=$(os-apply-config --key pacemaker.stonith_enabled --type raw --key-default false)
|
||||
if os-is-bootstrap-host; then
|
||||
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)
|
||||
STONITH_ENABLED=$(os-apply-config --key pacemaker.stonith_enabled --type raw --key-default false)
|
||||
|
||||
crm configure property no-quorum-policy=$QUORUM_POLICY \
|
||||
cluster-recheck-interval=$RECHECK_INTERVAL"min" \
|
||||
stonith-enabled=$STONITH_ENABLED
|
||||
crm_attribute -t crm_config -n stonith-enabled -v $STONITH_ENABLED
|
||||
crm_attribute -t crm_config -n no-quorum-policy -v $QUORUM_POLICY
|
||||
crm_attribute -t crm_config -n cluster-recheck-interval -v "${RECHECK_INTERVAL}min"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user