From a355e57b2bb9aa6da2a66daf3206222cbf8b3b95 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 23 Feb 2017 12:36:24 -0500 Subject: common-ha: no need to remove nodes one-by-one in teardown `pcs cluster destroy --all` does all that's necessary, and prevents `pcs cluster setup ...` from failing the next time a cluster is set up This appears to happen when all the pacemaker and corosync files aren't deleted on the other nodes in the cluster. per Tomas Jelinek in IRC#cluster Change-Id: Iff24e3732f91f3b96a0b00b8199aa42446e60938 BUG: 1426323 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://review.gluster.org/16737 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: soumya k CentOS-regression: Gluster Build System --- extras/ganesha/scripts/ganesha-ha.sh | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'extras') diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index cca2d84321b..f8eb776a1a8 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -321,24 +321,6 @@ string:"EXPORT(Export_Id=$removed_id)" 2>&1) teardown_cluster() { - local name=${1} - - for server in ${HA_SERVERS} ; do - if [[ ${HA_CLUSTER_NODES} != *${server}* ]]; then - logger "info: ${server} is not in config, removing" - - pcs cluster stop ${server} --force - if [ $? -ne 0 ]; then - logger "warning: pcs cluster stop ${server} failed" - fi - - pcs cluster node remove ${server} - if [ $? -ne 0 ]; then - logger "warning: pcs cluster node remove ${server} failed" - fi - fi - done - # BZ 1193433 - pcs doesn't reload cluster.conf after modification # after teardown completes, a subsequent setup will appear to have # 'remembered' the deleted node. You can work around this by @@ -352,7 +334,7 @@ teardown_cluster() logger "warning pcs cluster stop --all failed" fi - pcs cluster destroy + pcs cluster destroy --all if [ $? -ne 0 ]; then logger "error pcs cluster destroy failed" exit 1 @@ -1044,7 +1026,7 @@ main() teardown_resources ${HA_SERVERS} - teardown_cluster ${HA_NAME} + teardown_cluster cleanup_ganesha_config ${HA_CONFDIR} ;; -- cgit