From b46930c96c8fc06532bb3936fb30ced822cc9d45 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Jul 2013 14:29:14 -0700 Subject: [PATCH] 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 --- src/mon/Monitor.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 82b57c2e7bb..1282cb359ca 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) { -- 2.47.3