diff --git a/src/common/config_opts.h b/src/common/config_opts.h index f693913bf99..7bfe8c0864a 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1685,8 +1685,8 @@ OPTION(rgw_swift_versioning_enabled, OPT_BOOL, false) // whether swift object ve OPTION(mgr_module_path, OPT_STR, CEPH_PKGLIBDIR "/mgr") // where to load python modules from OPTION(mgr_modules, OPT_STR, "restful") // 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(mgr_tick_period, OPT_INT, 5) // How frequently to tick +OPTION(mgr_stats_period, OPT_INT, 5) // How frequently clients send stats OPTION(mgr_client_bytes, OPT_U64, 128*1048576) // bytes from clients OPTION(mgr_client_messages, OPT_U64, 512) // messages from clients OPTION(mgr_osd_bytes, OPT_U64, 512*1048576) // bytes from osds diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index bc946e41c18..d94e3fd6865 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -134,7 +134,7 @@ int MgrStandby::init() client.init(); timer.init(); - send_beacon(); + tick(); dout(4) << "Complete." << dendl; return 0; @@ -155,9 +155,15 @@ void MgrStandby::send_beacon() available); monc.send_mon_message(m); - timer.add_event_after(g_conf->mgr_beacon_period, new FunctionContext( +} + +void MgrStandby::tick() +{ + send_beacon(); + + timer.add_event_after(g_conf->mgr_tick_period, new FunctionContext( [this](int r){ - send_beacon(); + tick(); } )); } diff --git a/src/mgr/MgrStandby.h b/src/mgr/MgrStandby.h index 8698e92a7de..8c1c144e73f 100644 --- a/src/mgr/MgrStandby.h +++ b/src/mgr/MgrStandby.h @@ -59,6 +59,7 @@ protected: void handle_mgr_map(MMgrMap *m); void _update_log_config(); + void send_beacon(); public: MgrStandby(); @@ -75,7 +76,7 @@ public: void shutdown(); int main(vector args); void handle_signal(int signum); - void send_beacon(); + void tick(); }; #endif