Skip to main content
RunBook Academy

CephCXI · Manager RecoveryManager Recovery

Module state across a manager failover

Advanced⏱ ~18 minceph

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

Not yet marked complete on this device.

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 stateStored inRead with
Enabled module listthe MgrMap, in the monitorsceph mgr dump
Module optionscentral config, mgr sectionceph config dump
Module datathe monitors config-key storeceph config-key ls
Working set and timersthe active manager memorynothing — 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

StateSurvives a failover
Which modules are enabledyes — the MgrMap holds it
Dashboard users and their rolesyes — config-key
cephadm service specs and SSH identityyes — config-key
Balancer mode and on/offyes — central config
A balancer plan created but not executedno
Prometheus counters and scrape cacheno
Progress module in-flight eventsno — they are re-derived
Dashboard login sessionsno — users authenticate again
Device health scrape scheduletiming resets; collected data persists
Autoscaler evaluation cyclerestarts 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
ConsequenceHandling
Counters restartprefer gauges derived from cluster state
rate() over the gap reads lowwiden the window or accept the notch
absent() alerts firegive them a for longer than the warm-up
Dashboards show a holeannotate 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

  1. Q1. What is genuinely lost when a manager fails over?

  2. Q2. Dashboard users and cephadm service specifications must be recreated after a manager failover.

  3. 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.

  4. 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