From 6c4255c701160d10f71c9be11983f309086165c7 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 11 May 2017 09:25:05 -0400 Subject: common-ha: adding a node to existing cluster failed to start pacemaker selected fixes back-ported from release-3.10 Change-Id: I44876305630a82e471824c085ed9ac58df08caa2 BUG: 1450055 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://review.gluster.org/17256 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- extras/ganesha/scripts/ganesha-ha.sh | 44 ++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 0692df8f5dd..4b9d8a3891a 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -161,25 +161,8 @@ determine_servers() } -setup_cluster() +start_cluster() { - local name=${1} - local num_servers=${2} - local servers=${3} - local unclean="" - local quorum_policy="stop" - - - logger "setting up cluster ${name} with the following ${servers}" - - pcs cluster auth ${servers} - # pcs cluster setup --name ${name} ${servers} - pcs cluster setup ${RHEL6_PCS_CNAME_OPTION} ${name} --transport udpu ${servers} - if [ $? -ne 0 ]; then - logger "pcs cluster setup ${RHEL6_PCS_CNAME_OPTION} ${name} ${servers} failed" - exit 1; - fi - # BZ 1284404, 1425110, allow time for SSL certs to propagate, until then # pcsd will not accept connections. sleep 12 @@ -202,6 +185,29 @@ setup_cluster() unclean=$(pcs status | grep -u "UNCLEAN") done sleep 1 +} + + +setup_cluster() +{ + local name=${1} + local num_servers=${2} + local servers=${3} + local unclean="" + local quorum_policy="stop" + + + logger "setting up cluster ${name} with the following ${servers}" + + pcs cluster auth ${servers} + # pcs cluster setup --name ${name} ${servers} + pcs cluster setup ${RHEL6_PCS_CNAME_OPTION} ${name} --transport udpu ${servers} + if [ $? -ne 0 ]; then + logger "pcs cluster setup ${RHEL6_PCS_CNAME_OPTION} ${name} ${servers} failed" + exit 1; + fi + + start_cluster if [ ${num_servers} -lt 3 ]; then quorum_policy="ignore" @@ -1047,7 +1053,7 @@ main() # from the entries in the ganesha-ha.conf file. Adding the # newly added node to the file so that the resources specfic # to this node is correctly recreated in the future. - clean_node=${node//[-.]/_} + clean_node=${node//[.]/_} echo "VIP_$clean_node=\"${vip}\"" >> ${HA_CONFDIR}/ganesha-ha.conf NEW_NODES="$HA_CLUSTER_NODES,${node}" -- cgit