.set_description("Filesystem path to the ceph-mgr data directory, used to "
"contain keyring."),
- Option("mgr_tick_period", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+ Option("mgr_tick_period", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
.set_default(2)
.add_service("mgr")
.set_description("Period in seconds of beacon messages to monitor"),
.set_description("Period in seconds between monitor-to-manager "
"health/status updates"),
- Option("mon_mgr_beacon_grace", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+ Option("mon_mgr_beacon_grace", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
.set_default(30)
.add_service("mon")
.set_description("Period in seconds from last beacon to monitor marking "
active_mgr->tick();
}
- timer.add_event_after(g_conf->get_val<int64_t>("mgr_tick_period"),
+ timer.add_event_after(
+ g_conf->get_val<std::chrono::seconds>("mgr_tick_period").count(),
new FunctionContext([this](int r){
tick();
}
const auto now = ceph::coarse_mono_clock::now();
- const auto mgr_beacon_grace = std::chrono::seconds(
- g_conf->get_val<int64_t>("mon_mgr_beacon_grace"));
+ const auto mgr_beacon_grace =
+ g_conf->get_val<std::chrono::seconds>("mon_mgr_beacon_grace");
// Note that this is the mgr daemon's tick period, not ours (the
// beacon is sent with this period).
- const auto mgr_tick_period = std::chrono::seconds(
- g_conf->get_val<int64_t>("mgr_tick_period"));
+ const auto mgr_tick_period =
+ g_conf->get_val<std::chrono::seconds>("mgr_tick_period");
if (last_tick != ceph::coarse_mono_clock::time_point::min()
&& (now - last_tick > (mgr_beacon_grace - mgr_tick_period))) {