Existence of parent directories for admin and bootstrap keys in ceph-create-keys not checked
The ceph-create-key script does not check the existence of the parent directories in which the admin and the bootstrap keys are created. This can result in a failure of "ceph-deploy gatherkeys ..." with messages like:
root@ceph-admin:~# ceph-deploy gatherkeys mon01
Unable to find /var/lib/ceph/bootstrap-osd/ceph.keyring on ['mon01']
Unable to find /var/lib/ceph/bootstrap-mds/ceph.keyring on ['mon01']
#3 Updated by Peter Wienemann over 10 years ago
Yes, the packages do it right after the installation. But this does not mean that these dirs still exist when you run ceph-deploy. I had problems with the partition which is mounted on /var/lib/ceph. After this was fixed, I restarted with an empty /var/lib/ceph directory. I tried to get the system running again using ceph-deploy but it failed due to the missing dirs. Since the ceph packages where on other partitions, there was no need to reinstall them. Therefore, I think, it would be good if the scripts check the existence of dirs right before they try to put files in them.