From: Ilya Dryomov Date: Wed, 12 Feb 2025 10:25:48 +0000 (+0100) Subject: qa/workunits/rbd: use create_image_and_enable_mirror() in bootstrap tests X-Git-Tag: v19.2.3~273^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2f0053b1aafcfbf87aea523fab4e9c511aea2fdd;p=ceph.git 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) --- diff --git a/qa/workunits/rbd/rbd_mirror_bootstrap.sh b/qa/workunits/rbd/rbd_mirror_bootstrap.sh index c08662202ebe7..bfe357765c1b3 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