summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2019-07-22 17:35:21 +0530
committerKotresh HR <khiremat@redhat.com>2019-07-29 08:54:36 +0000
commit0436c633d22e71d3292330e993716e37ef19eebb (patch)
tree5b11a7f294c468a8af7d81273de7e2009c6016b0
parent05138aedc3c03914bd913799428c83af2155c4d5 (diff)
geo-rep: Fix mount broker setup issue
The patch [1] added validation in gverify.sh to check if the gluster binary exists on slave by executing gluster directly on slave. But for non-root users, even though gluster binary is present, path is not found when executed via ssh. Hence validate the gluster binary using bash builtin 'type' command. [1] https://review.gluster.org/19224 Backport of: > Patch: https://review.gluster.org/23089/ > Change-Id: I93ca62c0c5b1e16263e586ddbbca8407d60ca126 > BUG: 1731920 > Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 2aa731a259ea457c07494e3c3edf6d5f7c02fe77) Change-Id: I93ca62c0c5b1e16263e586ddbbca8407d60ca126 fixes: bz#1733881 Signed-off-by: Kotresh HR <khiremat@redhat.com>
-rwxr-xr-xgeo-replication/src/gverify.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
index d048de0992b..1f06ecfe7da 100755
--- a/geo-replication/src/gverify.sh
+++ b/geo-replication/src/gverify.sh
@@ -193,13 +193,13 @@ function main()
fi;
if [[ -z "${GR_SSH_IDENTITY_KEY}" ]]; then
- err=$((ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "gluster --version") 2>&1)
+ ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "type -p gluster"
else
- err=$((ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "gluster --version") 2>&1)
+ ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "type -p gluster"
fi
if [ $? -ne 0 ]; then
- echo "FORCE_BLOCKER|gluster command on $2@$3 failed. Error: $err" > $log_file
+ echo "FORCE_BLOCKER|gluster command not found on $3 for user $2." > $log_file
exit 1;
fi;