summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2019-06-04 11:17:21 +0530
committerAmar Tumballi <amarts@redhat.com>2019-06-08 05:39:10 +0000
commitfa32b594d12673698da0c1dab8491db8655b4d50 (patch)
treed0c53de6adb2c3f6ec37970a7c97c0f77565b448 /extras
parentecafe78378209ea28201624fca262bfdbd425365 (diff)
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 <aspandey@redhat.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/systemd/gluster-ta-volume.service.in2
-rwxr-xr-xextras/thin-arbiter/setup-thin-arbiter.sh5
2 files changed, 4 insertions, 3 deletions
diff --git a/extras/systemd/gluster-ta-volume.service.in b/extras/systemd/gluster-ta-volume.service.in
index f262aac9202..452c01c419f 100644
--- a/extras/systemd/gluster-ta-volume.service.in
+++ b/extras/systemd/gluster-ta-volume.service.in
@@ -4,7 +4,7 @@ After=network.target
[Service]
Environment="LOG_LEVEL=WARNING"
-ExecStart=@prefix@/sbin/glusterfsd -N --volfile-id ta-vol -f @GLUSTERD_WORKDIR@/thin-arbiter/thin-arbiter.vol --brick-port 24007 --xlator-option ta-vol-server.transport.socket.listen-port=24007
+ExecStart=@prefix@/sbin/glusterfsd -N --volfile-id ta -f @GLUSTERD_WORKDIR@/thin-arbiter/thin-arbiter.vol --brick-port 24007 --xlator-option ta-server.transport.socket.listen-port=24007
Restart=always
KillMode=process
SuccessExitStatus=15
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