]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/Elector & ConnectionTracker: reset peer_tracker.rank
authorKamoltat <ksirivad@redhat.com>
Fri, 4 Nov 2022 02:02:49 +0000 (02:02 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 21 Dec 2022 21:57:18 +0000 (21:57 +0000)
commit21537564202a767f6f1a80ccf0b4633aa20f9540
tree16fcab784912eedf65afa4ba25784c5384eb05a1
parentf71b8bb8c2481bc43c12feacc9374028a78cde5c
mon/Elector & ConnectionTracker: reset peer_tracker.rank

In `notify_clear_peer_state()` we another
mechanism in reseting our `peer_tracker.rank`
to match our own monitor.rank.

This is added so there is a way for us
to recover from a scenrio where `peer_tracker.rank`
is messed up from adjusting the ranks or removing
ranks.

`notifiy_clear_peer_state()` can be triggered
by using the command:

`ceph connection scores reset`

Also in `clear_peer_reports`, besides
reassigning my_reports to an empty object,
we also have to make `my_reports` = `rank`
from `peer_tracker`, such that we don't get
-1 as a rank in my_reports.

Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 55cf717a3070d10b6b02af33a66d6ad0acbba0f6)
src/mon/ConnectionTracker.h
src/mon/Elector.cc