diff options
author | Kotresh HR <khiremat@redhat.com> | 2018-07-31 10:27:03 -0400 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-09-21 13:25:43 +0000 |
commit | 380ec25fdf439a0fd6a6fd01743625269ff85fa3 (patch) | |
tree | 60e6a4225c3a512087ff8303a269fbd74eb28679 /tests/geo-rep.rc | |
parent | ed59d4a8c4eafb7ff7709d0bf12c467a0bc35698 (diff) |
geo-rep/hook-script: Fix ssh/scp options
Always use ssh and scp with "-oPasswordAuthentication=no"
and "-oStrictHostKeyChecking=no" options. It might hang
the post script otherwise leading geo-rep setup failure
Also increased geo-rep timeout. Occasionally, it's taking
more time to reach Active/Passive status. Especially, the
first start after create.
Backport of:
> Patch: https://review.gluster.org/20601
> BUG: bz#1610405
> Change-Id: I9560d64dbe0edf5db73446a9fc97dda19b88d233
> Signed-off-by: Kotresh HR <khiremat@redhat.com>
fixes: bz#1630144
Change-Id: I9560d64dbe0edf5db73446a9fc97dda19b88d233
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'tests/geo-rep.rc')
-rw-r--r-- | tests/geo-rep.rc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/geo-rep.rc b/tests/geo-rep.rc index cdad4f1cb62..8c5391dbfa9 100644 --- a/tests/geo-rep.rc +++ b/tests/geo-rep.rc @@ -3,7 +3,20 @@ GEO_REP_TIMEOUT=60 function check_status_num_rows() { local search_key=$1 - $GEOREP_CLI $master $slave status detail | egrep -i "$search_key" | wc -l + $GEOREP_CLI $master $slave status | grep -F "$search_key" | wc -l +} + +function check_keys_distributed() +{ + local search_key=$(cat /var/lib/glusterd/geo-replication/master_slave_common_secret.pem.pub) + grep -F "$search_key" ~/.ssh/authorized_keys > /dev/null + echo $? +} + +function check_common_secret_file() +{ + stat /var/lib/glusterd/geo-replication/master_slave_common_secret.pem.pub + echo $? } function create_data() @@ -22,8 +35,8 @@ function create_data() # GF_FOP_CREATE # GF_FOP_SETATTR - # Regular file - touch ${master_mnt}/${prefix}_f1 + # Regular file + data + echo "HelloWorld!" > ${master_mnt}/${prefix}_f1 touch ${master_mnt}/${prefix}_f2 touch ${master_mnt}/${prefix}_f3 @@ -40,9 +53,6 @@ function create_data() ln -s ${prefix}_f1 ${prefix}_sl1 cd - - # data - echo "HelloWorld!" >> ${master_mnt}/${prefix}_f1 - # UNLINK rm ${master_mnt}/${prefix}_f2 |