Merge "Fix pacemaker cluster configuration"

This commit is contained in:
Jenkins 2014-08-08 11:51:45 +00:00 committed by Gerrit Code Review
commit 734547ddf2
3 changed files with 15 additions and 6 deletions

View File

@ -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

View File

@ -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

View 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