]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
qa: Add tests to validate syncing of images using rbd-mirror
authorRamana Raja <rraja@redhat.com>
Thu, 25 May 2023 16:48:12 +0000 (16:48 +0000)
committerRamana Raja <rraja@redhat.com>
Thu, 14 Mar 2024 14:19:07 +0000 (10:19 -0400)
commit5619c71cd2b60f63b3b992db9a3eb37df367abc6
tree7ee4354417da196b9b73ace4fe662e470cb5d63c
parent66b319598ccbade7ca77be481c32e5341d6df0fe
qa: Add tests to validate syncing of images using rbd-mirror

Introduce functional tests to validate that the images under
workloads are correctly mirrored between two clusters using snapshot
based mirroring.

Run workload on a primary image using a krbd or nbd client. Take
mirror snapshots of the image under workload. Unmount the mapped image
and calculate its MD5 checksum before demoting it. After demotion,
wait for the mirror status of the image to be 'up+unknown' in both
the clusters. This is to make sure that the non-primary image in the
other cluster is ready to be promoted. Now promote the non-primary
image in the other cluster. Map the promoted image and calculate its
MD5 checksum. Verify that the checksums of the demoted and promoted
images in the two clusters are the same.

The above test is run as part of two different workunits:
 - a workunit that validates the syncing of multiple mirrored images
   with workloads running on them
 - another workunit that validates the syncing of a single mirrored
   image with workload running on it and the image is set as primary
   alternatively between the two clusters, as it happens during
   failover and failback scenarios.

Fixes: https://tracker.ceph.com/issues/61617
Signed-off-by: Ramana Raja <rraja@redhat.com>
Co-authored-by: Ilya Dryomov <idryomov@redhat.com>
Co-authored-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit b7aae5c3c5a1dd24c4cb7ceb499292af00bae680)

Cherry-pick notes:
- In qa/workunits/rbd/compare_mirror_images.sh, replace
  `wait_for_replaying_status_in_pool_dir` with `wait_for_status_in_pool_dir`
  Commit 3fd8a03 that added `wait_for_replaying_status_in_pool_dir`
  not backported
qa/suites/rbd/mirror/workloads/compare-mirror-image-alternate-primary-krbd.yaml [new file with mode: 0644]
qa/suites/rbd/mirror/workloads/compare-mirror-image-alternate-primary-nbd.yaml [new file with mode: 0644]
qa/suites/rbd/mirror/workloads/compare-mirror-images-krbd.yaml [new file with mode: 0644]
qa/suites/rbd/mirror/workloads/compare-mirror-images-nbd.yaml [new file with mode: 0644]
qa/workunits/rbd/compare_mirror_image_alternate_primary.sh [new file with mode: 0755]
qa/workunits/rbd/compare_mirror_images.sh [new file with mode: 0755]