From 5c1297faefdb2502fbadc0e5b608ca2208d7d1bf Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Thu, 6 Mar 2025 12:49:15 +0530 Subject: [PATCH] rbd-mirror: avoid stuck group on secondary The following steps leaves stale group on seondary left undeleted, 1. Create and mirror enable a group with 2 images. 2. Let it sync to the secondary 3. Demote on the primary and promote on the secondary 4. Wait until it starts replaying on the original primary 5. Delete the group on the new primary Credits to Nithya Balachandran for highlighting the issue with detailed steps. Signed-off-by: Prasanna Kumar Kalever --- src/tools/rbd_mirror/group_replayer/Replayer.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/rbd_mirror/group_replayer/Replayer.cc b/src/tools/rbd_mirror/group_replayer/Replayer.cc index 9f278dccf2b93..2b71f9c8ca2f4 100644 --- a/src/tools/rbd_mirror/group_replayer/Replayer.cc +++ b/src/tools/rbd_mirror/group_replayer/Replayer.cc @@ -307,7 +307,7 @@ void Replayer::handle_load_local_group_snapshots(int r) { if (r < 0) { derr << "error listing local mirror group snapshots: " << cpp_strerror(r) << dendl; - schedule_load_group_snapshots(); + notify_group_listener_stop(); return; } @@ -360,10 +360,10 @@ void Replayer::handle_load_remote_group_snapshots(int r) { } m_in_flight_op_tracker.finish_op(); - if (r < 0) { + if (r < 0) { // may be remote group is deleted? derr << "error listing remote mirror group snapshots: " << cpp_strerror(r) << dendl; - load_remote_group_snapshots(); + notify_group_listener_stop(); return; } -- 2.39.5