From 431a40a5c430a66d9f19e9bb922d43d0d5586e03 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 1 Dec 2016 09:50:25 -0500 Subject: [PATCH 222/227] common-ha: IPaddr RA is not stopped when pacemaker quorum is lost Ken Gaillot writes: The other is pacemaker's no-quorum-policy cluster property. The default (which has not changed) is "stop" (stop all resources). Other values are "ignore" (act as if quorum was not lost), "freeze" (continue running existing resources but don't recover resources from unseen nodes) or "suicide" (shut down). But on my four node cluster % pcs property show no-quorum-policy Cluster Properties: % i.e. shows nothing. But: % pcs property list --all Cluster Properties: ... no-quorum-policy: stop ... % Seems to think it knows about it. and then % pcs property set no-quorum-policy=stop % pcs property show no-quorum-policy Cluster Properties: no-quorum-policy: stop % Which looks rather inconsistent. So we will try explicitly setting it to "stop" when there are three or more nodes. master bug 1400237 master patch http://review.gluster.org/#/c/15981/ release-3.9 bug 1400527 release-3.9 patch http://review.gluster.org/15996 release-3.8 bug 1400528 release-3.8 patch http://review.gluster.org/15997 Change-Id: I47fc7ee84fcd6ad52ccb776913511978a8d517b4 BUG: 1399757 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://code.engineering.redhat.com/gerrit/91896 Reviewed-by: Soumya Koduri Tested-by: Soumya Koduri Reviewed-by: Atin Mukherjee --- extras/ganesha/scripts/ganesha-ha.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 7d024da..118c0e3 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -180,6 +180,7 @@ setup_cluster() local num_servers=${2} local servers=${3} local unclean="" + local quorum_policy="stop" logger "setting up cluster ${name} with the following ${servers}" @@ -212,10 +213,11 @@ setup_cluster() sleep 1 if [ ${num_servers} -lt 3 ]; then - pcs property set no-quorum-policy=ignore - if [ $? -ne 0 ]; then - logger "warning: pcs property set no-quorum-policy=ignore failed" - fi + quorum_policy="ignore" + fi + pcs property set no-quorum-policy=${quorum_policy} + if [ $? -ne 0 ]; then + logger "warning: pcs property set no-quorum-policy=${quorum_policy} failed" fi pcs property set stonith-enabled=false -- 2.9.3