]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: create heartbeat grace config option 25889/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 17 Dec 2018 16:34:00 +0000 (08:34 -0800)
committerPrashant D <pdhange@redhat.com>
Thu, 10 Jan 2019 03:48:31 +0000 (22:48 -0500)
Currently the MDS uses the mds_beacon_grace for the heartbeat timeout. If we
need to increase the beacon grace because the MDS is missing beacon replies for
some reason, we still want to see the warnings when the MDS is missing
heartbeats.

Fixes: http://tracker.ceph.com/issues/37674
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 5c143f3039c1967ca83d8a0cce35bf2a12509aef)

Conflicts:
src/mds/MDSRank.cc : Resolved in heartbeat_reset

src/common/options.cc
src/mds/MDSRank.cc

index 05eb0cbef997eb12fddbf9f804807933c7483f06..b8adae94187b85c9722b7a1c7fa11f4da54011b2 100644 (file)
@@ -6110,6 +6110,10 @@ std::vector<Option> get_mds_options() {
     .set_default(15)
     .set_description(""),
 
+    Option("mds_heartbeat_grace", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
+    .set_default(15)
+    .set_description("tolerance in seconds for MDS internal heartbeat"),
+
     Option("mds_enforce_unique_name", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
     .set_default(true)
     .set_description(""),
index b74a8db91660deca1f8a39c669f662808e831124..6b3666bb9407318c66d658380a8ca70946c941c4 100644 (file)
@@ -1205,7 +1205,8 @@ void MDSRank::heartbeat_reset()
   // NB not enabling suicide grace, because the mon takes care of killing us
   // (by blacklisting us) when we fail to send beacons, and it's simpler to
   // only have one way of dying.
-  g_ceph_context->get_heartbeat_map()->reset_timeout(hb, g_conf->mds_beacon_grace, 0);
+  auto grace = g_conf->get_val<double>("mds_heartbeat_grace");
+  g_ceph_context->get_heartbeat_map()->reset_timeout(hb, grace, 0);
 }
 
 bool MDSRank::is_stale_message(Message *m) const