]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: moving mirror_image_snapshot to wait_for_replay_complete
authorVinayBhaskar-V <vvarada@redhat.com>
Tue, 21 Oct 2025 07:04:40 +0000 (12:34 +0530)
committerVinayBhaskar-V <vvarada@redhat.com>
Tue, 21 Oct 2025 07:18:38 +0000 (12:48 +0530)
to make wait_for_snapshot_sync_complete work for all cases.

Signed-off-by: VinayBhaskar-V <vvarada@redhat.com>
qa/workunits/rbd/rbd_mirror_helpers.sh

index 2c2b0c7d6bcd8d853b8ee9f0cf6a041bc39062e9..84eeccf1cbbc6ded4bb77f8041f173c0ede86a94 100755 (executable)
@@ -806,7 +806,6 @@ wait_for_snapshot_sync_complete()
     local status_log=${TEMPDIR}/$(mkfname ${cluster}-${remote_pool}-${image}.status)
     local local_status_log=${TEMPDIR}/$(mkfname ${local_cluster}-${local_pool}-${image}.status)
 
-    mirror_image_snapshot "${cluster}" "${remote_pool}" "${image}"
     get_newest_mirror_snapshot "${cluster}" "${remote_pool}" "${image}" "${status_log}"
     local snapshot_id=$(xmlstarlet sel -t -v "//snapshot/id" < ${status_log})
 
@@ -836,6 +835,7 @@ wait_for_replay_complete()
     if [ "${RBD_MIRROR_MODE}" = "journal" ]; then
         wait_for_journal_replay_complete ${local_cluster} ${cluster} ${local_pool} ${remote_pool} ${image}
     elif [ "${RBD_MIRROR_MODE}" = "snapshot" ]; then
+        mirror_image_snapshot "${cluster}" "${remote_pool}" "${image}"
         wait_for_snapshot_sync_complete ${local_cluster} ${cluster} ${local_pool} ${remote_pool} ${image}
     else
         return 1