diff options
author | Kamoltat <ksirivad@redhat.com> | 2022-11-11 23:56:46 +0100 |
---|---|---|
committer | Kamoltat <ksirivad@redhat.com> | 2022-12-09 16:43:45 +0100 |
commit | 767a4be12d64c42f5857cf390bb1d868cab96c72 (patch) | |
tree | 0dc8d35db20cfdbcadcdea82257d86b9608d2ca3 /src/mon/Elector.h | |
parent | mon/Elector & ConnectionTracker: reset peer_tracker.rank (diff) | |
download | ceph-767a4be12d64c42f5857cf390bb1d868cab96c72.tar.xz ceph-767a4be12d64c42f5857cf390bb1d868cab96c72.zip |
mon: clear connection score during update & add sanity check live/dead connection report
When upgrading the monitors (include booting up),
we check if `peer_tracker` is dirty or not. If
so, we clear it. Added some functions in `Elector` and
`ConnectionTracker` class to
check for clean `peer_tracker`.
Moreover, there could be some cases where due
to startup weirdness or abnormal circumstances,
we might get a report from our own rank. Therefore,
it doesn't hurt to add a sanity check in
`ConnectionTracker::report_live_connection` and
`ConnectionTracker::report_dead_connection`.
Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
Diffstat (limited to 'src/mon/Elector.h')
-rw-r--r-- | src/mon/Elector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mon/Elector.h b/src/mon/Elector.h index 60afa5dd60c..be5eee5d4da 100644 --- a/src/mon/Elector.h +++ b/src/mon/Elector.h @@ -358,6 +358,11 @@ class Elector : public ElectionOwner, RankProvider { */ void start_participating(); /** + * Check if our peer_tracker is self-consistent, not suffering from + * https://tracker.ceph.com/issues/58049 + */ + bool peer_tracker_is_clean(); + /** * Forget everything about our peers. :( */ void notify_clear_peer_state(); |