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