From c9ced60275473ccc8f25bc38524a6cffea1b244b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 15 Mar 2019 16:01:12 +0800 Subject: [PATCH] crimson/osd: cancel timers before restart otherwise we will rearm already-armed timer when booting up OSD again. Signed-off-by: Kefu Chai --- src/crimson/osd/osd.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 20f66b26b53..8d2e4e5ed04 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -613,6 +613,8 @@ bool OSD::should_restart() const seastar::future<> OSD::restart() { + beacon_timer.cancel(); + heartbeat_timer.cancel(); up_epoch = 0; bind_epoch = osdmap->get_epoch(); // TODO: promote to shutdown if being marked down for multiple times -- 2.39.5