From 2b2b3d2035a700a65c3c469eedae69ad31023cf6 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 5 Sep 2017 14:44:49 -0700 Subject: [PATCH] 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 --- src/mds/MDSRank.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 52e357f0742e..b4e196b5ddeb 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 == "dump tree") { string root; @@ -1949,6 +1950,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") { -- 2.47.3