From 890078423b4b720dd124f07c975e834695bcc915 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 18 Jan 2018 05:43:56 +0000 Subject: geo-rep: Validate availability of gluster binary on slave 1. Adds validation to check if gluster binary is available on slave 2. Add a simple geo-rep setup test case to verify whether setup is fine. It's named in such a way that it runs first. BUG: 1532591 Change-Id: Ie777e55ae13db8fa97d4e32464ad82269ee5fd07 Signed-off-by: Kotresh HR --- geo-replication/src/gverify.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'geo-replication') diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh index 8eae8469ff..7440f44c02 100755 --- a/geo-replication/src/gverify.sh +++ b/geo-replication/src/gverify.sh @@ -191,6 +191,17 @@ function main() exit 1; fi; + if [[ -z "${GR_SSH_IDENTITY_KEY}" ]]; then + err=$((ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "gluster --version") 2>&1) + else + err=$((ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "gluster --version") 2>&1) + fi + + if [ $? -ne 0 ]; then + echo "FORCE_BLOCKER|gluster command on $2@$3 failed. Error: $err" > $log_file + exit 1; + fi; + ERRORS=0; master_data=$(master_stats $1); slave_data=$(slave_stats $2 $3 $4); @@ -236,7 +247,7 @@ function main() fi; if [[ $master_version != $slave_version ]]; then - echo "Gluster version mismatch between master and slave." >> $log_file; + echo "Gluster version mismatch between master and slave. Master version: $master_version Slave version: $slave_version" >> $log_file; ERRORS=$(($ERRORS + 1)); fi; -- cgit