]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: MMonProbe: direct MMonJoin messages to the leader, instead of the first mon 41131/head
authorGreg Farnum <gfarnum@redhat.com>
Tue, 13 Apr 2021 22:53:03 +0000 (22:53 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Mon, 3 May 2021 23:05:33 +0000 (23:05 +0000)
commitaefbb7ef55ca683c4aa1efc582b9408f462251e8
tree929745a1a79cc90a4b3a8a6e9e735fe5a23ca2e8
parent2aa21499f766816c9ac3e7a971f42c22f1da7d9a
mon: MMonProbe: direct MMonJoin messages to the leader, instead of the first mon

When monitors are joining a cluster, they may send an MMonJoin message to place
themselves correctly in the map in either handle_probe_reply() or
finish_election(). These messages must be sent to the leader -- monitors do not
forward each other's messages.

Unfortunately, this scenario was missed when converting the monitors to support
connectivity-based elections, and they're sending these messages to
quorum.begin(). Fix this by including an explicit leader in MMonProbe (that the
new monitor may reference in handle_probe_reply) and using the leader
value in both locations.

Fixes: https://tracker.ceph.com/issues/50345
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit ffa7ff35b4bba48a737b5d81b5b12089dda0323f)

Fixes: https://tracker.ceph.com/issues/50406
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/messages/MMonProbe.h
src/mon/Monitor.cc