From 37f1145287779bbd7ccbadd1d01ca60b6ba73013 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Wed, 12 Feb 2025 11:25:48 +0100 Subject: [PATCH] qa/workunits/rbd: use create_image_and_enable_mirror() in bootstrap tests The reason create_image() + enable_mirror() happens to work for PARENT_POOL is that PARENT_POOL is enabled for mirroring in image mode unconditionally, unlike POOL, POOL/NS1 or PARENT_POOL/NS1 for which MIRROR_POOL_MODE setting is respected. This isn't immediately obvious because it's done in setup_pools() in rbd_mirror_helpers.sh. Switch to create_image_and_enable_mirror() for clarity. Signed-off-by: Ilya Dryomov (cherry picked from commit 44804a374a8c45b30421282e24667e5c4a77fc03) --- qa/workunits/rbd/rbd_mirror_bootstrap.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/qa/workunits/rbd/rbd_mirror_bootstrap.sh b/qa/workunits/rbd/rbd_mirror_bootstrap.sh index 4c3c1ccd2bd75..094108f9f5ae4 100755 --- a/qa/workunits/rbd/rbd_mirror_bootstrap.sh +++ b/qa/workunits/rbd/rbd_mirror_bootstrap.sh @@ -62,12 +62,8 @@ testlog "TEST: verify rx-tx direction" rbd --cluster ${CLUSTER1} --pool ${PARENT_POOL} mirror pool info --format json | jq -e '.peers[0].direction == "rx-tx"' rbd --cluster ${CLUSTER2} --pool ${PARENT_POOL} mirror pool info --format json | jq -e '.peers[0].direction == "rx-tx"' -create_image ${CLUSTER1} ${PARENT_POOL} image1 -create_image ${CLUSTER2} ${PARENT_POOL} image2 - -enable_mirror ${CLUSTER1} ${PARENT_POOL} image1 -enable_mirror ${CLUSTER2} ${PARENT_POOL} image2 - +create_image_and_enable_mirror ${CLUSTER1} ${PARENT_POOL} image1 +create_image_and_enable_mirror ${CLUSTER2} ${PARENT_POOL} image2 create_image_and_enable_mirror ${CLUSTER1} ${PARENT_POOL}/${NS1} image1 create_image_and_enable_mirror ${CLUSTER2} ${PARENT_POOL}/${NS1} image2 -- 2.39.5