]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/mirror: remove peer UUID of group snapshot before attempting removal
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 4 Sep 2025 16:26:15 +0000 (21:56 +0530)
committerIlya Dryomov <idryomov@redhat.com>
Fri, 19 Sep 2025 22:01:18 +0000 (00:01 +0200)
commit28ac649c31bd37cbef86dc2e70d3c18a3063f01a
tree82c3f7c5afcc50c64226e77b7c22f9c07436695d
parent7f3f7f139f47c284afea4ec98af379e6c20e4509
librbd/mirror: remove peer UUID of group snapshot before attempting removal

Problem:
When the number of snapshots exceeds the configured limit
(rbd_mirroring_max_mirroring_snapshots), the cleanup process remove the last
group snapshot on the primary. If this removal fails partially, the
group snapshot with some or empty image snap may still remain.

As a result:
* The snapshot is incorrectly considered for synchronization to the secondary.
* The secondary snapshot can remain forever in the incomplete state, leading
  to stuck of daemon progress.

Solution:
Before attempting to remove the group snapshot:
* Explicitly remove the peer UUID associated with the snapshot.
* This ensures that the snapshot is no longer considered eligible for
  synchronization.
* Even if the actual snapshot deletion fails partially, the snapshot is not
  tried for mirroring, avoiding daemon stalls or inconsistencies.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Resolves: rhbz#2392398
src/librbd/mirror/snapshot/GroupUnlinkPeerRequest.cc
src/librbd/mirror/snapshot/GroupUnlinkPeerRequest.h