summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2013-08-21 12:53:11 +0530
committerAnand Avati <avati@redhat.com>2013-09-04 19:34:02 -0700
commit81d32caa26ef0e3db10cae53e6820927fe0569fc (patch)
tree3239a71209979180d13d5a0a4065ba839ad30fad /geo-replication
parentfc6938613cf12c621d705ceaa8cf695887447d5e (diff)
glusterd/gverify: Check for passwordless ssh in gverify.
Change-Id: I8c2d398114ad4534bcc052f9a5be8bbb2e7e2582 BUG: 999531 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/5677 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'geo-replication')
-rwxr-xr-xgeo-replication/src/gverify.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
index 49ed2e925ae..a2561fbe528 100755
--- a/geo-replication/src/gverify.sh
+++ b/geo-replication/src/gverify.sh
@@ -99,9 +99,18 @@ function main()
log_file=$4
> $log_file
+ # Use FORCE_BLOCKER flag in the error message to differentiate
+ # between the errors which the force command should bypass
+
ping -w 5 $2;
if [ $? -ne 0 ]; then
- echo "$2 not reachable." > $log_file
+ echo "FORCE_BLOCKER|$2 not reachable." > $log_file
+ exit 1;
+ fi;
+
+ ssh -oNumberOfPasswordPrompts=0 $2 "echo Testing_Passwordless_SSH";
+ if [ $? -ne 0 ]; then
+ echo "FORCE_BLOCKER|Passwordless ssh login has not been setup with $2." > $log_file
exit 1;
fi;
@@ -113,21 +122,20 @@ function main()
master_version=$(echo $master_data | cut -f2 -d':');
slave_version=$(echo $slave_data | cut -f2 -d':');
slave_no_of_files=$(echo $slave_data | cut -f3 -d':');
- slave_vol_test=$5
if [[ "x$master_size" = "x" || "x$master_version" = "x" || "$master_size" -eq "0" ]]; then
- echo "Unable to fetch master volume details. Please check the master cluster and master volume." > $log_file;
+ echo "FORCE_BLOCKER|Unable to fetch master volume details. Please check the master cluster and master volume." > $log_file;
exit 1;
fi;
if [[ "x$slave_size" = "x" || "x$slave_version" = "x" || "$slave_size" -eq "0" ]]; then
- echo "Unable to fetch slave volume details. Please check the slave cluster and slave volume." > $log_file;
+ echo "FORCE_BLOCKER|Unable to fetch slave volume details. Please check the slave cluster and slave volume." > $log_file;
exit 1;
fi;
- if [ ! -z $slave_vol_test ]; then
- exit $ERRORS;
- fi
+ # The above checks are mandatory and force command should be blocked
+ # if they fail. The checks below can be bypassed if force option is
+ # provided hence no FORCE_BLOCKER flag.
if [ ! $slave_size -ge $(($master_size - $BUFFER_SIZE )) ]; then
echo "Total size of master is greater than available size of slave." >> $log_file;