From fa32b594d12673698da0c1dab8491db8655b4d50 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Tue, 4 Jun 2019 11:17:21 +0530 Subject: cluster/replicate: Modify command in unit file to assign port correctly Problem: In unit file of TA process we have been using ta-vol as volume id and also ta-vol-server.transport.socket.listen-port=24007 In volume file for TA process we only consider volname as "ta" and not as "ta-vol". That's why it was not able to assign this port number to ta process as in volume file it will try to find server xlator as ta-vol volume ta-server <<<<<<<<< not ta-vol-server 46 type protocol/server 47 option transport.listen-backlog 10 48 option transport.socket.keepalive-count 9 49 option transport.socket.keepalive-interval 2 50 option transport.socket.keepalive-time 20 51 option transport.tcp-user-timeout 0 52 option transport.socket.keepalive 1 53 option auth.addr./mnt/thin-arbiter.allow * 54 option auth-path /mnt/thin-arbiter 55 option transport.address-family inet 56 option transport-type tcp 57 subvolumes ta-io-stats 58 end-volume Solution: Provide "ta" as vol id for the command which Unit file is going to execute. Also, made changes in setup-thin-arbiter.sh to correctly identify the directory of Unit file irrespective of the location from where we are executing this script. Change-Id: Ia7bbccdc0304e7dfaaa732bebb726fba731d1d33 fixes: bz#1716766 Signed-off-by: Ashish Pandey --- extras/thin-arbiter/setup-thin-arbiter.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extras/thin-arbiter/setup-thin-arbiter.sh') diff --git a/extras/thin-arbiter/setup-thin-arbiter.sh b/extras/thin-arbiter/setup-thin-arbiter.sh index 1c77cf07c57..0681b30ef3f 100755 --- a/extras/thin-arbiter/setup-thin-arbiter.sh +++ b/extras/thin-arbiter/setup-thin-arbiter.sh @@ -22,6 +22,7 @@ # script or by any other mean. The same location should be used in # the gluster CLI when creating thin-arbiter volumes. +MYPATH=`dirname $0` volloc="/var/lib/glusterd/thin-arbiter" mkdir -p $volloc @@ -29,7 +30,7 @@ mkdir -p $volloc if [ -f /etc/glusterfs/thin-arbiter.vol ]; then volfile=/etc/glusterfs/thin-arbiter.vol else - volfile=extras/thin-arbiter/thin-arbiter.vol + volfile=$MYPATH/thin-arbiter.vol fi tafile="$volloc/thin-arbiter.vol" @@ -135,7 +136,7 @@ setup () { if [ -f /usr/lib/systemd/system/gluster-ta-volume.service ]; then echo "Starting thin-arbiter process" else - cp ../systemd/gluster-ta-volume.service /etc/systemd/system/ + cp $MYPATH/../systemd/gluster-ta-volume.service /etc/systemd/system/ echo "Starting thin-arbiter process" chmod 0644 /etc/systemd/system/gluster-ta-volume.service fi -- cgit