]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: clear connection score during update & add sanity check live/dead connection...
authorKamoltat <ksirivad@redhat.com>
Fri, 11 Nov 2022 22:56:46 +0000 (22:56 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 21 Dec 2022 21:57:18 +0000 (21:57 +0000)
commit56ad07d0a1dc8650921218730b738d8bfca6f80a
tree4afc6ea05bee44a38443b137bb9fb1295c3a936d
parent21537564202a767f6f1a80ccf0b4633aa20f9540
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>
(cherry picked from commit 25ce77c7984587f457eba9bd06e416ef06f4e1c7)
src/mon/ConnectionTracker.cc
src/mon/ConnectionTracker.h
src/mon/Elector.cc
src/mon/Elector.h
src/mon/Monitor.cc