]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: create heartbeat grace config option 25593/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 17 Dec 2018 16:34:00 +0000 (08:34 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 17 Dec 2018 16:34:00 +0000 (08:34 -0800)
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>
src/common/options.cc
src/mds/MDSRank.cc

index c3c1364c399ffdd713b5d35bac83ff3a4d74d9aa..9249b55ff1d2ff601764f81a8fb59ff1e41f7dff 100644 (file)
@@ -6958,6 +6958,10 @@ std::vector<Option> get_mds_options() {
     .set_default(15)
     .set_description("tolerance in seconds for missed MDS beacons to monitors"),
 
+    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("require MDS name is unique in the cluster"),
index 63c0d33619ef3c2e7c929051da09a671ee6cbb78..be6940a8abd7afcf5a4bcb2461c5ea76598c1e25 100644 (file)
@@ -1240,7 +1240,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(const Message::const_ref &m) const