]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs: fix mount point break off problem after mds switch occured 16100/head
authorYunfeiGuan <yunfei.guan@xtaotech.com>
Mon, 10 Apr 2017 05:48:47 +0000 (05:48 +0000)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 Jul 2017 10:35:46 +0000 (12:35 +0200)
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>
(cherry picked from commit 4ef830c5d6f22bf0d4f82a8624c772ecbbda44a6)

src/mds/Server.cc

index 0ae9377ce7408d18f2819992d6f97a9ba7a6fed4..f3d281ac17125e48cf8019cc7df8b5986881a6ab 100644 (file)
@@ -798,6 +798,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