]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: fix HeartbeatInfo.is_healthy() check
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 8 Jan 2018 07:02:58 +0000 (15:02 +0800)
committerDavid Zafman <dzafman@redhat.com>
Fri, 18 Oct 2019 17:44:33 +0000 (10:44 -0700)
Delay to declared to be healthy until we have received the first
replies from both front and back connections.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit d9123158d1fef329fb9bf5ff787f9c84bb51b44c)

src/osd/OSD.h

index 115d1804992cc8613cb6c283d781fe1d445dd5eb..f1b605f4b11176feba645cdfecfd5e403a2aa1cc 100644 (file)
@@ -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);
     }
   };