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
client.init();
timer.init();
- send_beacon();
+ tick();
dout(4) << "Complete." << dendl;
return 0;
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();
}
));
}
void handle_mgr_map(MMgrMap *m);
void _update_log_config();
+ void send_beacon();
public:
MgrStandby();
void shutdown();
int main(vector<const char *> args);
void handle_signal(int signum);
- void send_beacon();
+ void tick();
};
#endif