Bug #5311
closedExistence of parent directories for admin and bootstrap keys in ceph-create-keys not checked
0%
Description
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']
Updated by Peter Wienemann almost 11 years ago
A fix is available as pull request #355.
Updated by Greg Farnum almost 11 years ago
Aren't these directories supposed to be installed by the packages? Something is doing it in the normal case or these would never have worked at all.
Updated by Peter Wienemann almost 11 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.
Also issue #5299 (http://tracker.ceph.com/issues/5299) shows that I am not the only one who gets stuck due to missing directory issues. ;-)