From: xie xingguo Date: Mon, 8 Jan 2018 07:02:58 +0000 (+0800) Subject: osd/OSD: fix HeartbeatInfo.is_healthy() check X-Git-Tag: v13.2.7~26^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1de1b0502d1a665182f07eb3bce54fee99a6f325;p=ceph.git osd/OSD: fix HeartbeatInfo.is_healthy() check Delay to declared to be healthy until we have received the first replies from both front and back connections. Signed-off-by: xie xingguo (cherry picked from commit d9123158d1fef329fb9bf5ff787f9c84bb51b44c) --- diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 115d1804992c..f1b605f4b111 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1530,6 +1530,11 @@ private: } bool is_healthy(utime_t now) { + if (last_rx_front == utime_t() || last_rx_back == utime_t()) { + // only declare to be healthy until we have received the first + // replies from both front/back connections + return false; + } return !is_unhealthy(now); } };