]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: log evicted clients to clog/dbg
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 12 Dec 2018 23:33:35 +0000 (15:33 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 13 Dec 2018 00:48:57 +0000 (16:48 -0800)
Fixes: http://tracker.ceph.com/issues/37639
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/MDSRank.cc

index 72c2b266e99fc6585acd64e9195257528f9359e1..02283fe1ec511bd562c43553c7ea612d7d49c2da 100644 (file)
@@ -3192,11 +3192,21 @@ bool MDSRank::evict_client(int64_t session_id,
     return false;
   }
 
+  auto& addr = session->info.inst.addr;
+  {
+    CachedStackStringStream _ss;
+    auto& ss = _ss.get_stream();
+    ss << "Evicting " << (blacklist ? "(and blacklisting) " : "")
+       << "client session " << session_id << " (" << addr << ")";
+    dout(1) << ss.strv() << dendl;
+    clog->info() << ss.strv();
+  }
+
   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};