]> 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>
Fri, 28 Feb 2025 19:47:57 +0000 (20:47 +0100)
commit5555ae2b27448d1fda817c5091729d00b488135f
tree6aa69f9a27152e1bd93eb93659e39464dc3378a0
parent0ca05d740d05877564e217d592e7a823b57d0be6
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_journal.sh [ commits 3fd8a0388735
  ("qa/workunits/rbd: merge journal and snapshot test scripts")
  and 3fdbc160bb21 ("rbd-mirror: allow mirroring to a different
  namespace") not in reef ]
qa/workunits/rbd/rbd_mirror_snapshot.sh [ duplicated/cloned for
  snapshot-based mirroring ]
qa/workunits/rbd/rbd_mirror_helpers.sh
qa/workunits/rbd/rbd_mirror_journal.sh
qa/workunits/rbd/rbd_mirror_snapshot.sh