diff options
| author | Kotresh HR <khiremat@redhat.com> | 2018-07-31 10:27:03 -0400 | 
|---|---|---|
| committer | Aravinda VK <avishwan@redhat.com> | 2018-08-03 03:18:58 +0000 | 
| commit | 9e96d646537fd060ca932291aaa0c4a3ce942b67 (patch) | |
| tree | 428587e982dd47a04cb4eda773e1f6e3669fb7f0 /tests/geo-rep.rc | |
| parent | 74b63639e81a4e674600993cfbec619c61857c35 (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.
fixes: bz#1610405
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 b3ba11fec18..c33ceaaa64e 100644 --- a/tests/geo-rep.rc +++ b/tests/geo-rep.rc @@ -3,7 +3,20 @@ GEO_REP_TIMEOUT=120  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  | 
