From: YunfeiGuan Date: Mon, 10 Apr 2017 05:48:47 +0000 (+0000) Subject: cephfs: fix mount point break off problem after mds switch occured X-Git-Tag: v12.0.2~57^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4ef830c5d6f22bf0d4f82a8624c772ecbbda44a6;p=ceph.git cephfs: fix mount point break off problem after mds switch occured The hot-standby become active as we expected but the mount piont broken strangely when the active mds is down. The root reason is the new mds use last_cap_renews decoded from ESesson::replay in find_idle_sessions and wrongly killed the session. Maybe we should reset session->last_cap_renew to the current time when server send OPEN to client in reconnect stage. Fixes: http://tracker.ceph.com/issues/19437 Signed-off-by: Guan yunfei --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 470b36f949ca..0fcee574eeba 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -801,6 +801,7 @@ void Server::handle_client_reconnect(MClientReconnect *m) // notify client of success with an OPEN m->get_connection()->send_message(new MClientSession(CEPH_SESSION_OPEN)); + session->last_cap_renew = ceph_clock_now(); mds->clog->debug() << "reconnect by " << session->info.inst << " after " << delay; // snaprealms