From 93e81a87ac99080a8670b7485dc9c8c801477518 Mon Sep 17 00:00:00 2001 From: YunfeiGuan Date: Mon, 10 Apr 2017 05:48:47 +0000 Subject: [PATCH] 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 (cherry picked from commit 4ef830c5d6f22bf0d4f82a8624c772ecbbda44a6) --- src/mds/Server.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 0ae9377ce7408..f3d281ac17125 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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 -- 2.39.5