Skip to content

Commit

Permalink
pybind/mgr/autoscaler: Donot show NEW PG_NUM value if autoscaler is n…
Browse files Browse the repository at this point in the history
…ot on

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>
  • Loading branch information
Prashant D committed Jun 21, 2022
1 parent e47dfb0 commit 46ce0be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pybind/mgr/pg_autoscaler/module.py
Expand Up @@ -602,7 +602,8 @@ def _get_pool_pg_targets(
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
Expand Down

0 comments on commit 46ce0be

Please sign in to comment.