]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/pg_autoscaler: noautoscale flag retains individual pool configs
authorKamoltat <ksirivad@redhat.com>
Thu, 13 Jul 2023 18:23:13 +0000 (18:23 +0000)
committerKamoltat <ksirivad@redhat.com>
Mon, 2 Oct 2023 15:12:49 +0000 (15:12 +0000)
commit2371e197374e37a7fe91add5bf4ef96e026b6996
tree0f7f03ad1afc44a2510bc384b7773d3961967041
parent987fa95080ba82385f45e0889919cddc5e2645b0
pybind/mgr/pg_autoscaler: noautoscale flag retains individual pool configs

Problem:

The pg_autoscaler `noautoscale flag` doesn't retain individual pool states of
`autoscale mode`. For example turn the flag `ON` and then `OFF` again all
the pools will have `autoscale mode on` which is inconvenience for the user
because sometimes the user just want to temporary disable the autoscaler on
all pools and will enable it back after a period of time while retaining
individual pool states of `autoscale mode`

Solution:

We store noautoscale flag in the OSDMAP such that it is
persistent. We then get rid of noautoscale MODULE OPTION
in the pg_autoscaler module since we do not need it anymore.
Everytime we set, unset or get the flag we rely on looking up
the OSDMAP, we did this because we want to avoid inconsistancy
between the `noautoscale flag`. This is because `noautoscale flag`
can easily be set by doing `ceph osd set noautoscale`.

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

Conflicts:
src/pybind/mgr/pg_autoscaler/module.py - trivial fix
src/include/rados.h
src/mon/MonCommands.h
src/mon/OSDMonitor.cc
src/osd/OSDMap.cc
src/pybind/mgr/pg_autoscaler/module.py