From 1112584621016c4a8cac1bedb1a1b8b17c394f7f Mon Sep 17 00:00:00 2001 From: David Zafman Date: Tue, 7 Jan 2020 14:40:38 -0800 Subject: [PATCH] mgr mon: Expose network ping information except for python pg_dump Caused by: ffb8a2a904426c8a3d6fc2fd70266418a98623c5 Signed-off-by: David Zafman --- src/mgr/ActivePyModules.cc | 2 +- src/mon/PGMap.cc | 4 ++-- src/mon/PGMap.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index e30da4cb0dd27..b29a61459d8d3 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -323,7 +323,7 @@ PyObject *ActivePyModules::get_python(const std::string &what) cluster_state.with_pgmap( [&f, &tstate](const PGMap &pg_map) { PyEval_RestoreThread(tstate); - pg_map.dump(&f); + pg_map.dump(&f, false); } ); return f.get(); diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 9fafca5c63289..80b1a2937dda1 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1527,12 +1527,12 @@ void PGMap::decode(bufferlist::const_iterator &bl) calc_stats(); } -void PGMap::dump(ceph::Formatter *f) const +void PGMap::dump(ceph::Formatter *f, bool with_net) const { dump_basic(f); dump_pg_stats(f, false); dump_pool_stats(f); - dump_osd_stats(f); + dump_osd_stats(f, with_net); } void PGMap::dump_basic(ceph::Formatter *f) const diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index f40396d324c31..11ba761369860 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -439,11 +439,11 @@ public: int64_t get_rule_avail(const OSDMap& osdmap, int ruleno) const; void get_rules_avail(const OSDMap& osdmap, std::map *avail_map) const; - void dump(ceph::Formatter *f) const; + void dump(ceph::Formatter *f, bool with_net = true) const; void dump_basic(ceph::Formatter *f) const; void dump_pg_stats(ceph::Formatter *f, bool brief) const; void dump_pool_stats(ceph::Formatter *f) const; - void dump_osd_stats(ceph::Formatter *f, bool with_net = false) const; + void dump_osd_stats(ceph::Formatter *f, bool with_net = true) const; void dump_delta(ceph::Formatter *f) const; void dump_filtered_pg_stats(ceph::Formatter *f, std::set& pgs) const; void dump_pool_stats_full(const OSDMap &osd_map, std::stringstream *ss, -- 2.39.5