]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/MgrStatMonitor: ignore MMgrReport from non-active mgr 40310/head
authorSage Weil <sage@newdream.net>
Thu, 18 Mar 2021 16:45:48 +0000 (11:45 -0500)
committerNeha Ojha <nojha@redhat.com>
Mon, 22 Mar 2021 14:35:44 +0000 (14:35 +0000)
commitdecee90d40300d92f83999d3068bde2587ea586f
tree068b5fa15bb5c8c86d0eea46a30dd223e6eb5bd4
parentf6c897dacb8963498c10d80c18f2cff725f8466d
mon/MgrStatMonitor: ignore MMgrReport from non-active mgr

If it's not the active mgr, we should ignore it.

Since the mgr instance is best identified by the gid, add that to the
message.  (We can't use the source_addrs for the message since that is
the MgrStandby monc addr, not the active mgr addrs in the MgrMap.)

This fixes a problem where a just-demoted mgr report gets processed and a
new mgr gets a ServiceMap with an epoch >= its pending map.  (At least,
that is my theory!)

Fixes: https://tracker.ceph.com/issues/48022
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 4d447092c3542bf57dfb4942db766adf2923c069)
src/messages/MMonMgrReport.h
src/mgr/DaemonServer.cc
src/mon/MgrStatMonitor.cc