r/ceph • • Sep 13 '26

Key Migration - Proxmox script (missing keyrings for monitors?)

I have cephx disabled but I still need to rotate the pre-existing keys to get rid the insecure keys warning.

When trying to use the tool I am running across these errors:

FAIL: These keys cannot be rewritten where their daemons read them, so rotating them would strand the daemons:
  mon. has neither a keyring file nor a bluestore device under /var/lib/ceph/mon/ceph-vmhost6 on node 'vmhost6'
  mon. has neither a keyring file nor a bluestore device under /var/lib/ceph/mon/ceph-vmhost7 on node 'vmhost7'
  mon. has neither a keyring file nor a bluestore device under /var/lib/ceph/mon/ceph-vmhost8 on node 'vmhost8'

I believe this is because the monitors have no keyring, so I would need to create it for them.

How do I do that?

4 Upvotes

9 comments sorted by

3

u/Traditional_Pain_358 Sep 16 '26

Hi,

You can solve it by this:

ceph-authtool --create-keyring /var/lib/ceph/mon/ceph-vmhost6/keyring --gen-key -n mon.

chown ceph:ceph /var/lib/ceph/mon/ceph-vmhost6/keyring

chmod 600 /var/lib/ceph/mon/ceph-vmhost6/keyring

Do this on every host, you got the mon running, replace vmhost6 with the applicable name.

Afterwards the dry run should work.

2

u/tenfourfiftyfive Sep 28 '26

I didn't have a chance to get back to this until today but wow this worked, thank you SO much.

1

u/tenfourfiftyfive Sep 28 '26

Okay so I ran into an issue not showing up in the dry run, but it did show up in the ---apply stage:

Rotating the shared monitor key

FAIL: error with 'auth get': mon_cmd failed - failed to find mon. in keyring

Here's the contents of one of the keyrings:

/var/lib/ceph/mon/ceph-vmhost6/keyring

[mon.]

key = hiddenkeyhere-ADGFAST#$ADGASGDSG=

5

u/Keroles2024 Sep 13 '26

I am not sure if this is related to your problem I have ceph cluster (deployed by cephadm not proxmox) I am using an RBD from Ceph as a storage in Proxmox for VMs but after rotating the RBD key to AES256K cipher, Proxmox couldn't parse the key, the problem is that Proxmox Ceph client is older, and I will have to wait for proxmox to update their repo and add the new ceph version packages.

1

u/jesvinjoachim Sep 13 '26

I thought they updated and now support both in non no subscription package

1

u/Keroles2024 Sep 13 '26

I have the enterprise repo, and they haven't updated it yet

1

u/jesvinjoachim Sep 13 '26

In 2 weeks it will come to enterprise repo, maybe use no subscription and the change to enterprise later . I don’t know how it is though, could be a possibility

2

u/Keroles2024 Sep 13 '26

I would prefer waiting, it's production server and we are not in rush for rotating this key