Repository navigation
mgr/PyModuleRegistry: compare the module set this manager reads - #72804
Merged
Merged
Conversation
handle_mgr_map() compares the always_on_modules map the monitors write, while MgrMap::get_always_on_modules() picks the single entry out of it that this manager reads, keyed on the manager's own compiled-in release. An entry for any other release cannot change what this manager runs, so a release key being added reads as a change to its own module set, and the manager respawns and re-initialises all of its Python modules for nothing. Every release adds such a key, as doc/dev/release-checklists.rst asks, so this fires on every major upgrade. MgrMonitor::on_active() proposes a new mgrmap whenever the leader's compiled-in table differs from the stored one, so the first monitor of the new release to become leader rewrites it, and every manager respawns at that moment, the active one included. That leaves the cluster without a manager in the middle of the rolling monitor restart, which is also when the binary a manager would re-exec has just been replaced on disk. A leader change back to a monitor of the old release rewrites the table again, so an interrupted or retried restart repeats it. Compare what the manager consumes. The branch of the same function that handles the first mgrmap already uses the accessor. Fixes: https://tracker.ceph.com/issues/81858 Related-to: https://tracker.ceph.com/issues/81856 Signed-off-by: Kefu Chai <[email protected]>
4 of 14 tasks
Contributor
Author
|
jenkins test make check arm64 |
Contributor
|
This PR has been added to wip-bharath10-testing-20261027.070130-main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: https://tracker.ceph.com/issues/81858
PyModuleRegistry::handle_mgr_map()compares thealways_on_modulesmap themonitors write, while
MgrMap::get_always_on_modules()picks the single entryout of it that this manager reads, keyed on the manager's own compiled-in
release. An entry for any other release cannot change what this manager runs,
so a release key being added reads as a change to its own module set, and the
manager respawns and re-initialises all of its Python modules for nothing.
Every release adds such a key, as
doc/dev/release-checklists.rstasks, sothis fires on every major upgrade: the first monitor of the new release to
become leader rewrites the field from
MgrMonitor::on_active(), and everymanager respawns at that moment, the active one included. That leaves the
cluster without a manager in the middle of the rolling monitor restart, and on
a cephadm cluster the active manager is the orchestrator running the upgrade.
The branch of the same function that handles the first mgrmap already uses the
accessor, and
Mgr::got_mgr_map()compares onlymodules.Reproduced with vstart
One monitor built with the
CEPH_RELEASE_UMBRELLAentry removed fromalways_on_modules(), then restarted with the entry present, restarting onlythe monitor so the manager keeps its stored mgrmap:
In both runs the monitor logged
always on modules changedexactly once andthe table went from
octopus,pacific,quincy,reef,squid,tentacleto that plusumbrella, while all seven per-release entries hold the identical modulelist, so nothing the manager consumes changed.
Checklist