From bede01863606e4a2c52147483e64d5de461b29b5 Mon Sep 17 00:00:00 2001 From: Ponnuvel Palaniyappan Date: Thu, 15 Sep 2022 15:55:06 +0100 Subject: [PATCH] mon, mgr: do not output network ping stats When doing PG dump using 'ceph pg dump --format json-pretty' the output is extremely big that the command hangs and also the ceph-mgr hangs and eventuall fails over. The exact size depends on the number of OSDs in the cluster and the number of peers for each OSD. In tests, it's been identified that the network ping times is the largest component in terms of size which is removed from the output now so as to limit the overall size. Fixes https://tracker.ceph.com/issues/57460 Signed-off-by: Ponnuvel Palaniyappan --- PendingReleaseNotes | 4 ++++ src/mon/PGMap.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 2e41462a1eb68..e28c35efce53b 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -135,6 +135,10 @@ CephFS: Disallow delegating preallocated inode ranges to clients. Config permissions unless explicitly granted by topic policy. * RBD: The option ``--image-id`` has been added to `rbd children` CLI command, so it can be run for images in the trash. +* PG dump: The default output of `ceph pg dump --format json` has changed. The + default json format produces a rather massive output in large clusters and + isn't scalable. So we have removed the 'network_ping_times' section from + the output. Details in the tracker: https://tracker.ceph.com/issues/57460 >=18.0.0 diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index 2a127b802a86d..d1135f2a1a184 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -452,12 +452,12 @@ 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, bool with_net = true) const; + void dump(ceph::Formatter *f, bool with_net = false) const; void dump_basic(ceph::Formatter *f) const; void dump_pg_stats(ceph::Formatter *f, bool brief) const; void dump_pg_progress(ceph::Formatter *f) const; void dump_pool_stats(ceph::Formatter *f) const; - void dump_osd_stats(ceph::Formatter *f, bool with_net = true) const; + void dump_osd_stats(ceph::Formatter *f, bool with_net = false) const; void dump_osd_ping_times(ceph::Formatter *f) const; void dump_delta(ceph::Formatter *f) const; void dump_filtered_pg_stats(ceph::Formatter *f, std::set& pgs) const; -- 2.39.5