]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr: Make stats period configurable
authorliuchang0812 <liuchang0812@gmail.com>
Mon, 2 Jan 2017 07:53:03 +0000 (15:53 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Mon, 2 Jan 2017 07:53:03 +0000 (15:53 +0800)
Fixes: http://tracker.ceph.com/issues/17449
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
src/common/config_opts.h
src/mgr/DaemonServer.cc

index cbaa937d5630d64b7040dd869d43164c1b1a2910..8f6e62c21a200373b3b2ca11aefea7d12117770f 100644 (file)
@@ -1592,6 +1592,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(mgr_stats_period, OPT_INT, 5) // How frequently to send stats
 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
 
index 3b8def2f6e4f29e8fb0682c9cff5357c173a988a..57d115269cc42e1131792711d8daae7dee7345fd 100644 (file)
@@ -165,7 +165,7 @@ bool DaemonServer::handle_open(MMgrOpen *m)
           << m->daemon_name << dendl;
 
   auto configure = new MMgrConfigure();
-  configure->stats_period = 5;
+  configure->stats_period = g_conf->mgr_stats_period;
   m->get_connection()->send_message(configure);
 
   if (daemon_state.exists(key)) {