]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: log evicted clients to clog/dbg 25857/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 12 Dec 2018 23:33:35 +0000 (15:33 -0800)
committerAshish Singh <assingh@redhat.com>
Tue, 22 Jan 2019 10:44:02 +0000 (16:14 +0530)
Fixes: http://tracker.ceph.com/issues/37639
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 7a81421453f76c6a67f28f749f1489737f7b58c5)

Conflicts:
src/mds/MDSRank.cc
  - Used 'std::stringstream' instead of 'CachedStackStringStream'
    and repllaced the 'ss.strv()' to 'ss.str()'.

src/mds/MDSRank.cc

index 9ef53b14f5002869f33ddcd5f1548b30c6eed792..cfc201ec5c8d6895065bec24d57c388cbc938a4a 100644 (file)
@@ -3203,11 +3203,20 @@ bool MDSRank::evict_client(int64_t session_id,
     return false;
   }
 
+  auto& addr = session->info.inst.addr;
+  {
+    std::stringstream ss;
+    ss << "Evicting " << (blacklist ? "(and blacklisting) " : "")
+       << "client session " << session_id << " (" << addr << ")";
+    dout(1) << ss.str() << dendl;
+    clog->info() << ss.str();
+  }
+
   dout(4) << "Preparing blacklist command... (wait=" << wait << ")" << dendl;
   stringstream ss;
   ss << "{\"prefix\":\"osd blacklist\", \"blacklistop\":\"add\",";
   ss << "\"addr\":\"";
-  ss << session->info.inst.addr;
+  ss << addr;
   ss << "\"}";
   std::string tmp = ss.str();
   std::vector<std::string> cmd = {tmp};