]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: reset Formatter on error 17870/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 5 Sep 2017 21:44:49 +0000 (14:44 -0700)
committerNathan Cutler <ncutler@suse.com>
Thu, 21 Sep 2017 04:18:07 +0000 (06:18 +0200)
This prevents partial results from concatenating with the error message.

Fixes: http://tracker.ceph.com/issues/21252
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 2b2b3d2035a700a65c3c469eedae69ad31023cf6)

src/mds/MDSRank.cc

index 5b0d76d82cf50765eb5c3ee562820fd7d4ebe9ea..77f1819788fc5977338a2821ac6c34f04d3317d0 100644 (file)
@@ -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") {