From: Sage Weil Date: Mon, 16 Dec 2013 05:43:11 +0000 (-0800) Subject: osd: include peer_info in pg query X-Git-Tag: v0.77~68^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05274f33860c67e7e1e28167e8c52b75f9330467;p=ceph.git osd: include peer_info in pg query This can be very useful when diagnosing peering problems. Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index acf32e4f0e2c..33e544eb7c25 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -480,6 +480,17 @@ int ReplicatedPG::do_command(cmdmap_t cmdmap, ostream& ss, info.dump(f.get()); f->close_section(); + f->open_array_section("peer_info"); + for (map::iterator p = peer_info.begin(); + p != peer_info.end(); + ++p) { + f->open_object_section("info"); + f->dump_unsigned("peer", p->first); + p->second.dump(f.get()); + f->close_section(); + } + f->close_section(); + f->open_array_section("recovery_state"); handle_query_state(f.get()); f->close_section();