From c7b293beba0c327ad20a5c8b3e5635be80672f63 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 2 Nov 2015 18:52:03 +0530 Subject: glusterd/geo-rep: Adding ssh-port option for geo-rep create Geo-replication uses default ssh port 22 for setup. i.e., to distribute ssh keys to slaves. In container environments, custom port number might be used. Hence to support custom port number for ssh, option is provided in geo-rep create command to take the same. Change-Id: I0fb61959b1c085342b8e4c21ac4e076fba5462f1 BUG: 1283060 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/12504 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Avra Sengupta Reviewed-by: Aravinda VK Reviewed-by: Venky Shankar (cherry picked from commit 5bb3c521431cc27b2826acd889bffb2f90ae7f73) Reviewed-on: http://review.gluster.org/12652 Reviewed-by: Vijay Bellur --- geo-replication/src/gverify.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'geo-replication') diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh index 607be4aeace..5542706aa6f 100755 --- a/geo-replication/src/gverify.sh +++ b/geo-replication/src/gverify.sh @@ -1,16 +1,17 @@ #!/bin/bash # Script to verify the Master and Slave Gluster compatibility. -# To use ./gverify +# To use ./gverify # Returns 0 if master and slave compatible. # Considering buffer_size 100MB BUFFER_SIZE=104857600; +SSH_PORT=$5; slave_log_file=`gluster --print-logdir`/geo-replication-slaves/slave.log function SSHM() { - ssh -q \ + ssh -p ${SSH_PORT} -q \ -oPasswordAuthentication=no \ -oStrictHostKeyChecking=no \ -oControlMaster=yes \ @@ -116,10 +117,9 @@ function ping_host () function main() { - log_file=$5 + log_file=$6 > $log_file - SSH_PORT=22 # Use FORCE_BLOCKER flag in the error message to differentiate # between the errors which the force command should bypass @@ -134,7 +134,7 @@ function main() exit 1; fi; - ssh -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "echo Testing_Passwordless_SSH"; + ssh -p ${SSH_PORT} -oNumberOfPasswordPrompts=0 -oStrictHostKeyChecking=no $2@$3 "echo Testing_Passwordless_SSH"; if [ $? -ne 0 ]; then echo "FORCE_BLOCKER|Passwordless ssh login has not been setup with $3 for user $2." > $log_file exit 1; -- cgit