]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: reply session reject for open request from blacklisted client
authorYan, Zheng <zyan@redhat.com>
Fri, 11 May 2018 06:55:12 +0000 (14:55 +0800)
committerYan, Zheng <zyan@redhat.com>
Sat, 19 May 2018 09:05:49 +0000 (17:05 +0800)
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" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/24054
src/mds/Server.cc

index cba7408d07def957e348087713bc94bdbf7d6147..8db5036793dfee3e43c49680fbafa1245b073950 100644 (file)
@@ -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;
     }