When schedule_tick is called for the first time (in init) we are
still not in hunting mode so mon_client_ping_interval and
mon_client_log_interval were used to schedule the tick.
Fixes: https://tracker.ceph.com/issues/46445
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit
d86b389a51e870c1aa5182a93095f5efb12e41e4)
Conflicts:
src/mon/MonClient.cc
void MonClient::schedule_tick()
{
auto do_tick = make_lambda_context([this]() { tick(); });
- if (_hunting()) {
+ if (!is_connected()) {
+ // start another round of hunting
const auto hunt_interval = (cct->_conf->mon_client_hunt_interval *
reopen_interval_multiplier);
timer.add_event_after(hunt_interval, do_tick);
} else {
+ // keep in touch
timer.add_event_after(cct->_conf->mon_client_ping_interval, do_tick);
}
}