]> 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 40839/head
authorGreg Farnum <gfarnum@redhat.com>
Tue, 13 Apr 2021 22:53:03 +0000 (22:53 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Tue, 13 Apr 2021 23:29:39 +0000 (23:29 +0000)
commitffa7ff35b4bba48a737b5d81b5b12089dda0323f
treec186df85f867bc2b284e06832a96b39f56603e79
parent05861cabb2060a1070300f06b91d1a9b7a4f3016
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>
src/messages/MMonProbe.h
src/mon/Monitor.cc