mon/OSDMonitor: dump osdmap manifest alongside other infos

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
This commit is contained in:
Joao Eduardo Luis 2017-11-23 17:18:39 +00:00
parent bc5df2b449
commit b64122ac37
2 changed files with 15 additions and 0 deletions

View File

@ -4057,6 +4057,12 @@ void OSDMonitor::dump_info(Formatter *f)
f->open_object_section("crushmap");
osdmap.crush->dump(f);
f->close_section();
if (has_osdmap_manifest) {
f->open_object_section("osdmap_manifest");
osdmap_manifest.dump(f);
f->close_section();
}
}
namespace {

View File

@ -192,6 +192,15 @@ struct osdmap_manifest_t {
decode(p);
}
void dump(Formatter *f) {
f->dump_unsigned("first_pinned", get_first_pinned());
f->dump_unsigned("last_pinned", get_last_pinned());
f->open_array_section("pinned_maps");
for (auto& i : pinned) {
f->dump_unsigned("epoch", i);
}
f->close_section();
}
};
WRITE_CLASS_ENCODER(osdmap_manifest_t);