]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/mgr/pg_autoscaler: fix progress event of the autoscaler
authorKamoltat Sirivadhna <ksirivad@redhat.com>
Tue, 9 Sep 2025 11:28:17 +0000 (11:28 +0000)
committerKamoltat Sirivadhna <ksirivad@redhat.com>
Tue, 14 Oct 2025 14:33:29 +0000 (14:33 +0000)
commitbf45524b5e6d644714aed203c0225cc876e3e28b
tree00d7b6dafadc9f03a9a965fa2cdc27dc20bb742a
parent27e936bdd35079026bddaafa74cc260d7142282b
pybind/mgr/pg_autoscaler: fix progress event of the autoscaler

Problem:
We are comparing the wrong value when determining whether the Autoscaler event should be completed or not,
we compared pool_data["pg_num"] == pool_data["pg_num_target"] which will always return true since pool_data["pg_num_target"]
is not actual the target pg we are trying to scale towards, but rather the previous calculated value
that we
are expected to already reached based on previous values.

Solution:
Use the correct value which is comparing pool_data[‘pg_num’] == ev.pg_num_target.

Fixes: https://tracker.ceph.com/issues/72857
Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
src/pybind/mgr/pg_autoscaler/module.py