summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/start/post
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-01-04 18:50:38 +0100
committerNiels de Vos <ndevos@redhat.com>2016-01-15 05:52:56 -0800
commita0e690fbdf5681c7cf644271de5cc03bde3fef8f (patch)
tree115073664ec9f1e3d40bc447eac69e886a64a783 /extras/hook-scripts/start/post
parenta34c406445fc0294de41a8e4706f106a83e136a0 (diff)
hook-scripts: S29CTDBsetup: clean and fix mount commands and options
This refactors the mount options of S29CTDBstart.sh into one variable, removing the superfluous mentioning of 'default'. The manual mount command is fixed to: - also use the common options, thereby adding _netdev,transport=tcp (while this does not have an effect for the _netdev option, it makes a difference for the transport option), - also use the HOSTNAME variable just like the fstab entry, - use a "/" in the remote location specification. Hence it now behaves identically to the fstab mount. Change-Id: Ibb7613b1b1278ab13745846baa79268db226ef19 BUG: 1295520 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/13170 Tested-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'extras/hook-scripts/start/post')
-rwxr-xr-xextras/hook-scripts/start/post/S29CTDBsetup.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/extras/hook-scripts/start/post/S29CTDBsetup.sh b/extras/hook-scripts/start/post/S29CTDBsetup.sh
index f33aa2530ed..4265cba54ee 100755
--- a/extras/hook-scripts/start/post/S29CTDBsetup.sh
+++ b/extras/hook-scripts/start/post/S29CTDBsetup.sh
@@ -6,12 +6,12 @@
# to get CTDB based failover up and running.
CTDB_MNT=/gluster/lock
+# Make sure ping-timeout is not default for CTDB volume
PING_TIMEOUT_SECS=10
PROGNAME="ctdb"
OPTSPEC="volname:"
HOSTNAME=`hostname`
-MNTOPTS="_netdev,defaults"
-MNTOPTS_GLUSTERFS="transport=tcp,xlator-option=*client*.ping-timeout=${PING_TIMEOUT_SECS}"
+MNTOPTS="_netdev,transport=tcp,xlator-option=*client*.ping-timeout=${PING_TIMEOUT_SECS}"
VOL=
# $META is the volume that will be used by CTDB as a shared filesystem.
# It is not desirable to use this volume for storing 'data' as well.
@@ -45,7 +45,7 @@ function parse_args () {
function add_fstab_entry () {
volname=$1
mntpt=$2
- mntopts="${MNTOPTS},${MNTOPTS_GLUSTERFS}"
+ mntopts="${MNTOPTS}"
mntent="${HOSTNAME}:/${volname} ${mntpt} glusterfs ${mntopts} 0 0"
exists=`grep "${mntpt}" /etc/fstab`
@@ -60,8 +60,7 @@ if [ "$META" = "$VOL" ]
then
mkdir -p $CTDB_MNT
sleep 5
- # Make sure ping-timeout is not default for CTDB volume
- mount -t glusterfs -oxlator-option=*client*.ping-timeout=${PING_TIMEOUT_SECS} `hostname`:$VOL "$CTDB_MNT" && \
+ mount -t glusterfs -o${MNTOPTS} ${HOSTNAME}:/$VOL "$CTDB_MNT" && \
add_fstab_entry $VOL $CTDB_MNT
chkconfig ctdb on
fi