]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/pg_autoscaler: change overlapping roots to warning 47522/head
authorKamoltat <ksirivad@redhat.com>
Thu, 12 May 2022 12:22:13 +0000 (12:22 +0000)
committerKamoltat <ksirivad@redhat.com>
Tue, 9 Aug 2022 20:39:26 +0000 (20:39 +0000)
Change the log level of overlapping roots
from ``Error`` to ``Warning``.

Point the user to documentation that
explains the overlapping roots.

Added more information regarding overlapping roots
in the autoscaler documentation such as
the step to get rid of the warning.

Fixes: https://tracker.ceph.com/issues/55611
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit e8490dae9fb9596c68fb4dc05ac8b0f6adb305b8)

doc/rados/operations/placement-groups.rst
src/pybind/mgr/pg_autoscaler/module.py

index 9cfb13a03cc477715bf9997fe11c2d54c5697f5b..33b45d5dced87ce333db33ccfc21388101bbcce7 100644 (file)
@@ -138,16 +138,21 @@ example, a pool that maps to OSDs of class `ssd` and a pool that maps
 to OSDs of class `hdd` will each have optimal PG counts that depend on
 the number of those respective device types.
 
+In the case where a pool uses OSDs under two or more CRUSH roots, e.g., (shadow
+trees with both `ssd` and `hdd` devices), the autoscaler will
+issue a warning to the user in the manager log stating the name of the pool
+and the set of roots that overlap each other. The autoscaler will not
+scale any pools with overlapping roots because this can cause problems
+with the scaling process. We recommend making each pool belong to only
+one root (one OSD class) to get rid of the warning and ensure a successful
+scaling process.
+
 The autoscaler uses the `bulk` flag to determine which pool
 should start out with a full complement of PGs and only
 scales down when the usage ratio across the pool is not even.
 However, if the pool doesn't have the `bulk` flag, the pool will
 start out with minimal PGs and only when there is more usage in the pool.
 
-The autoscaler identifies any overlapping roots and prevents the pools
-with such roots from scaling because overlapping roots can cause problems
-with the scaling process.
-
 To create pool with `bulk` flag::
 
   ceph osd pool create <pool-name> --bulk
index 398ba9b41331ac8dacce4ee9b24fe4fbaf9ae30f..b1be10ba248a34c80070905ce5120c1bf5d6e424 100644 (file)
@@ -344,8 +344,11 @@ class PgAutoscaler(MgrModule):
                     if prev_root_id != root_id:
                         overlapped_roots.add(prev_root_id)
                         overlapped_roots.add(root_id)
-                        self.log.error('pool %d has overlapping roots: %s',
-                                       pool_id, overlapped_roots)
+                        self.log.warning("pool %s won't scale due to overlapping roots: %s",
+                                       pool['pool_name'], overlapped_roots)
+                        self.log.warning("Please See: https://docs.ceph.com/en/"
+                                         "latest/rados/operations/placement-groups"
+                                         "/#automated-scaling")
                     break
             if not s:
                 s = CrushSubtreeResourceStatus()