From: Jason Dillaman Date: Fri, 22 Feb 2019 18:52:43 +0000 (-0500) Subject: rbd-mirror: failure to initialize pool replayer should stop leader X-Git-Tag: v14.1.1~114^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3723d44fa83f38572bf7587e1111005c8ba6ed69;p=ceph-ci.git rbd-mirror: failure to initialize pool replayer should stop leader The leader watcher should not start processing requests if it failed to initialize. Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/LeaderWatcher.cc b/src/tools/rbd_mirror/LeaderWatcher.cc index d1386ba746f..f3291bc6096 100644 --- a/src/tools/rbd_mirror/LeaderWatcher.cc +++ b/src/tools/rbd_mirror/LeaderWatcher.cc @@ -902,8 +902,10 @@ void LeaderWatcher::handle_notify_lock_acquired(int r) { ceph_assert(m_on_finish != nullptr); std::swap(m_on_finish, on_finish); - // listener should be ready for instance add/remove events now - m_instances->unblock_listener(); + if (m_ret_val == 0) { + // listener should be ready for instance add/remove events now + m_instances->unblock_listener(); + } } on_finish->complete(0); }