]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not reply to ping if internal heartbeat is not healthy
authorSage Weil <sage@inktank.com>
Wed, 23 Jan 2013 01:56:32 +0000 (17:56 -0800)
committerSage Weil <sage@inktank.com>
Wed, 23 Jan 2013 01:56:32 +0000 (17:56 -0800)
If we find that our internal threads are stalled, do not reply to ping
requests.  If we do this long enough, peers will mark us down.  If we are
only transiently unhealthy, we will reply to the next ping and they will
be satisfied.  If we are unhealthy and marked down, and eventually recover,
we will mark ourselves back up.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc

index a17fec0fea88e086b9a96918bf2eb2961e0248b2..c6b00aa660a25abfbb5d32243bad9e345599da1d 100644 (file)
@@ -2057,6 +2057,12 @@ void OSD::handle_osd_ping(MOSDPing *m)
          break;
        }
       }
+
+      if (!g_ceph_context->get_heartbeat_map()->is_healthy()) {
+       dout(10) << "internal heartbeat not healthy, dropping ping request" << dendl;
+       break;
+      }
+
       Message *r = new MOSDPing(monc->get_fsid(),
                                curmap->get_epoch(),
                                MOSDPing::PING_REPLY,