From: Sage Weil Date: Mon, 15 Jul 2013 21:29:14 +0000 (-0700) Subject: mon: make report pure json X-Git-Tag: v0.67-rc1~73 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b46930c96c8fc06532bb3936fb30ced822cc9d45;p=ceph.git mon: make report pure json Put the crc in the status string and drop the header and footer. If users want to capture it, ceph report 2>&1 > foo.txt Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 82b57c2e7bba..1282cb359cac 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2135,16 +2135,11 @@ void Monitor::handle_command(MMonCommand *m) paxos->dump_info(f.get()); f->close_section(); - f->flush(ds); + f->flush(rdata); - bufferlist bl; - bl.append("-------- BEGIN REPORT --------\n"); - bl.append(ds); ostringstream ss2; - ss2 << "\n-------- END REPORT " << bl.crc32c(6789) << " --------\n"; - rdata.append(bl); - rdata.append(ss2.str()); - rs = string(); + ss2 << "report " << rdata.crc32c(6789); + rs = ss2.str(); r = 0; } else if (prefix == "quorum_status") { if (!access_r) {