Merge pull request #12732 from Liuchang0812/wip-issue-17449

mgr: Make stats period configurable

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2017-01-04 17:57:34 +08:00 committed by GitHub
commit bb70beb603
2 changed files with 2 additions and 1 deletions

View 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

View 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)) {