summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/stop
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-06-06 18:43:15 -0700
committerVijay Bellur <vbellur@redhat.com>2014-06-11 23:08:36 -0700
commitf0c8be68ca68ddb067a40830fecf389c74c13d02 (patch)
tree1e19d3564481273c189c3deffe2b361a647efdd2 /extras/hook-scripts/stop
parentcc6608dbaabac6e46d7f36d964c861cfbaac8f59 (diff)
scripts: CTDB lockvol ping-timeout should be 10secs
commit "4044e387dd40e2d12145fd32d5fd715406fcec8e" approach to this led to deadlocks instead we rely on an old trick at client side - without any need to modifying the volume globally. Change-Id: I6e3c6bf9c0a3a0dd99a51b5d2a6c1f050ed2384c BUG: 1091600 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8007 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'extras/hook-scripts/stop')
-rwxr-xr-xextras/hook-scripts/stop/pre/S29CTDB-teardown.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/extras/hook-scripts/stop/pre/S29CTDB-teardown.sh b/extras/hook-scripts/stop/pre/S29CTDB-teardown.sh
index bfbd356b8fa..9125030bb7e 100755
--- a/extras/hook-scripts/stop/pre/S29CTDB-teardown.sh
+++ b/extras/hook-scripts/stop/pre/S29CTDB-teardown.sh
@@ -58,15 +58,20 @@ function remove_ctdb_options () {
}
function remove_fstab_entry () {
- volname=$1
- mntpt=$2
- mntent="`hostname`:/$volname $mntpt glusterfs _netdev,defaults,transport=tcp 0 0"
- esc_mntent=$(echo -e "$mntent" | sed 's/\//\\\//g')
- exists=`grep "^$mntent" /etc/fstab`
- if [ "$exists" != " " ]
- then
- sed -i /"$esc_mntent"/d /etc/fstab
- fi
+ mntpt=$1
+ fstab="/etc/fstab"
+ exists=`grep "$mntpt" ${fstab}`
+ esc_mntpt=$(echo -e $mntpt | sed 's/\//\\\//g')
+ if [ "$exists" != " " ]
+ then
+ sed -i /"$esc_mntpt"/d $fstab
+ exists=`grep "$mntpt" ${fstab}`
+ if [ "$exists" != " " ]
+ then
+ echo "fstab entry cannot be removed for unknown reason"
+ exit 1
+ fi
+ fi
}
parse_args $@
@@ -74,7 +79,7 @@ if [ "$META" = "$VOL" ]
then
umount "$CTDB_MNT"
chkconfig ctdb off
- remove_fstab_entry $VOL $CTDB_MNT
+ remove_fstab_entry $CTDB_MNT
remove_ctdb_options
sighup_samba
fi