CephCXI · Manager RecoveryManager Recovery
Module state across a manager failover
What you'll learn
- Locate where module configuration and data are stored
- Distinguish state that survives failover from state that does not
- Explain the observability discontinuity a failover creates
- Re-establish module state deliberately after a failover
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
Module configuration survives a manager failover because it never lived in the manager, and the thing that is genuinely lost is every periodic task that had not yet fired.
Where module state actually lives
| Kind of state | Stored in | Read with |
|---|---|---|
| Enabled module list | the MgrMap, in the monitors | ceph mgr dump |
| Module options | central config, mgr section | ceph config dump |
| Module data | the monitors config-key store | ceph config-key ls |
| Working set and timers | the active manager memory | nothing — it is gone |
ceph config dump --format json | python3 -c '
import sys,json
for e in json.load(sys.stdin):
if e["name"].startswith("mgr/"):
print("%-44s %s" % (e["name"], e["value"]))'
ceph config-key ls --format json | python3 -c '
import sys,json
for k in json.load(sys.stdin):
if k.startswith("mgr/"):
print(k)' | head -20
What survives and what does not
| State | Survives a failover |
|---|---|
| Which modules are enabled | yes — the MgrMap holds it |
| Dashboard users and their roles | yes — config-key |
| cephadm service specs and SSH identity | yes — config-key |
| Balancer mode and on/off | yes — central config |
| A balancer plan created but not executed | no |
| Prometheus counters and scrape cache | no |
| Progress module in-flight events | no — they are re-derived |
| Dashboard login sessions | no — users authenticate again |
| Device health scrape schedule | timing resets; collected data persists |
| Autoscaler evaluation cycle | restarts from zero |
ceph balancer status
ceph progress
ceph device ls | head -5
The observability discontinuity
The prometheus endpoint is served by the active manager, so a failover
produces a scrape gap that spans the promotion plus the module warm-up.
ceph mgr services
curl -sf http://$(hostname -f):9283/metrics | wc -l
| Consequence | Handling |
|---|---|
| Counters restart | prefer gauges derived from cluster state |
rate() over the gap reads low | widen the window or accept the notch |
absent() alerts fire | give them a for longer than the warm-up |
| Dashboards show a hole | annotate manager failovers as events |
Re-establishing state deliberately
ceph mgr module ls --format json | python3 -c '
import sys,json
d = json.load(sys.stdin)
print("enabled:", ",".join(sorted(d["enabled_modules"])))
for m in d.get("disabled_modules", []):
if m.get("error_string"):
print("ERROR", m["name"], m["error_string"])'
ceph balancer status
ceph orch status
ceph health detail
Quiz
Knowledge check · 4 questions
Q1. What is genuinely lost when a manager fails over?
Q2. Dashboard users and cephadm service specifications must be recreated after a manager failover.
Q3. Explain why device health data has stopped accumulating.
A cluster shows no new device health readings for a week. `ceph -s` is HEALTH_OK, the devicehealth module is enabled, and `ceph mgr dump` shows the active manager changed 14 minutes ago.
Q4. Where do manager module options and module data live?
Passing score: 75%. Answers are checked in this browser.
Production discipline
After any manager failover, check ceph mgr module ls for a non-empty
error string and ceph balancer status for a reset optimisation cycle —
neither raises a health warning. Treat a moving active_change timestamp
as an alert in its own right, because a flapping manager starves every
periodic task while the cluster reports perfect health.
Cross-course references
- Kubernetes: a CronJob controller that restarts before the schedule fires also misses it silently
- Linux: work scheduled by an in-process timer disappears with the process, without an error