The old trick of queuing a keepalive sequenced before auth does not work
when auth happens earlier in the process. Work around it.
Signed-off-by: Sage Weil <sage@redhat.com>
void MonConnection::start(epoch_t epoch,
const EntityName& entity_name)
{
+ auth_start = ceph_clock_now();
+
if (con->get_peer_addr().is_msgr2()) {
ldout(cct, 10) << __func__ << " opening mon connection" << dendl;
state = State::AUTHENTICATING;
if (auth_err >= 0) {
state = State::HAVE_SESSION;
}
+ con->set_last_keepalive_ack(auth_start);
return auth_err;
}
State state = State::NONE;
ConnectionRef con;
int auth_method = -1;
+ utime_t auth_start;
std::unique_ptr<AuthClientHandler> auth;
uint64_t global_id;