Bug #81858
closedmanager respawns on every major upgrade although its module set did not change
0%
Description
What an operator sees, during a major upgrade, while the monitors are being restarted and before the managers are:
- every manager in the cluster re-execs itself at the same moment, the active one included, so ceph -s reports "mgr: no daemons active" until a standby is promoted and comes up, and MGR_DOWN can appear in the meantime
- the manager log says "respawning because set of enabled modules changed!", although nothing changed the set of enabled modules
- everything the managers hold in memory is dropped and rebuilt: the progress events in ceph -s disappear, the balancer and pg_autoscaler start over, metrics scrapes gap, the dashboard drops its sessions
- on a cephadm cluster the active manager is the orchestrator running the upgrade, so the upgrade interrupts itself and has to resume
Managers of either release are affected, since each compares against the mgrmap it last saw, so upgrading the managers first does not avoid it.
PyModuleRegistry::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 the manager reads, keyed on the manager's own compiled-in release. An entry for any other release cannot change what this manager runs, so adding a release key reads as a change to its own module set.
Every release adds such a key, as doc/dev/release-checklists.rst asks, and MgrMonitor::on_active() proposes a new mgrmap whenever the leader's compiled-in table differs from the stored one. The first monitor of the new release to become leader therefore rewrites it, which is where the respawn comes from. A leader change back to a monitor of the old release rewrites the table again, so an interrupted or retried monitor restart repeats it.
This is also the trigger that makes #81856 reachable on every upgrade: until that one is fixed, a manager respawning in this window re-execs the binary the upgrade has just replaced, and may not come back at all.
KC Updated by Kefu Chai about 2 months ago
- Status changed from New to Fix Under Review
- Assignee set to Kefu Chai
- Pull request ID set to 72804
KC Updated by Kefu Chai about 2 months ago
- Description updated (diff)
UB Updated by Upkeep Bot 28 days ago
- Copied to Backport #82715: tentacle: manager respawns on every major upgrade although its module set did not change added
UB Updated by Upkeep Bot 28 days ago
- Copied to Backport #82716: umbrella: manager respawns on every major upgrade although its module set did not change added
UB Updated by Upkeep Bot 28 days ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 7059fae418b2128b608f705362c6c5ac5cd27e24
- Fixed In set to v22.0.0-459-g7059fae418
- Upkeep Timestamp set to 2026-11-05T08:58:40+00:00