diff options
author | Sage Weil <sage@inktank.com> | 2013-07-15 14:29:14 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-15 14:29:14 -0700 |
commit | b46930c96c8fc06532bb3936fb30ced822cc9d45 (patch) | |
tree | 049d8189863ea7c3d35e980013eedeaf386fc398 | |
parent | 40a8bbdc53b0500d5472e42e55c1865aeb5661e5 (diff) | |
download | ceph-b46930c96c8fc06532bb3936fb30ced822cc9d45.tar.gz |
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 <sage@inktank.com>
-rw-r--r-- | src/mon/Monitor.cc | 11 |
1 files 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) { |