]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add " (blacklisted)" to session reject error string 37072/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 9 Sep 2020 19:10:06 +0000 (19:10 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 14 Sep 2020 21:14:04 +0000 (23:14 +0200)
Commit dfd01d765304 ("blacklist -> blocklist") introduced a
regression for recover_session=clean mode of the kernel client.
Unfortunately, one of the ways it detects blocklisting is by
parsing the error string in the session reject message:

3320                 if (err_str && strnstr(*p, "blacklisted", len))
3321                         *blacklisted = true;

Add a suitable substring to restore the functionality.  ceph-fuse
doesn't care, as it just logs this string.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/mds/Server.cc

index 515f96bbeba63a5aa504b08a50ce73774b65d136..7950d35f96d367aab2f673fe866ba176803fa204 100644 (file)
@@ -598,7 +598,12 @@ void Server::handle_client_session(const cref_t<MClientSession> &m)
 
       if (blocklisted) {
        dout(10) << "rejecting blocklisted client " << addr << dendl;
-       send_reject_message("blocklisted");
+       // This goes on the wire and the "blacklisted" substring is
+       // depended upon by the kernel client for detecting whether it
+       // has been blocklisted.  If mounted with recover_session=clean
+       // (since 5.4), it tries to automatically recover itself from
+       // blocklisting.
+       send_reject_message("blocklisted (blacklisted)");
        session->clear();
        break;
       }