diff options
author | Kotresh HR <khiremat@redhat.com> | 2015-11-02 18:52:03 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2015-11-18 11:33:37 -0800 |
commit | 5bb3c521431cc27b2826acd889bffb2f90ae7f73 (patch) | |
tree | 8140f25f0a8c31cfa63caa9b80d1d7f2201c9c12 /geo-replication/src | |
parent | a1e4be4d277c8150657f7b9fd4b72dcdd639523d (diff) |
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: 1276028
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/12504
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/src')
-rwxr-xr-x | geo-replication/src/gverify.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh index 5bd6a78664b..42d9dcc6f51 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 <master volume> <slave host> <slave volume> +# To use ./gverify <master volume> <slave user> <slave host> <slave volume> <ssh port> <log file> # 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 \ @@ -154,10 +155,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 @@ -172,7 +172,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; |