From 3bfa0dde137f35d68e7f935ddd562136b4829e21 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 7 Aug 2013 17:09:17 +0530 Subject: glusterd/gverify.sh: Stops session being created with invalid slave details create force will fail with proper message, if the ip is not reachable, or is unable to fetch slave details. Change-Id: I44a3ba777b37702ffd0e48e9cb46c51e293327d4 BUG: 988314 Signed-off-by: Avra Sengupta Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/5516 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- extras/hook-scripts/S56glusterd-geo-rep-create-post.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh b/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh index 71e44b6ed13..1369c22fc1a 100755 --- a/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh +++ b/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh @@ -22,6 +22,7 @@ if [ "$val" == "" ]; then exit; fi pub_file=`echo $val` +pub_file_tmp=`echo $val`_tmp key=`echo $key_val_pair3 | cut -d '=' -f 1` val=`echo $key_val_pair3 | cut -d '=' -f 2` @@ -34,8 +35,8 @@ fi slave_ip=`echo $val` if [ -f $pub_file ]; then - ssh $slave_ip "\rm -rf $pub_file" - scp $pub_file $slave_ip:$pub_file &> /dev/null + scp $pub_file $slave_ip:$pub_file_tmp + ssh $slave_ip "mv $pub_file_tmp $pub_file" ssh $slave_ip "gluster system:: copy file /geo-replication/common_secret.pem.pub > /dev/null" ssh $slave_ip "gluster system:: execute add_secret_pub > /dev/null" fi -- cgit