]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/MgrMonitor: make period of sending digests configurable
authorxie xingguo <xie.xingguo@zte.com.cn>
Sun, 9 Oct 2016 02:52:09 +0000 (10:52 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 17 Oct 2016 13:00:08 +0000 (21:00 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/common/config_opts.h
src/mon/MgrMonitor.cc

index 7043b6321a8d48fd4a93137569c6c5eb0f094fa1..75aa3b0b64ae80c70f579c8a1b9ddf8a3813e4c4 100644 (file)
@@ -1514,6 +1514,7 @@ OPTION(mgr_module_path, OPT_STR, CEPH_PKGLIBDIR "/mgr") // where to load python
 OPTION(mgr_modules, OPT_STR, "rest")  // Which modules to load
 OPTION(mgr_data, OPT_STR, "/var/lib/ceph/mgr/$cluster-$id") // where to find keyring etc
 OPTION(mgr_beacon_period, OPT_INT, 5)  // How frequently to send beacon
+OPTION(mon_mgr_digest_period, OPT_INT, 5)  // How frequently to send digests
 OPTION(mon_mgr_beacon_grace, OPT_INT, 30)  // How long to wait to failover
 
 OPTION(rgw_list_bucket_min_readahead, OPT_INT, 1000) // minimum number of entries to read from rados for bucket listing
index d6a3a9acac946ee558665072049ab3f43393d893..8864f327a3c7ac80dbaa67a148002c7fc684522c 100644 (file)
@@ -271,7 +271,7 @@ void MgrMonitor::send_digests()
   digest_callback = new C_StdFunction([this](){
       send_digests();
   });
-  mon->timer.add_event_after(5, digest_callback);
+  mon->timer.add_event_after(g_conf->mon_mgr_digest_period, digest_callback);
 }
 
 void MgrMonitor::tick()