|
|
cb8e9e |
From 4bc3fe695e52b81d19548bc65e7564edf814919f Mon Sep 17 00:00:00 2001
|
|
|
cb8e9e |
From: Meghana Madhusudhan <mmadhusu@redhat.com>
|
|
|
cb8e9e |
Date: Mon, 15 Jun 2015 16:42:21 +0530
|
|
|
cb8e9e |
Subject: [PATCH 077/101] common-ha : Clean up cib state completely
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Clean up cluster state on all the machines during tear down.
|
|
|
cb8e9e |
|
|
|
cb8e9e |
Change-Id: I71706d2a43cc2cfe3fdcb14443536f7fe84a54c9
|
|
|
cb8e9e |
BUG: 1227709
|
|
|
cb8e9e |
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
|
|
|
cb8e9e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/50760
|
|
|
cb8e9e |
Reviewed-by: Kaleb Keithley <kkeithle@redhat.com>
|
|
|
cb8e9e |
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
cb8e9e |
Tested-by: Soumya Koduri <skoduri@redhat.com>
|
|
|
cb8e9e |
---
|
|
|
cb8e9e |
extras/ganesha/scripts/ganesha-ha.sh | 24 +-----------------------
|
|
|
cb8e9e |
1 files changed, 1 insertions(+), 23 deletions(-)
|
|
|
cb8e9e |
|
|
|
cb8e9e |
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
cb8e9e |
index 40705e0..9d73cf9 100755
|
|
|
cb8e9e |
--- a/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
cb8e9e |
+++ b/extras/ganesha/scripts/ganesha-ha.sh
|
|
|
cb8e9e |
@@ -235,31 +235,10 @@ cleanup_ganesha_config ()
|
|
|
cb8e9e |
rm -rf ${HA_CONFDIR}/exports/*.conf
|
|
|
cb8e9e |
rm -rf ${HA_CONFDIR}/.export_added
|
|
|
cb8e9e |
rm -rf /etc/cluster/cluster.conf*
|
|
|
cb8e9e |
+ rm -rf /var/lib/pacemaker/cib/*
|
|
|
cb8e9e |
sed -r -i -e '/^%include[[:space:]]+".+\.conf"$/d' $CONF
|
|
|
cb8e9e |
}
|
|
|
cb8e9e |
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
-teardown_clean_etccluster()
|
|
|
cb8e9e |
-{
|
|
|
cb8e9e |
- local short_host=$(hostname -s)
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
- if [ -e /var/lib/glusterd/nfs/secret.pem ]; then
|
|
|
cb8e9e |
- while [[ ${1} ]]; do
|
|
|
cb8e9e |
- if [ ${short_host} != ${1} ]; then
|
|
|
cb8e9e |
- ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/nfs/secret.pem ${1} \
|
|
|
cb8e9e |
-rm -f /etc/cluster/cluster.* rm -f /var/lib/pacemaker/cib/*
|
|
|
cb8e9e |
- if [ $? -ne 0 ]; then
|
|
|
cb8e9e |
- logger "warning: ssh ${1} rm -f /etc/cluster/cluster.* failed"
|
|
|
cb8e9e |
- fi
|
|
|
cb8e9e |
- fi
|
|
|
cb8e9e |
- shift
|
|
|
cb8e9e |
- done
|
|
|
cb8e9e |
- else
|
|
|
cb8e9e |
- logger "warning: ssh ${1} rm -f /etc/cluster/cluster.* failed"
|
|
|
cb8e9e |
- fi
|
|
|
cb8e9e |
-}
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
-
|
|
|
cb8e9e |
do_create_virt_ip_constraints()
|
|
|
cb8e9e |
{
|
|
|
cb8e9e |
local cibfile=${1}; shift
|
|
|
cb8e9e |
@@ -783,7 +762,6 @@ main()
|
|
|
cb8e9e |
|
|
|
cb8e9e |
teardown_cluster ${HA_NAME}
|
|
|
cb8e9e |
|
|
|
cb8e9e |
- teardown_clean_etccluster ${HA_SERVERS}
|
|
|
cb8e9e |
;;
|
|
|
cb8e9e |
|
|
|
cb8e9e |
cleanup | --cleanup)
|
|
|
cb8e9e |
--
|
|
|
cb8e9e |
1.7.1
|
|
|
cb8e9e |
|