]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/Elector.cc: Compress peer >= rank_size sanity check into send_peer_ping
authorKamoltat <ksirivad@redhat.com>
Mon, 5 Dec 2022 18:46:11 +0000 (18:46 +0000)
committerKamoltat <ksirivad@redhat.com>
Thu, 15 Dec 2022 22:11:15 +0000 (22:11 +0000)
commitf4bda36a60223d36e2ca6ef29d81d98ff72ec3f6
tree09ac3fa69ce21af8729edd65518ddfe5e6a5eba4
parent4aa8af29aec32c3378bc796e7b1fd2170f41df8f
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>
src/mon/Elector.cc
src/mon/Elector.h