diff options
author | Shwetha K Acharya <sacharya@redhat.com> | 2019-07-31 11:34:19 +0530 |
---|---|---|
committer | Aravinda VK <mail@aravindavk.in> | 2020-01-03 15:34:34 +0000 |
commit | 59ed165a60a58db62a67a9d9fbe75d8338e5ddeb (patch) | |
tree | 2cd575d0d00b32cd1d23634c97538eed086e931e /tests | |
parent | 1e56e7acc3ced4f49d4494556bf6c86cd017b4ea (diff) |
geo-rep: Note section is required for ignore_deletes
There exists a window of 15 sec, where the deletes are picked up
by history crawl when the ignore_deletes is set to true.
And it eventually deletes the file/s from slave which is/are not
supposed to be deleted. Though it is working as per design, a
note regarding this is needed.
Added a warning message indicating the same.
Also logged info when the worker restarts after ignore-deletes
option set.
fixes: bz#1708603
Change-Id: I103be882fac18b4cef935efa355f5037a396f7c1
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/00-geo-rep/bug-1708603.t | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/00-geo-rep/bug-1708603.t b/tests/00-geo-rep/bug-1708603.t new file mode 100644 index 00000000000..26913f1d318 --- /dev/null +++ b/tests/00-geo-rep/bug-1708603.t @@ -0,0 +1,63 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc +. $(dirname $0)/../geo-rep.rc +. $(dirname $0)/../env.rc + +SCRIPT_TIMEOUT=300 + +##Cleanup and start glusterd +cleanup; +TEST glusterd; +TEST pidof glusterd + + +##Variables +GEOREP_CLI="gluster volume geo-replication" +master=$GMV0 +SH0="127.0.0.1" +slave=${SH0}::${GSV0} +num_active=2 +num_passive=2 +master_mnt=$M0 +slave_mnt=$M1 + +############################################################ +#SETUP VOLUMES AND GEO-REPLICATION +############################################################ + +##create_and_start_master_volume +TEST $CLI volume create $GMV0 replica 2 $H0:$B0/${GMV0}{1,2,3,4}; +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 + +##Mount master +TEST glusterfs -s $H0 --volfile-id $GMV0 $M0 + +##Mount slave +TEST glusterfs -s $H0 --volfile-id $GSV0 $M1 + +#Create geo-rep session +TEST create_georep_session $master $slave + +echo n | $GEOREP_CLI $master $slave config ignore-deletes true >/dev/null 2>&1 +EXPECT "false" echo $($GEOREP_CLI $master $slave config ignore-deletes) +echo y | $GEOREP_CLI $master $slave config ignore-deletes true +EXPECT "true" echo $($GEOREP_CLI $master $slave config ignore-deletes) + +#Stop Geo-rep +TEST $GEOREP_CLI $master $slave stop + +#Delete Geo-rep +TEST $GEOREP_CLI $master $slave delete + +#Cleanup authorized keys +sed -i '/^command=.*SSH_ORIGINAL_COMMAND#.*/d' ~/.ssh/authorized_keys +sed -i '/^command=.*gsyncd.*/d' ~/.ssh/authorized_keys + +cleanup; +#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000 |