]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
qa/workunits/rbd: add a test for force promote with a user snapshot
authorIlya Dryomov <idryomov@gmail.com>
Thu, 20 Feb 2025 15:38:41 +0000 (16:38 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 24 Feb 2025 12:46:15 +0000 (13:46 +0100)
commit0f4a37dd9f28070d0d421379385a5f2912cc9627
tree204caa2de838d818de2a4871d62e361d39ea5b6d
parentfe55a0d30ad390005f2f4eee8755e22921901256
qa/workunits/rbd: add a test for force promote with a user snapshot

Add a reproducer for the crash on a bad variant access which was fixed
in commit 7d75161051da ("librbd: fix a crash in get_rollback_snap_id").

The reproducer deliberately works around many other issues with force
promote in snapshot-based mirroring: stopping rbd-mirror daemon
shouldn't be necessary (let alone with SIGKILL), get_rollback_snap_id()
and its caller can_create_primary_snapshot() are flawed and can pick
the wrong snapshot to roll back to or skip rollback when it's actually
required, the user snapshot in this scenario should be removed as part
of force promoting because it's incomplete and won't be usable after
the image is promoted, etc.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/workunits/rbd/rbd_mirror.sh
qa/workunits/rbd/rbd_mirror_helpers.sh