summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-04-26 01:29:46 -0700
committerVijay Bellur <vbellur@redhat.com>2014-05-02 08:52:40 -0700
commit4044e387dd40e2d12145fd32d5fd715406fcec8e (patch)
tree46969c4247478252188b221fb170636a0c62439f /extras/hook-scripts
parent936010740d45c1ecde4072cf5323e838c31bbbf0 (diff)
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 <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7569 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'extras/hook-scripts')
-rwxr-xr-xextras/hook-scripts/start/post/S29CTDBsetup.sh9
1 files changed, 9 insertions, 0 deletions
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