]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/autoscaler: Donot show NEW PG_NUM value if autoscaler is not on 47925/head
authorPrashant D <pdhange@redhat.com>
Tue, 21 Jun 2022 06:53:41 +0000 (02:53 -0400)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 2 Sep 2022 16:31:34 +0000 (16:31 +0000)
When noautscale is set, autoscale-status shows NEW PG_NUM
value if pool pg_num is more than 96. If autoscaler is in
off or warn mode for the pool then donot adjust the final
pg count for the pool.

Fixes: https://tracker.ceph.com/issues/56136
Signed-off-by: Prashant D <pdhange@redhat.com>
(cherry picked from commit 46ce0beda3878b62606bbf686a3d6713755acccb)

src/pybind/mgr/pg_autoscaler/module.py

index 57d27655114483a8d7abf9056415cac4315a63b9..d4758c75ab4462449134a5844d7afb71210960bb 100644 (file)
@@ -605,7 +605,8 @@ class PgAutoscaler(MgrModule):
             if (final_pg_target > p['pg_num_target'] * threshold or
                     final_pg_target < p['pg_num_target'] / threshold) and \
                     final_ratio >= 0.0 and \
-                    final_ratio <= 1.0:
+                    final_ratio <= 1.0 and \
+                    p['pg_autoscale_mode'] == 'on':
                 adjust = True
 
             assert pool_pg_target is not None