]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: reset Formatter on error 17506/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 5 Sep 2017 21:44:49 +0000 (14:44 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 5 Sep 2017 21:45:07 +0000 (14:45 -0700)
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>
src/mds/MDSRank.cc

index 52e357f0742e0ccaac5b9c1ccbf108685b7e29b0..b4e196b5ddeb59f800978a58de1de86c5ca7f4d0 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 == "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") {