ceph: manage /etc/ceph/ceph.conf on osd and mon/mgr/mds hosts #515
Reference in New Issue
Block a user
Delete Branch "benvin/manage-ceph-conf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
/etc/ceph/ceph.confon the prodnxsr ceph cluster (fsidde96a98f) is currently unmanaged and hand-maintained via the runbook (profiles::ceph::client::manage_ceph_confisfalseon the k8s and incus roles). This brings it under Puppet, drives it from a single source of truth in hiera, and normalizespublic_networkto every ceph host's/32.How hosts are identified (osd-only vs mon/mgr/mds)
The authoritative, declarative signal is the role's
hiera_includelist (ENCrole-> role hiera):roles::infra::k8s::*(prodnxsr0001-0008 and prodnxsr0014-0019): includeprofiles::ceph::osd+::client, NOT::mds->[global]only.roles::infra::incus::node(prodnxsr0009-0013): also includeprofiles::ceph::mds->[global]+[mds]+[mds.*].The template keys on
profiles::ceph::client::render_mds_config, settrueonly in the incus node role hiera (the single role that includesprofiles::ceph::mds). Theis_ceph_mdsfact is a runtime fallback, not used here.Changes
hieradata/common.yaml:cluster_public_ips(all 19 ceph host/32s, 198.18.23.1-19),mon_initial_members(the 5 mons), and themds_instancesmap (two mds daemons per mon/mgr/mds host).profiles/ceph/client.conf.erbto render[global]always and the[mds]/[mds.*]sections only whenrender_mds_configis true, preserving the live two-space indent, exact key order, and blank-line separators between mds sections.profiles::ceph::clientwith topology + tunable params (sample values as defaults) and gate[mds]onrender_mds_config.Package[ceph-common]dependency when the class does not manage the package (cephadm /profiles::packagesdeliver it on the k8s and incus hosts; k8s hosts do not declareceph-common, so an unconditional require would fail to compile).manage_ceph_conf: trueonroles/infra/k8s.yaml,roles/infra/k8s/node.yaml, androles/infra/incus/node.yaml; addrender_mds_config: trueto the incus node role. prodnxsr0014-0019 runroles::infra::k8s::compute(confirmed live via PuppetDB;is_ceph_osdtrue,is_ceph_mdsfalse), so they are already covered byk8s.yamland get the[global]-only variant with no mds sections.Live-cluster safety review (please read before merge)
This touches a running storage cluster's config. The rendered content is byte-equivalent to the live file except for the one deliberate
public_networknormalization below.public_networkis normalized to all 19 ceph host/32s on every host (198.18.23.1-19). Adoption is now a singlepublic_network-line change on every cluster host, no longer a no-op on the osd hosts:.1-.13live -> first convergence adds.14-.19..9-.13live -> first convergence adds.1-.8and.14-.19.[global]variant./etc/ceph/ceph.confpulled from prodnxsr0008 and prodnxsr0009): each differs by exactly one line (the expandedpublic_network); on prodnxsr0009 the[mds]+[mds.*]sections and their blank-line separators are byte-identical to live. Rendering prodnxsr0009 with its current live.9-.13value reproduces the live file byte-for-byte, confirming the format match.roles::infra::ceph::rgw, ausyd1nxvm2115-2119) include onlyprofiles::ceph::rgw->profiles::ceph::conf; they do not includeprofiles::ceph::client, so their variant is untouched and there is no duplicateFile[/etc/ceph/ceph.conf].Rendered samples:
[global]with all 19/32s inpublic_network, nothing else.[global]plus[mds]and[mds.<host>-1|2]for prodnxsr0009-0013, blank-line separated.