50dc83
From de24d64c2599e48a05e8792b845cfecc210a6fc5 Mon Sep 17 00:00:00 2001
50dc83
From: Kotresh HR <khiremat@redhat.com>
50dc83
Date: Mon, 22 Jul 2019 17:35:21 +0530
50dc83
Subject: [PATCH 258/261] geo-rep: Fix mount broker setup issue
50dc83
50dc83
The patch [1] added validation in gverify.sh to check if the gluster
50dc83
binary on slave by executing gluster directly on slave.  But for
50dc83
non-root users, even though gluster binary is present, path is not
50dc83
found when executed via ssh. Hence validate the gluster binary using
50dc83
bash builtin 'type' command.
50dc83
50dc83
[1] https://review.gluster.org/19224
50dc83
50dc83
Backport of:
50dc83
 > Patch: https://review.gluster.org/23089
50dc83
 > Change-Id: I93ca62c0c5b1e16263e586ddbbca8407d60ca126
50dc83
 > fixes: bz#1731920
50dc83
 > Signed-off-by: Kotresh HR <khiremat@redhat.com>
50dc83
50dc83
Change-Id: I93ca62c0c5b1e16263e586ddbbca8407d60ca126
50dc83
BUG: 1720992
50dc83
Signed-off-by: Kotresh HR <khiremat@redhat.com>
50dc83
Reviewed-on: https://code.engineering.redhat.com/gerrit/176727
50dc83
Tested-by: RHGS Build Bot <nigelb@redhat.com>
50dc83
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
50dc83
---
50dc83
 geo-replication/src/gverify.sh | 6 +++---
50dc83
 1 file changed, 3 insertions(+), 3 deletions(-)
50dc83
50dc83
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
50dc83
index 7c88f9f..692c1d6 100755
50dc83
--- a/geo-replication/src/gverify.sh
50dc83
+++ b/geo-replication/src/gverify.sh
50dc83
@@ -207,13 +207,13 @@ function main()
50dc83
     fi;
50dc83
 
50dc83
     if [[ -z "${GR_SSH_IDENTITY_KEY}" ]]; then
50dc83
-        err=$((ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "gluster --version") 2>&1)
50dc83
+        ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "type -p gluster"
50dc83
     else
50dc83
-        err=$((ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "gluster --version") 2>&1)
50dc83
+        ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "type -p gluster"
50dc83
     fi
50dc83
 
50dc83
     if [ $? -ne 0 ]; then
50dc83
-        echo "FORCE_BLOCKER|gluster command on $2@$3 failed. Error: $err" > $log_file
50dc83
+        echo "FORCE_BLOCKER|gluster command not found on $3 for user $2." > $log_file
50dc83
         exit 1;
50dc83
     fi;
50dc83
 
50dc83
-- 
50dc83
1.8.3.1
50dc83