From 4044e387dd40e2d12145fd32d5fd715406fcec8e Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 26 Apr 2014 01:29:46 -0700 Subject: scripts: CTDB lockvol ping-timeout should be 10secs Users often forget to update the ping-timeout, perhaps we should take care of this automatically Change-Id: I6d14df8aa52665847233cb1760dfd54f41baadec BUG: 1091600 Signed-off-by: Harshavardhana Reviewed-on: http://review.gluster.org/7569 Reviewed-by: Raghavendra Talur Reviewed-by: Niels de Vos Reviewed-by: Jose A. Rivera Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- extras/hook-scripts/start/post/S29CTDBsetup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'extras/hook-scripts/start/post') diff --git a/extras/hook-scripts/start/post/S29CTDBsetup.sh b/extras/hook-scripts/start/post/S29CTDBsetup.sh index 7d5085c46f6..5caf1037e1a 100755 --- a/extras/hook-scripts/start/post/S29CTDBsetup.sh +++ b/extras/hook-scripts/start/post/S29CTDBsetup.sh @@ -10,6 +10,7 @@ SMB_CONF=/etc/samba/smb.conf CTDB_MNT=/gluster/lock +PING_TIMEOUT_SECS=10 PROGNAME="ctdb" OPTSPEC="volname:" VOL= @@ -63,6 +64,12 @@ function add_fstab_entry () { fi } +function add_ping_timeout () { + volname=$1 + value=$2 + gluster volume set $volname network.ping-timeout $value +} + parse_args $@ if [ "$META" = "$VOL" ] then @@ -71,6 +78,8 @@ then add_glusterfs_ctdb_options mkdir -p $CTDB_MNT sleep 5 + # Make sure ping-timeout is not default for CTDB volume + add_ping_timeout $VOL $PING_TIMEOUT_SECS; mount -t glusterfs `hostname`:$VOL "$CTDB_MNT" && \ add_fstab_entry $VOL $CTDB_MNT chkconfig ctdb on -- cgit