Skip to main content
RunBook Academy

CephXLIX · cephadmcephadm

Declaring services with the orchestrator

Intermediate⏱ ~17 minceph

What you'll learn

  • Declare services with placement specifications
  • Explain the reconciliation model
  • Apply service specifications from files
  • Diagnose a service that is not reconciling

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

The orchestrator is declarative: you state what should exist and it works continuously to make that true. Operators used to imperative deployment are surprised when a daemon they stopped comes back, and when a change they made by hand is reverted.

Declaring

ceph orch apply mon --placement="3 label:mon"
ceph orch apply mgr --placement="2 label:mgr"
ceph orch apply mds cephfs --placement="3 label:mds"
ceph orch apply rgw default --placement="4 label:rgw" --port=8080

ceph orch ls
ceph orch ls --service-name mon --export

Placement specifications

SpecificationMeaning
"3"three daemons, orchestrator chooses hosts
"host1 host2 host3"exactly these hosts
"label:mon"every host with the label
"3 label:mon"three hosts chosen from those labelled
"*"every host
"host-pattern:ceph-osd-*"hosts matching the pattern

Label-based placement is the most maintainable: adding a labelled host extends the service automatically, and the labels document intent.

Specification files

service_type: rgw
service_id: default
placement:
  label: rgw
  count: 4
spec:
  rgw_frontend_port: 8080
  rgw_realm: default
  rgw_zone: default
---
service_type: mds
service_id: cephfs
placement:
  label: mds
  count: 3
ceph orch apply -i services.yaml
ceph orch ls --export > cluster-services.yaml

Exporting the current state to a file and keeping it in version control is what makes a cluster’s configuration reviewable and reproducible.

The reconciliation model

The orchestrator compares the declaration with reality on a cycle and acts on the difference:

  • A daemon you stop is restarted
  • A host that fails has its daemons redeployed elsewhere, subject to placement
  • A labelled host added gets the labelled services
  • A daemon removed by hand comes back

To remove a service you change the declaration:

ceph orch rm rgw.default
ceph orch apply rgw default --placement="2 label:rgw"   # reduce the count

When reconciliation stalls

ceph orch ls
# shows RUNNING count below the declared count

ceph log last cephadm
ceph health detail
ceph orch ps --refresh
CauseSignature
No hosts match the placementcount 0/N with no candidate hosts
Image pull failingdaemons stuck in starting
Host unreachableorchestrator log shows SSH errors
Insufficient resourcesdaemon starts and exits
Orchestrator pausedceph orch status shows paused

Quiz

Knowledge check · 4 questions

  1. Q1. You stop a daemon with systemctl and it restarts a few minutes later. Why?

  2. Q2. `ceph orch pause` is the right tool for hand intervention on a daemon, because it halts reconciliation without touching the declarations.

  3. Q3. Perform manual intervention on a daemon without the orchestrator interfering.

    An engineer needs to stop an MDS daemon temporarily to capture diagnostics from its host while it is not running. Every time they stop it, it restarts within minutes.

  4. Q4. Why is label-based placement more maintainable than naming hosts explicitly?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Export service specifications to version control so the cluster’s declared layout is reviewable and reproducible. Use ceph orch pause for manual intervention rather than fighting the reconciliation loop — it suspends without discarding, so nothing needs restoring afterwards.

Cross-course references

  • Kubernetes: this is the same declarative reconciliation model as controllers and Deployments
  • Linux: configuration management tools that enforce desired state behave identically