]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa/workunits/rbd: add a test for force promote with a user snapshot 62044/head
authorIlya Dryomov <idryomov@gmail.com>
Thu, 20 Feb 2025 15:38:41 +0000 (16:38 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 28 Feb 2025 21:26:48 +0000 (22:26 +0100)
commiteea8f9f0ea86f81c055f170d0c1ad9caf32230cc
treea1b3ac23302cea0a7c1b495bd0db2c4f6e6b1312
parent2b0ffb18a6417449c3a6f87095fb93733be054be
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>
(cherry picked from commit 0f4a37dd9f28070d0d421379385a5f2912cc9627)

Conflicts:
qa/workunits/rbd/rbd_mirror.sh [ commit 3fdbc160bb21
  ("rbd-mirror: allow mirroring to a different namespace") not
  in squid ]
qa/workunits/rbd/rbd_mirror.sh
qa/workunits/rbd/rbd_mirror_helpers.sh