From 8d846c3003362609cfa56edff5e99ca93b431d1d Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Fri, 10 Dec 2021 14:54:19 +0000 Subject: [PATCH] mon: Omit MANY_OBJECTS_PER_PG warning when autoscaler is on Add a conditional statement when autoscaler is set to ON to omit message when about pool having many more objects per pg than cluster average. Fixes: https://tracker.ceph.com/issues/53516 Signed-off-by: Christopher Hoffman --- src/mon/PGMap.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index ea90270a9ef..e5816aac1b0 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -2919,11 +2919,13 @@ void PGMap::get_health_checks( if (mon_pg_warn_max_object_skew > 0 && ratio > mon_pg_warn_max_object_skew) { ostringstream ss; - ss << "pool " << name << " objects per pg (" - << objects_per_pg << ") is more than " << ratio - << " times cluster average (" - << average_objects_per_pg << ")"; - many_detail.push_back(ss.str()); + if (pi->pg_autoscale_mode != pg_pool_t::pg_autoscale_mode_t::ON) { + ss << "pool " << name << " objects per pg (" + << objects_per_pg << ") is more than " << ratio + << " times cluster average (" + << average_objects_per_pg << ")"; + many_detail.push_back(ss.str()); + } } } } -- 2.39.5