summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-02-23 12:36:24 -0500
committerKaleb KEITHLEY <kkeithle@redhat.com>2017-02-26 14:13:06 -0500
commita355e57b2bb9aa6da2a66daf3206222cbf8b3b95 (patch)
treef634934322375fcc3e67cfef4480fc20ce7cd6f7 /extras
parente31a0b4f3255db8683e03c0a71665e98e03b4307 (diff)
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 <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16737 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'extras')
-rw-r--r--extras/ganesha/scripts/ganesha-ha.sh22
1 files changed, 2 insertions, 20 deletions
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}
;;