summaryrefslogtreecommitdiffstats
path: root/tests/00-geo-rep
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-07-31 10:27:03 -0400
committerAravinda VK <avishwan@redhat.com>2018-08-03 03:18:58 +0000
commit9e96d646537fd060ca932291aaa0c4a3ce942b67 (patch)
tree428587e982dd47a04cb4eda773e1f6e3669fb7f0 /tests/00-geo-rep
parent74b63639e81a4e674600993cfbec619c61857c35 (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/00-geo-rep')
-rw-r--r--tests/00-geo-rep/00-georep-verify-setup.t26
-rw-r--r--tests/00-geo-rep/georep-basic-dr-rsync.t14
-rw-r--r--tests/00-geo-rep/georep-basic-dr-tarssh.t14
3 files changed, 49 insertions, 5 deletions
diff --git a/tests/00-geo-rep/00-georep-verify-setup.t b/tests/00-geo-rep/00-georep-verify-setup.t
index f031be1..ea22d37 100644
--- a/tests/00-geo-rep/00-georep-verify-setup.t
+++ b/tests/00-geo-rep/00-georep-verify-setup.t
@@ -5,7 +5,7 @@
. $(dirname $0)/../geo-rep.rc
. $(dirname $0)/../env.rc
-### Basic Tests with Distribute Replicate volumes
+SCRIPT_TIMEOUT=300
##Cleanup and start glusterd
cleanup;
@@ -54,6 +54,30 @@ TEST glusterfs -s $H0 --volfile-id $GSV0 $M1
#Create geo-rep session
TEST create_georep_session $master $slave
+#Config gluster-command-dir
+TEST $GEOREP_CLI $master $slave config gluster-command-dir ${GLUSTER_CMD_DIR}
+
+#Config gluster-command-dir
+TEST $GEOREP_CLI $master $slave config slave-gluster-command-dir ${GLUSTER_CMD_DIR}
+
+#Enable_metavolume
+TEST $GEOREP_CLI $master $slave config use_meta_volume true
+
+#Wait for common secret pem file to be created
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_common_secret_file
+
+#Verify the keys are distributed
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_keys_distributed
+
+#Start_georep
+TEST $GEOREP_CLI $master $slave start
+
+EXPECT_WITHIN $GEO_REP_TIMEOUT 2 check_status_num_rows "Active"
+EXPECT_WITHIN $GEO_REP_TIMEOUT 2 check_status_num_rows "Passive"
+
+#Stop Geo-rep
+TEST $GEOREP_CLI $master $slave stop
+
#Delete Geo-rep
TEST $GEOREP_CLI $master $slave delete
diff --git a/tests/00-geo-rep/georep-basic-dr-rsync.t b/tests/00-geo-rep/georep-basic-dr-rsync.t
index 1ce3428..347961f 100644
--- a/tests/00-geo-rep/georep-basic-dr-rsync.t
+++ b/tests/00-geo-rep/georep-basic-dr-rsync.t
@@ -5,7 +5,7 @@
. $(dirname $0)/../geo-rep.rc
. $(dirname $0)/../env.rc
-SCRIPT_TIMEOUT=300
+SCRIPT_TIMEOUT=500
AREQUAL_PATH=$(dirname $0)/../utils
test "`uname -s`" != "Linux" && {
@@ -42,6 +42,10 @@ TEST $CLI volume start $GMV0
##create_and_start_slave_volume
TEST $CLI volume create $GSV0 replica 2 $H0:$B0/${GSV0}{1,2,3,4};
TEST $CLI volume start $GSV0
+TEST $CLI volume set $GSV0 performance.stat-prefetch off
+TEST $CLI volume set $GSV0 performance.quick-read off
+TEST $CLI volume set $GSV0 performance.readdir-ahead off
+TEST $CLI volume set $GSV0 performance.read-ahead off
##Create, start and mount meta_volume
TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3};
@@ -76,6 +80,12 @@ TEST $GEOREP_CLI $master $slave config use_meta_volume true
#Set changelog roll-over time to 3 secs
TEST $CLI volume set $GMV0 changelog.rollover-time 3
+#Wait for common secret pem file to be created
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_common_secret_file
+
+#Verify the keys are distributed
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_keys_distributed
+
#Start_georep
TEST $GEOREP_CLI $master $slave start
@@ -84,7 +94,7 @@ EXPECT_WITHIN $GEO_REP_TIMEOUT 2 check_status_num_rows "Passive"
#data_tests "hybrid"
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 regular_file_ok ${slave_mnt}/hybrid_f1
-EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/$hybrid_d1
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/hybrid_d1
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 rename_file_ok ${slave_mnt}/hybrid_f3 ${slave_mnt}/hybrid_f4
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 rename_dir_ok ${slave_mnt}/hybrid_d3 ${slave_mnt}/hybrid_d4
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 symlink_ok hybrid_f1 ${slave_mnt}/hybrid_sl1
diff --git a/tests/00-geo-rep/georep-basic-dr-tarssh.t b/tests/00-geo-rep/georep-basic-dr-tarssh.t
index 1ebe629..20a0a87 100644
--- a/tests/00-geo-rep/georep-basic-dr-tarssh.t
+++ b/tests/00-geo-rep/georep-basic-dr-tarssh.t
@@ -5,7 +5,7 @@
. $(dirname $0)/../geo-rep.rc
. $(dirname $0)/../env.rc
-SCRIPT_TIMEOUT=300
+SCRIPT_TIMEOUT=500
AREQUAL_PATH=$(dirname $0)/../utils
test "`uname -s`" != "Linux" && {
@@ -42,6 +42,10 @@ TEST $CLI volume start $GMV0
##create_and_start_slave_volume
TEST $CLI volume create $GSV0 replica 2 $H0:$B0/${GSV0}{1,2,3,4};
TEST $CLI volume start $GSV0
+TEST $CLI volume set $GSV0 performance.stat-prefetch off
+TEST $CLI volume set $GSV0 performance.quick-read off
+TEST $CLI volume set $GSV0 performance.readdir-ahead off
+TEST $CLI volume set $GSV0 performance.read-ahead off
##Create, start and mount meta_volume
TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3};
@@ -79,6 +83,12 @@ TEST $CLI volume set $GMV0 changelog.rollover-time 3
#Config tarssh as sync-engine
TEST $GEOREP_CLI $master $slave config use_tarssh true
+#Wait for common secret pem file to be created
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_common_secret_file
+
+#Verify the keys are distributed
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 check_keys_distributed
+
#Start_georep
TEST $GEOREP_CLI $master $slave start
@@ -87,7 +97,7 @@ EXPECT_WITHIN $GEO_REP_TIMEOUT 2 check_status_num_rows "Passive"
#data_tests "hybrid"
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 regular_file_ok ${slave_mnt}/hybrid_f1
-EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/$hybrid_d1
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/hybrid_d1
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 rename_file_ok ${slave_mnt}/hybrid_f3 ${slave_mnt}/hybrid_f4
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 rename_dir_ok ${slave_mnt}/hybrid_d3 ${slave_mnt}/hybrid_d4
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 symlink_ok hybrid_f1 ${slave_mnt}/hybrid_sl1