Skip to content

squid: qa: Add tests to validate synced images on rbd-mirror - #55761

Merged
idryomov merged 3 commits into
ceph:squidfrom
ajarr:wip-64553-squid
Mar 16, 2024
Merged

idryomov merged 3 commits into
ceph:squidfrom
ajarr:wip-64553-squid

Conversation

@ajarr

@ajarr ajarr commented Feb 26, 2024 •

Copy link
Copy Markdown
Contributor

ajarr and others added 2 commits February 26, 2024 11:47
In rbd_mirror_helpers.sh, the `wait_for_status_in_pool_dir()` helper
stored `mirror image status` and `mirror pool status` command outputs
in files that could be shared over successive calls or calls from
multiple threads. Instead store the command outputs in local variables
to make `wait_for_status_in_pool_dir()` reentrant.

Signed-off-by: Ramana Raja <[email protected]>
(cherry picked from commit ea3a567)
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 <[email protected]>
Co-authored-by: Ilya Dryomov <[email protected]>
Co-authored-by: Christopher Hoffman <[email protected]>
(cherry picked from commit b7aae5c)
@ajarr ajarr added this to the squid milestone Feb 26, 2024
@ajarr
ajarr requested a review from a team as a code owner February 26, 2024 16:47
@ajarr ajarr added the tests label Feb 26, 2024
@github-actions github-actions Bot added the rbd label Feb 26, 2024
@idryomov

Copy link
Copy Markdown
Contributor

jenkins test make check

@idryomov

idryomov commented Mar 4, 2024

Copy link
Copy Markdown
Contributor

jenkins test make check

By making use of here strings in commit ea3a567 ("qa/workunits:
make wait_for_status_in_pool_dir() reentrant") we grew a dependency on
bash.

Signed-off-by: Ilya Dryomov <[email protected]>
(cherry picked from commit 166a236)
@ajarr
ajarr requested a review from idryomov March 11, 2024 19:10
@idryomov

Copy link
Copy Markdown
Contributor

jenkins test make check

@idryomov
idryomov merged commit 15decd5 into ceph:squid Mar 16, 2024
afreen23 pushed a commit to rhcs-dashboard/ceph that referenced this pull request Jul 29, 2026
squid: qa: Add tests to validate synced images on rbd-mirror

Reviewed-by: Ilya Dryomov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants