|
|
50dc83 |
From cb9d0fa4bd2664556f0564406037f9fb7fb781a6 Mon Sep 17 00:00:00 2001
|
|
|
50dc83 |
From: Kotresh HR <khiremat@redhat.com>
|
|
|
50dc83 |
Date: Wed, 31 Jul 2019 15:40:55 +0530
|
|
|
50dc83 |
Subject: [PATCH 266/276] geo-rep: Fix mount broker setup issue
|
|
|
50dc83 |
|
|
|
50dc83 |
Even the use builtin 'type' command as in patch [1]
|
|
|
50dc83 |
causes issues if argument in question is not part of PATH
|
|
|
50dc83 |
environment variable for that user. This patch fixes the
|
|
|
50dc83 |
same by doing source /etc/profile. This was already being
|
|
|
50dc83 |
used in another part of script.
|
|
|
50dc83 |
|
|
|
50dc83 |
[1] https://review.gluster.org/23089
|
|
|
50dc83 |
|
|
|
50dc83 |
Backport of:
|
|
|
50dc83 |
> Patch: https://review.gluster.org/23136
|
|
|
50dc83 |
> Change-Id: Iceb78835967ec6a4350983eec9af28398410c002
|
|
|
50dc83 |
> fixes: bz#1734738
|
|
|
50dc83 |
> Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
50dc83 |
|
|
|
50dc83 |
Change-Id: Iceb78835967ec6a4350983eec9af28398410c002
|
|
|
50dc83 |
BUG: 1734734
|
|
|
50dc83 |
Signed-off-by: Kotresh HR <khiremat@redhat.com>
|
|
|
50dc83 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/177867
|
|
|
50dc83 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
50dc83 |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
50dc83 |
---
|
|
|
50dc83 |
geo-replication/src/gverify.sh | 9 ++++++---
|
|
|
50dc83 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
50dc83 |
|
|
|
50dc83 |
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
|
|
|
50dc83 |
index 692c1d6..f5f70d2 100755
|
|
|
50dc83 |
--- a/geo-replication/src/gverify.sh
|
|
|
50dc83 |
+++ b/geo-replication/src/gverify.sh
|
|
|
50dc83 |
@@ -180,6 +180,8 @@ function main()
|
|
|
50dc83 |
> $log_file
|
|
|
50dc83 |
|
|
|
50dc83 |
inet6=$7
|
|
|
50dc83 |
+ local cmd_line
|
|
|
50dc83 |
+ local ver
|
|
|
50dc83 |
|
|
|
50dc83 |
# Use FORCE_BLOCKER flag in the error message to differentiate
|
|
|
50dc83 |
# between the errors which the force command should bypass
|
|
|
50dc83 |
@@ -206,13 +208,14 @@ function main()
|
|
|
50dc83 |
exit 1;
|
|
|
50dc83 |
fi;
|
|
|
50dc83 |
|
|
|
50dc83 |
+ cmd_line=$(cmd_slave);
|
|
|
50dc83 |
if [[ -z "${GR_SSH_IDENTITY_KEY}" ]]; then
|
|
|
50dc83 |
- ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "type -p gluster"
|
|
|
50dc83 |
+ ver=$(ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 bash -c "'$cmd_line'")
|
|
|
50dc83 |
else
|
|
|
50dc83 |
- ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "type -p gluster"
|
|
|
50dc83 |
+ ver=$(ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 bash -c "'$cmd_line'")
|
|
|
50dc83 |
fi
|
|
|
50dc83 |
|
|
|
50dc83 |
- if [ $? -ne 0 ]; then
|
|
|
50dc83 |
+ if [ -z "$ver" ]; then
|
|
|
50dc83 |
echo "FORCE_BLOCKER|gluster command not found on $3 for user $2." > $log_file
|
|
|
50dc83 |
exit 1;
|
|
|
50dc83 |
fi;
|
|
|
50dc83 |
--
|
|
|
50dc83 |
1.8.3.1
|
|
|
50dc83 |
|