]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/Monitor.cc: notify_new_monmap() skips removal of non-exist rank 49312/head
authorKamoltat <ksirivad@redhat.com>
Wed, 14 Dec 2022 19:54:00 +0000 (19:54 +0000)
committerKamoltat <ksirivad@redhat.com>
Mon, 26 Dec 2022 05:13:20 +0000 (05:13 +0000)
commitb3d10b35fcc62152b7b4b31cfa54f67f71430bb0
tree59b923e13c3eb427c5a6c9995fabb5bf84dea379
parentaaf1d6b49f3aa334357ed6c41a60343500129aa5
mon/Monitor.cc: notify_new_monmap() skips removal of non-exist rank

Problem:
In RHCS the user can choose to manually remove a monitor rank
before shutting the monitor down. Causing inconsistency in monmap.
for example we remove mon.a from the monmap, there is a short period
where mon.a is still operational and will try to remove itself from
monmap but we will run into an assertion in
ConnectionTracker::notify_ranks_removed().

Solution:
In Monitor::notify_new_monmap() we prevent the func
from going into removing our own rank, or
ranks that doesn't exists in monmap.

FYI: this is an RHCS problem only, in ODF,
we never remove a monitor from monmap
before shutting it down.

Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 924e7ec92bbaa6efd0ef816c1cb101ff7972616c)
src/mon/Monitor.cc