From: Patrick Donnelly Date: Tue, 5 Sep 2017 21:44:49 +0000 (-0700) Subject: mds: reset Formatter on error X-Git-Tag: v12.2.1~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17870%2Fhead;p=ceph.git mds: reset Formatter on error This prevents partial results from concatenating with the error message. Fixes: http://tracker.ceph.com/issues/21252 Signed-off-by: Patrick Donnelly (cherry picked from commit 2b2b3d2035a700a65c3c469eedae69ad31023cf6) --- diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 5b0d76d82cf..77f1819788f 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -1937,6 +1937,7 @@ bool MDSRankDispatcher::handle_asok_command( if (r != 0) { ss << "Failed to dump cache: " << cpp_strerror(r); + f->reset(); } } else if (command == "cache status") { Mutex::Locker l(mds_lock); @@ -1955,6 +1956,7 @@ bool MDSRankDispatcher::handle_asok_command( int r = mdcache->dump_cache(root, depth, f); if (r != 0) { ss << "Failed to dump tree: " << cpp_strerror(r); + f->reset(); } } } else if (command == "force_readonly") {