summaryrefslogtreecommitdiffstats
path: root/geo-replication/src
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-01-18 05:43:56 +0000
committerAmar Tumballi <amarts@redhat.com>2018-01-19 03:53:24 +0000
commit890078423b4b720dd124f07c975e834695bcc915 (patch)
treee77d6a0d771dca7dc120b17f5c5d0d0ef7062e84 /geo-replication/src
parentdc70cf124c1625a0ada4b25cb0e055f5b6895036 (diff)
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 <khiremat@redhat.com>
Diffstat (limited to 'geo-replication/src')
-rwxr-xr-xgeo-replication/src/gverify.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
index 8eae8469ff0..7440f44c028 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;