]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Mon, 13 Dec 2021 21:07:18 +0000 (21:07 +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>
src/mon/PGMap.cc

index ea90270a9ef8fc82bf880bdef7600f9303136ff4..e5816aac1b0e5a6be765ccd79ab6d7e1a27c9148 100644 (file)
@@ -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());
+         }
        }
       }
     }