summaryrefslogtreecommitdiff
path: root/src/mon/OSDMonitor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mon/OSDMonitor.cc')
-rw-r--r--src/mon/OSDMonitor.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 23cebda7c99..608edb90534 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -1996,6 +1996,17 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
ss << "listed " << osdmap.blacklist.size() << " entries";
r = 0;
}
+ else if (m->cmd.size() == 3 && m->cmd[1] == "crush" && m->cmd[2] == "dump") {
+ JSONFormatter jf(true);
+ jf.open_object_section("crush_map");
+ osdmap.crush->dump(&jf);
+ jf.close_section();
+ ostringstream rs;
+ jf.flush(rs);
+ rs << "\n";
+ rdata.append(rs.str());
+ r = 0;
+ }
}
out:
if (r != -1) {