ceph-12.2.4-r1 fails to install a script which is called from the system unit for osd services' ExecutePre: ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i Mar 11 20:18:25 monolith systemd[1]: Starting Ceph object storage daemon osd.0... Mar 11 20:18:25 monolith systemd[29514]: ceph-osd@0.service: Failed to execute command: No such file or directory Mar 11 20:18:25 monolith systemd[29514]: ceph-osd@0.service: Failed at step EXEC spawning /usr/lib/ceph/ceph-osd-prestart.sh: No such file or directory Mar 11 20:18:25 monolith systemd[1]: ceph-osd@0.service: Control process exited, code=exited status=203 Mar 11 20:18:25 monolith systemd[1]: ceph-osd@0.service: Failed with result 'exit-code'. Mar 11 20:18:25 monolith systemd[1]: Failed to start Ceph object storage daemon osd.0.
s/ExecutePre/ExecStartPre/
I'm not sure the relevance of this script, my cluster seems ok without it but every time ceph is updated my osds fail to start next boot because ceph-osd@.service is replaced
I just noticed bug 604328 is a duplicate of this issue. There are also other issues with the systemd units, they make assumptions about the cluster name and look for env config in /etc/sysconfig. I notice you said you don't have an easy way of testing systemd units on the previous bug - I'll try to put some time aside this week to clean things up and submit some PRs for them
The ceph-osd-prestart.sh script is installed by the ebuild, but at a different location: it can be found at /usr/libexec/ceph/ceph-osd-prestart.sh in the files/ dir is a systemd unit with the correct path, but that unit file is not being installed. I assume it was installed for prior versions, before upstream shipped it's own unit files. The installed upstream unit file seems better IMHO, it has stricter security constraints, but hardcodes /usr/lib/.. as the path. changing that path solves the issue. Patch attached (tested with ceph-12.2.5).
Created attachment 542514 [details, diff] patch for sys-cluster/ceph-12.2.5