]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd-mirror: allow incomplete group demote snapshot to sync after rbd-mirror daemon...
authorVinayBhaskar-V <vvarada@redhat.com>
Wed, 15 Oct 2025 10:37:40 +0000 (16:07 +0530)
committerIlya Dryomov <idryomov@redhat.com>
Sat, 22 Nov 2025 16:46:48 +0000 (17:46 +0100)
commiteb41cc13ca4dc8e08bddc9e86b3f76ec933b7e4a
tree8f91da57a332f15a6d1f6b614def703f579b36fb
parent42846fdb1085a1a5bc0789bf477237fbbb86c9fd
rbd-mirror: allow incomplete group demote snapshot to sync after rbd-mirror daemon restart

Currently when the secondary daemon was killed while the group demote snapshot was in incomplete state on secondary,
the promotion state was set to PROMOTION_STATE_ORPHAN upon restart. This state prevents the incomplete
demote snapshot sync after restart as bootstrap on secondary fails. In this commit we fix this by assigning
promotion state to PROMOTION_STATE_NON_PRIMARY for a group with an incomplete non-primary demote snapshot.

The downside is that if the group is removed on the primary cluster, then after restart of
rbd-mirror daemon on secondary cluster, the corresponding group on the secondary also gets removed.
This is because deletion propagation is unconditionally enabled precisely for PROMOTION_STATE_NON_PRIMARY
and this is okay since the user would have deleted the primary demoted group forcefully.

Signed-off-by: VinayBhaskar-V <vvarada@redhat.com>
Resolves: rhbz#2416554
qa/workunits/rbd/rbd_mirror_group_simple.sh
src/librbd/mirror/GroupGetInfoRequest.cc