diff options
| author | Harshavardhana <harsha@harshavardhana.net> | 2014-06-06 18:43:15 -0700 |
|---|---|---|
| committer | gluster-ant <bugzilla-bot@gluster.org> | 2014-06-06 18:43:15 -0700 |
| commit | b1661e9ffd27a324ead75cc830ddc19360e7cb63 (patch) | |
| tree | f73a268bc037bff22fe001620cc6563fb62e87cd /extras/hook-scripts/stop | |
| parent | 3c138f781ad7068d065dbc2a99226c630a783083 (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-x | extras/hook-scripts/stop/pre/S29CTDB-teardown.sh | 25 |
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 bfbd356b8f..9125030bb7 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 |
