]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/Elector.cc: Compress peer >= rank_size sanity check into send_peer_ping 49433/head
authorKamoltat <ksirivad@redhat.com>
Mon, 5 Dec 2022 18:46:11 +0000 (18:46 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 14 Dec 2022 17:06:26 +0000 (17:06 +0000)
commit88a94bb34fd5e49cc106c0816dd81f0eb95b7a1b
tree5b5d358d24f80f9340e3eaf5c6f094942519bbf6
parentf87280a7ef757aebe1842333fefb14f5a2e930d2
mon/Elector.cc: Compress peer >= rank_size sanity check into send_peer_ping

Problem:

Currently, https://github.com/ceph/ceph/pull/44993
failed to completely fix:

https://tracker.ceph.com/issues/50089

There are certain code paths such as

Elector::handle_ping → Elector::begin_peer_ping →
Elector::send_peer_ping.

that when a monitor is removed before shutdown in
Cephadm it can hit the assert failure.

Solution:

Therefore, we have to enforce sanity checks on
all code paths.

We do this by compressing the `peer >= rank_size`
sanity check into `send_peer_ping`. We also make
`send_peer_ping` return true/false

caller of `send_peer_ping` would drop itself if
recieves a `false`.

Fixes: https://tracker.ceph.com/issues/58155
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 27d499f8854fb5e73b103635ef227bbfdff3afb4)

Conflicts:
       src/mon/Elector.cc - change ssize() to size()
src/mon/Elector.cc
src/mon/Elector.h