From ffa791f5403a079304ff88976f7cc2077c991df3 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 29 Jan 2020 18:46:07 -0500 Subject: [PATCH] qa: move existing rbd-mirror functional test to journal-specific test A new functional test for snapshot-based mirroring will be created and the other stress-tests should eventually be applied to both snapshot- and journal-based mirroring. Signed-off-by: Jason Dillaman --- ...it.yaml => rbd-mirror-journal-workunit.yaml} | 4 ++-- ...ress-workunit-min-compat-client-octopus.yaml | 2 +- .../rbd-mirror-workunit-config-key.yaml | 4 ++-- ...rror-workunit-min-compat-client-octopus.yaml | 4 ++-- .../rbd-mirror-workunit-policy-none.yaml | 4 ++-- .../rbd-mirror-workunit-policy-simple.yaml | 4 ++-- qa/workunits/rbd/rbd_mirror_helpers.sh | 17 +++++++++-------- .../{rbd_mirror.sh => rbd_mirror_journal.sh} | 6 +++--- 8 files changed, 23 insertions(+), 22 deletions(-) rename qa/suites/rbd/mirror-thrash/workloads/{rbd-mirror-workunit.yaml => rbd-mirror-journal-workunit.yaml} (63%) rename qa/workunits/rbd/{rbd_mirror.sh => rbd_mirror_journal.sh} (99%) diff --git a/qa/suites/rbd/mirror-thrash/workloads/rbd-mirror-workunit.yaml b/qa/suites/rbd/mirror-thrash/workloads/rbd-mirror-journal-workunit.yaml similarity index 63% rename from qa/suites/rbd/mirror-thrash/workloads/rbd-mirror-workunit.yaml rename to qa/suites/rbd/mirror-thrash/workloads/rbd-mirror-journal-workunit.yaml index 349d3fc838597..5f12b22399ba9 100644 --- a/qa/suites/rbd/mirror-thrash/workloads/rbd-mirror-workunit.yaml +++ b/qa/suites/rbd/mirror-thrash/workloads/rbd-mirror-journal-workunit.yaml @@ -1,9 +1,9 @@ meta: -- desc: run the rbd_mirror.sh workunit to test the rbd-mirror daemon +- desc: run the rbd_mirror_journal.sh workunit to test the rbd-mirror daemon tasks: - workunit: clients: - cluster1.client.mirror: [rbd/rbd_mirror.sh] + cluster1.client.mirror: [rbd/rbd_mirror_journal.sh] env: # override workunit setting of CEPH_ARGS='--cluster' CEPH_ARGS: '' diff --git a/qa/suites/rbd/mirror/workloads/rbd-mirror-stress-workunit-min-compat-client-octopus.yaml b/qa/suites/rbd/mirror/workloads/rbd-mirror-stress-workunit-min-compat-client-octopus.yaml index a46adb3a0f3b3..5cc351bb9d510 100644 --- a/qa/suites/rbd/mirror/workloads/rbd-mirror-stress-workunit-min-compat-client-octopus.yaml +++ b/qa/suites/rbd/mirror/workloads/rbd-mirror-stress-workunit-min-compat-client-octopus.yaml @@ -1,5 +1,5 @@ meta: -- desc: run the rbd_mirror.sh workunit to test the rbd-mirror daemon +- desc: run the rbd_mirror_stress.sh workunit to test the rbd-mirror daemon tasks: - workunit: clients: diff --git a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-config-key.yaml b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-config-key.yaml index 0c8c2180f6c7f..0102050eb0074 100644 --- a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-config-key.yaml +++ b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-config-key.yaml @@ -1,9 +1,9 @@ meta: -- desc: run the rbd_mirror.sh workunit to test the rbd-mirror daemon +- desc: run the rbd_mirror_journal.sh workunit to test the rbd-mirror daemon tasks: - workunit: clients: - cluster1.client.mirror: [rbd/rbd_mirror.sh] + cluster1.client.mirror: [rbd/rbd_mirror_journal.sh] env: # override workunit setting of CEPH_ARGS='--cluster' CEPH_ARGS: '' diff --git a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-min-compat-client-octopus.yaml b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-min-compat-client-octopus.yaml index b356a2930f7e1..5bd024d2da819 100644 --- a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-min-compat-client-octopus.yaml +++ b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-min-compat-client-octopus.yaml @@ -1,9 +1,9 @@ meta: -- desc: run the rbd_mirror.sh workunit to test the rbd-mirror daemon +- desc: run the rbd_mirror_journal.sh workunit to test the rbd-mirror daemon tasks: - workunit: clients: - cluster1.client.mirror: [rbd/rbd_mirror.sh] + cluster1.client.mirror: [rbd/rbd_mirror_journal.sh] env: # override workunit setting of CEPH_ARGS='--cluster' CEPH_ARGS: '' diff --git a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-none.yaml b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-none.yaml index eff20a9e2694e..0a610ea2f01d9 100644 --- a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-none.yaml +++ b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-none.yaml @@ -1,5 +1,5 @@ meta: -- desc: run the rbd_mirror.sh workunit to test the rbd-mirror daemon +- desc: run the rbd_mirror_journal.sh workunit to test the rbd-mirror daemon overrides: ceph: conf: @@ -8,7 +8,7 @@ overrides: tasks: - workunit: clients: - cluster1.client.mirror: [rbd/rbd_mirror.sh] + cluster1.client.mirror: [rbd/rbd_mirror_journal.sh] env: # override workunit setting of CEPH_ARGS='--cluster' CEPH_ARGS: '' diff --git a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-simple.yaml b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-simple.yaml index 85814217feac1..883e8abd31e1a 100644 --- a/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-simple.yaml +++ b/qa/suites/rbd/mirror/workloads/rbd-mirror-workunit-policy-simple.yaml @@ -1,5 +1,5 @@ meta: -- desc: run the rbd_mirror.sh workunit to test the rbd-mirror daemon +- desc: run the rbd_mirror_journal.sh workunit to test the rbd-mirror daemon overrides: ceph: conf: @@ -8,7 +8,7 @@ overrides: tasks: - workunit: clients: - cluster1.client.mirror: [rbd/rbd_mirror.sh] + cluster1.client.mirror: [rbd/rbd_mirror_journal.sh] env: # override workunit setting of CEPH_ARGS='--cluster' CEPH_ARGS: '' diff --git a/qa/workunits/rbd/rbd_mirror_helpers.sh b/qa/workunits/rbd/rbd_mirror_helpers.sh index 4cbf02b033aad..4846ec331ebce 100755 --- a/qa/workunits/rbd/rbd_mirror_helpers.sh +++ b/qa/workunits/rbd/rbd_mirror_helpers.sh @@ -24,7 +24,7 @@ # The cleanup can be done as a separate step, running the script with # `cleanup ${RBD_MIRROR_TEMDIR}' arguments. # -# Note, as other workunits tests, rbd_mirror.sh expects to find ceph binaries +# Note, as other workunits tests, rbd_mirror_journal.sh expects to find ceph binaries # in PATH. # # Thus a typical troubleshooting session: @@ -35,7 +35,7 @@ # cd $CEPH_SRC_PATH # PATH=$CEPH_SRC_PATH:$PATH # RBD_MIRROR_NOCLEANUP=1 RBD_MIRROR_TEMDIR=/tmp/tmp.rbd_mirror \ -# ../qa/workunits/rbd/rbd_mirror.sh +# ../qa/workunits/rbd/rbd_mirror_journal.sh # # After the test failure cd to TEMPDIR and check the current state: # @@ -53,17 +53,17 @@ # # cd $CEPH_SRC_PATH # export RBD_MIRROR_TEMDIR=/tmp/tmp.rbd_mirror -# ../qa/workunits/rbd/rbd_mirror.sh status -# ../qa/workunits/rbd/rbd_mirror.sh stop_mirror cluster1 -# ../qa/workunits/rbd/rbd_mirror.sh start_mirror cluster2 -# ../qa/workunits/rbd/rbd_mirror.sh flush cluster2 +# ../qa/workunits/rbd/rbd_mirror_journal.sh status +# ../qa/workunits/rbd/rbd_mirror_journal.sh stop_mirror cluster1 +# ../qa/workunits/rbd/rbd_mirror_journal.sh start_mirror cluster2 +# ../qa/workunits/rbd/rbd_mirror_journal.sh flush cluster2 # ... # # Eventually, run the cleanup: # # cd $CEPH_SRC_PATH # RBD_MIRROR_TEMDIR=/tmp/tmp.rbd_mirror \ -# ../qa/workunits/rbd/rbd_mirror.sh cleanup +# ../qa/workunits/rbd/rbd_mirror_journal.sh cleanup # if type xmlstarlet > /dev/null 2>&1; then @@ -1132,8 +1132,9 @@ enable_mirror() local cluster=$1 local pool=$2 local image=$3 + local mode=${4:-journal} - rbd --cluster=${cluster} mirror image enable ${pool}/${image} + rbd --cluster=${cluster} mirror image enable ${pool}/${image} ${mode} } test_image_present() diff --git a/qa/workunits/rbd/rbd_mirror.sh b/qa/workunits/rbd/rbd_mirror_journal.sh similarity index 99% rename from qa/workunits/rbd/rbd_mirror.sh rename to qa/workunits/rbd/rbd_mirror_journal.sh index cf0d9f7e300e8..efa00f4e18462 100755 --- a/qa/workunits/rbd/rbd_mirror.sh +++ b/qa/workunits/rbd/rbd_mirror_journal.sh @@ -1,6 +1,6 @@ #!/bin/sh -ex # -# rbd_mirror.sh - test rbd-mirror daemon +# rbd_mirror_journal.sh - test rbd-mirror daemon in journal-based mirroring mode # # The scripts starts two ("local" and "remote") clusters using mstart.sh script, # creates a temporary directory, used for cluster configs, daemon logs, admin @@ -230,7 +230,7 @@ clone_image=test_clone clone_image ${CLUSTER2} ${PARENT_POOL} ${parent_image} ${parent_snap} ${POOL} ${clone_image} write_image ${CLUSTER2} ${POOL} ${clone_image} 100 -enable_mirror ${CLUSTER2} ${PARENT_POOL} ${parent_image} +enable_mirror ${CLUSTER2} ${PARENT_POOL} ${parent_image} journal wait_for_image_replay_started ${CLUSTER1} ${PARENT_POOL} ${parent_image} wait_for_replay_complete ${CLUSTER1} ${CLUSTER2} ${PARENT_POOL} ${parent_image} wait_for_status_in_pool_dir ${CLUSTER1} ${PARENT_POOL} ${parent_image} 'up+replaying' 'master_position' @@ -398,7 +398,7 @@ testlog "TEST: non-default namespace image mirroring" testlog " - replay" create_image ${CLUSTER2} ${POOL}/${NS1} ${image} create_image ${CLUSTER2} ${POOL}/${NS2} ${image} -enable_mirror ${CLUSTER2} ${POOL}/${NS2} ${image} +enable_mirror ${CLUSTER2} ${POOL}/${NS2} ${image} journal wait_for_image_replay_started ${CLUSTER1} ${POOL}/${NS1} ${image} wait_for_image_replay_started ${CLUSTER1} ${POOL}/${NS2} ${image} write_image ${CLUSTER2} ${POOL}/${NS1} ${image} 100 -- 2.39.5