From 576779bbeb7f7257f4c59d8cbb5df555ee0e566b Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Fri, 11 May 2018 14:55:12 +0800 Subject: [PATCH] mds: reply session reject for open request from blacklisted client Kernel client and old version libcephfs do not check if themselves are blacklisted. They can be stuck at opening session after getting blacklisted. The session reject message can avoid this. Signed-off-by: "Yan, Zheng" Fixes: https://tracker.ceph.com/issues/24054 (cherry picked from commit b7c6cd8a54f094acb58603b8c6bae9e570a73e27) --- src/mds/Server.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index d68f863c87258..a8af66f77b21c 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -359,7 +359,8 @@ void Server::handle_client_session(MClientSession *m) }); if (blacklisted) { - dout(10) << "ignoring blacklisted client " << session->info.inst.addr << dendl; + dout(10) << "rejecting blacklisted client " << session->info.inst.addr << dendl; + mds->send_message_client(new MClientSession(CEPH_SESSION_REJECT), session); m->put(); return; } -- 2.39.5