]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Omit MANY_OBJECTS_PER_PG warning when autoscaler is on
authorChristopher Hoffman <choffman@redhat.com>
Fri, 10 Dec 2021 14:54:19 +0000 (14:54 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Thu, 24 Feb 2022 17:50:56 +0000 (17:50 +0000)
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 <choffman@redhat.com>
(cherry picked from commit 8d846c3003362609cfa56edff5e99ca93b431d1d)

src/mon/PGMap.cc

index fddee309767673fbca25bb50d482f06117f5054a..69e3e17744f97d6933abe67a0b33abe6e1134ee9 100644 (file)
@@ -2996,11 +2996,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());
+         }
        }
       }
     }