summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2013-08-07 17:09:17 +0530
committerAnand Avati <avati@redhat.com>2013-09-04 19:29:17 -0700
commit3bfa0dde137f35d68e7f935ddd562136b4829e21 (patch)
tree6214447af984b00de54db07d9b667ce8f46e803c /extras/hook-scripts/S56glusterd-geo-rep-create-post.sh
parent59d37265acf250b1b29c186020c55e9df0ef4215 (diff)
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 <asengupt@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/5516 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'extras/hook-scripts/S56glusterd-geo-rep-create-post.sh')
-rwxr-xr-xextras/hook-scripts/S56glusterd-geo-rep-create-post.sh5
1 files changed, 3 insertions, 2 deletions
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