Bug #19823
closedceph-disk prepare/activate does not work properly using setuser/setgroup (filestore)
0%
Description
If 'ceph-disk prepare ...' is invoked on a new host without any existing OSDs, ceph-disk uses
ceph-osd --check-allows-journal -i 0 --cluster ceph --setuser ceph --setgroup ceph
or a similar command to check whether journals are allowed for the OSD backend. This fails with
unable to stat setuser_match_path /var/lib/ceph/$type/$cluster-$id: (2) No such file or directory
if the corresponding directory does not exists. Faking the directory (manual mkdir + chown) results in ceph-disk prepare to succeed.
The attempt to activate the new OSD using ceph-disk activate /dev/sdb in this example also fails due to the missing directory:
got monmap epoch 23
mount_activate: Failed to activate
ceph-disk: Error: ['ceph-osd', '--cluster', 'ceph', ...., '--setuser', 'ceph', '--setgroup', 'ceph'] failed : unable to stat setuser_match_path /var/lib/ceph/$type/$cluster-$id: (2) No such file or directory
Expected: preparation / activation of new OSD
Got: error due to missing OSD directory