Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 650184

Summary: sys-cluster/ceph-12.2.4-r1 missing ceph-osd-prestart.sh called from osd systemd unit
Product: Gentoo Linux Reporter: Wes <wes>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: UNCONFIRMED ---    
Severity: normal CC: cluster, dlan
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for sys-cluster/ceph-12.2.5

Description Wes 2018-03-11 09:23:34 UTC
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.
Comment 1 Wes 2018-03-11 09:24:14 UTC
s/ExecutePre/ExecStartPre/
Comment 2 Wes 2018-03-11 09:33:15 UTC
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
Comment 3 Wes 2018-03-11 21:57:24 UTC
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
Comment 4 Patrick Michaelis 2018-08-05 22:45:34 UTC
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).
Comment 5 Patrick Michaelis 2018-08-05 22:46:31 UTC
Created attachment 542514 [details, diff]
patch for sys-cluster/ceph-12.2.5