]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
mon: use key_server for looking up mon key
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 29 May 2025 14:07:52 +0000 (10:07 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 29 Dec 2025 22:30:04 +0000 (17:30 -0500)
commit9c089a0da0144ab666387c178d73aba6ab181983
tree15e2b735be01a4e016aba0043e57a8c044e33507
parent2607266aa30dabad8e8c2e5867a51dc642fc6c7a
mon: use key_server for looking up mon key

Note: the key_server is already configured to fallback (via
KeyServerData::extra_secrets) to the Monitor::keyring which is sourced from the
mon's keyring file.

Using the Monitor::key_server allows us to maintain the mon's secret in the
auth database alongside all other secrets. This makes rotating the mons' keys
the same as all other entities in Ceph. Before this, to rotate the mons' key
you would need to turn off all montitors and then rotate the key files
manually. This is obviously disruptive since it's not a rolling upgrade.

If the key is sourced from the Monitor::key_server, then the key can be rotated
and all mons are aware of the new key. The mons can then proceed to restart as
needed in a non-disruptive fashion.

A followup commit will cleanup the monitor to try either its local keyring key
or the key in the key_server (if present) when authenticating with other mons.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/mon/Monitor.cc