mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
mds: accept stray reconnects
Hmm. Ultimately this is the direction we want to go, so that, for example, a client that is forcefully disconnected can at least attempt a reconnect (even if all its caps go ESTALE). There are undoubtably some issues that need to be dealt with to keep the mds from choking on weird client data, but those things need to be fixed regardless.
This commit is contained in:
parent
265ad9ece4
commit
0f11eee59e
@ -470,6 +470,7 @@ void Server::reconnect_clients()
|
||||
|
||||
reconnect_start = g_clock.now();
|
||||
dout(1) << "reconnect_clients -- " << client_reconnect_gather.size() << " sessions" << dendl;
|
||||
mds->sessionmap.dump();
|
||||
}
|
||||
|
||||
void Server::handle_client_reconnect(MClientReconnect *m)
|
||||
@ -520,7 +521,19 @@ void Server::handle_client_reconnect(MClientReconnect *m)
|
||||
mdlog->flush();
|
||||
} else {
|
||||
|
||||
ss << "reconnect by " << session->inst << " after " << delay;
|
||||
if (session->is_new()) {
|
||||
dout(10) << " session is new, will make best effort to reconnect "
|
||||
<< m->get_source_inst() << dendl;
|
||||
mds->sessionmap.set_state(session, Session::STATE_OPENING);
|
||||
version_t pv = ++mds->sessionmap.projected;
|
||||
__u64 sseq = session->get_state_seq();
|
||||
mdlog->start_submit_entry(new ESession(session->inst, true, pv),
|
||||
new C_MDS_session_finish(mds, session, sseq, true, pv));
|
||||
mdlog->flush();
|
||||
ss << "reconnect by new " << session->inst << " after " << delay;
|
||||
} else {
|
||||
ss << "reconnect by " << session->inst << " after " << delay;
|
||||
}
|
||||
mds->logclient.log(LOG_DEBUG, ss);
|
||||
|
||||
// snaprealms
|
||||
|
Loading…
Reference in New Issue
Block a user