Am i the only one who didn't unsderstand the instruction? what is the correct normal procedure for rotating the client keys?
I tried to use
Code:
ceph auth rotate --key-type=aes256k client.RIPs
and then the command
Code:
migrations/pve-cephx-rotate-service-keys
sayed the keys where rotated outside the script.
This is now my status.
Code:
oot@proxh2:~# /usr/share/pve-manager/migrations/pve-cephx-rotate-service-keys
INFO: This is a dry run. No Ceph key, cipher setting, or daemon will be changed. Session observations can update the migration journal.
PASS: Every service key uses 'aes256k', and so do the service tickets.
These keys need manual migration. Follow each client's key-rotation procedure; update every key copy and refresh every client:
client.filesHalle
client.mirror
client.mirror_remote
so what is the correct way to rotate the last three client keys?
These don't look like they were created by Proxmox so they need to be rotated manually. One question, obviously, is whether these clients can actually consume the aes256k key to begin with. You may need to first update the mirror daemons or whatever's on the other end. Userspace clients need Ceph 19.2.6 or 20.2.4, and kernel mounts need kernel 7.0 or a distribution backport.
If those clients cannot be upgraded, then do not rotate the keys, because you would just cut them off.
Here are some example commands to investigate what each key is for and who is connected with it. Sessions are per monitor, so run the second one on every monitor node.
ceph auth get client.filesHalle
ceph tell mon.$(hostname) sessions | grep -B2 -A12 -E '"entity_name": "client\.(filesHalle|mirror)'
Then create a pending key and rotate, one client at a time. The old key keeps working while the new one is pending:
ceph auth get-or-create-pending client.filesHalle
Write the pending key into a new keyring file, e.g.:
printf '[client.filesHalle]\n\tkey = %s\n' "$(ceph auth get client.filesHalle | sed -n 's/^\tpending key = //p')" > /root/ceph.client.filesHalle.keyring.new
Test the new key before you distribute it:
ceph -n client.filesHalle --keyring /root/ceph.client.filesHalle.keyring.new osd pool ls
Put the new key into every copy, then reconnect the consumer. For a host keyring that is the file plus a remount or service restart. For a mirror peer it is the peer’s stored key on the other cluster, set with rbd mirror pool peer set <pool> <uuid> key <new-key> or its keyring file, followed by a restart of the mirror daemon and a check of rbd mirror pool status.
Once every copy is updated, commit and verify:
ceph auth commit-pending client.filesHalle
ceph auth get client.filesHalle
The output should show a single key and no pending key line. From then on the old key is refused for new connections. Note that the first use of the new key also commits it, a few seconds later, so the commit command may answer “no pending key”. That is fine. It also means the test command above starts the clock, so have the copies ready before you run it.
To back out before the new key has been used:
ceph auth clear-pending client.filesHalle
Afterwards run the helper’s dry run again. The client should move from “need manual migration” to “Ready for confirmation”.