]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: address group_snap_set() failures
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Fri, 21 Mar 2025 14:00:09 +0000 (19:30 +0530)
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 24 Apr 2025 15:56:36 +0000 (21:26 +0530)
commit2c3593cd6e9f4846dfcb9ecfe98f65af468f8752
treeba84dcbd7c45a7fad67bb82b3117884533e7c842
parent6de2342987f7b42abd6e55bf7aaf90c8b6d20d48
rbd-mirror: address group_snap_set() failures

There are 5 places where we call group_snap_set()

1. create_mirror_snapshot()
2. create_regular_snapshot()
3. mirror_snapshot_complete()
4. regular_snapshot_complete() and
5. remove_mirror_peer_uuid()

For 1 & 2 cases, we can simply delete the so far created group snapshot
in the respective callback handler which is basically an empty INCOMPLETE
group snapshot and let the state machine recreate it again later.

For 3 & 4 cases, we are cannot delete the created snapshot, because the
image snapshots whould have synced/syncing by now, deleting the group
snapshot will bring additional comlications (if there is a failover at
the same time). Hence setting m_retry_validate_snap flag in this case,
this would all the rescan even for regular group snapshots, if the
snapshot is yet INCOMPLETE on disk the validate_image_snaps_sync_complete()
will be called again.

For case 5, added logic to retry remove_mirror_peer_uuid() again.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
src/tools/rbd_mirror/group_replayer/Replayer.cc
src/tools/rbd_mirror/group_replayer/Replayer.h