diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2024-04-24 12:45:27 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2024-05-05 21:11:54 +0200 |
commit | b7e79642d53c1802ae1202c3f013677fcfd26b1b (patch) | |
tree | 2825d5b3a2108036694c6a3df6b92a3d711993c9 /src/tools | |
parent | rbd-mirror: shut down and remove pool replayer if peer changes (diff) | |
download | ceph-b7e79642d53c1802ae1202c3f013677fcfd26b1b.tar.xz ceph-b7e79642d53c1802ae1202c3f013677fcfd26b1b.zip |
rbd-mirror: remove callout when destroying pool replayer
If a pool replayer is removed in an error state (e.g. after failing to
connect to the remote cluster), its callout should be removed as well.
Otherwise, the error would persist causing "daemon health: ERROR"
status to be reported even after a new pool replayer is created and
started successfully.
Fixes: https://tracker.ceph.com/issues/65487
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/rbd_mirror/PoolReplayer.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/rbd_mirror/PoolReplayer.cc b/src/tools/rbd_mirror/PoolReplayer.cc index 81292ba07e2..cb88e6e96f7 100644 --- a/src/tools/rbd_mirror/PoolReplayer.cc +++ b/src/tools/rbd_mirror/PoolReplayer.cc @@ -245,6 +245,13 @@ PoolReplayer<I>::~PoolReplayer() { shut_down(); + // pool replayer instances are generally (unless the peer gets + // updated) preserved across errors to reduce ping-ponging of callout + // error notifications, so this can't be done in shut_down() + if (m_callout_id != service_daemon::CALLOUT_ID_NONE) { + m_service_daemon->remove_callout(m_local_pool_id, m_callout_id); + } + ceph_assert(m_asok_hook == nullptr); } |