]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: use create_image_and_enable_mirror() in bootstrap tests 61832/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 12 Feb 2025 10:25:48 +0000 (11:25 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 14 Feb 2025 14:19:25 +0000 (15:19 +0100)
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 <idryomov@gmail.com>
(cherry picked from commit 44804a374a8c45b30421282e24667e5c4a77fc03)

qa/workunits/rbd/rbd_mirror_bootstrap.sh

index c08662202ebe741a53e950742202a8710925673f..bfe357765c1b34e5bc19eab95ecb3f198f049833 100755 (executable)
@@ -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