Repository navigation
Control PG autoscaler during upgrades with pg_autoscale_during_upgrade - #67694
Conversation
|
Can one of the admins verify this patch? |
14 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Hi @ashjosh1git plz have a look to https://github.com/ceph/ceph/blob/main/SubmittingPatches.rst#commit-title for commits msg formating. |
|
Implementation is the most sincere form of flattery :) “Autoscaler” in the title, please. Spelling. |
8d91f75 to
6b6a1f5
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a new pg_autoscale_during_upgrade option to cephadm that controls whether PG autoscaling remains active during OSD upgrades. By default (false), cephadm disables PG autoscaling (sets noautoscale) before upgrading OSDs and restores the prior setting afterward. Setting the option to true opts in to keeping autoscaling enabled during upgrades.
Changes:
- Adds
pg_autoscale_during_upgradeboolean option to the cephadm module, with logic to disable/restore PG autoscaling around OSD upgrades based on the option and prior cluster state. - Introduces helper methods to determine if an upgrade includes OSDs and to set/unset the
noautoscaleflag, with retry logic for transient failures. - Adds comprehensive unit tests for the decision table and documentation for the new option.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/pybind/mgr/cephadm/upgrade.py |
Adds noautoscale_set/prior_autoscale to UpgradeState, new methods to detect OSD inclusion and set/unset noautoscale, and hooks in upgrade start/stop/fail/complete paths. |
src/pybind/mgr/cephadm/module.py |
Registers the new pg_autoscale_during_upgrade module option (bool, default False). |
src/pybind/mgr/cephadm/tests/test_upgrade.py |
Adds parametrized tests for the autoscaling decision table, OSD-exclusion logic, and revert-after-upgrade behavior. |
doc/cephadm/upgrade.rst |
Documents the new pg_autoscale_during_upgrade option in the upgrade guide. |
You can also share your feedback on Copilot code review. Take the survey.
|
@ashjosh1git several upgrade test-cases are failing, plz double check: |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok to test" to allow the Jenkins jobs to run. |
Thanks @rkachach, the failures are not related to the PR. There were mostly due to a recent addition of a new objectstore flag to some ceph-volume commands as I understand. These failures may happen in any upgrade runs at this moment. Thanks. |
6b6a1f5 to
40770e0
Compare
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
|
I would like to note that sometimes checking if "noautoscale" flag is "not set" alone is not enough to justify that autoscaler is "on" for each pool. The pools has it's individual |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
…pgrade Fixes: https://tracker.ceph.com/issues/69477 Signed-off-by: Ashwin M. Joshi <[email protected]> Conflicts: src/pybind/mgr/cephadm/tests/test_upgrade.py src/pybind/mgr/cephadm/upgrade.py
40770e0 to
da4b361
Compare
|
ok-to-test |
|
Teuthology run was successful. Failing Test cases are not related to this PR: https://pulpito.ceph.com/rkachach-2026-05-14_10:12:27-orch:cephadm-wip-rkachach-testing-2026-05-14-0934-distro-default-trial/ |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
The requirement is to be able to control the PG autoscale for OSDs during upgrades with an opt-in option made available with cephadm mgr. More details are in the tracker issue 69477.
This code introduces the following functionality. The prior setting for autoscale is reverted back to original if it was changed due to pg_autoscale_during_upgrade value. The following flags are evaluated for decision making before the upgrade process:
osd pool get noautoscale(False=>Autoscale ON, default:False)mgr/cephadm/pg_autoscale_during_upgrade(true=>autoscale ON during upgrade, default:False)It must be noted that the
pg_autoscale_during_upgradeoption would be available after mgr gets upgraded first as a part of staged upgrades.The case 3 is most probable scenario. The unit tests for the same are below:
Upgrade mgr
Upgrade osd
Upgrade complete
Fixes: https://tracker.ceph.com/issues/69477
Signed-off-by: Ashwin M. Joshi [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.