]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs: fix mount point break off problem after mds switch occured 14267/head
authorYunfeiGuan <yunfei.guan@xtaotech.com>
Mon, 10 Apr 2017 05:48:47 +0000 (05:48 +0000)
committerYunfeiGuan <yunfei.guan@xtaotech.com>
Mon, 10 Apr 2017 05:48:47 +0000 (05:48 +0000)
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 <yunfei.guan@xtaotech.com>
src/mds/Server.cc

index 470b36f949ca1f4a9c425cae91b14b485ccfdb2a..0fcee574eebadcdb327cce4eddf06ef56dced81a 100644 (file)
@@ -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