Skip to content

Commit

Permalink
ceph-disk: systemd unit must run after local-fs.target
Browse files Browse the repository at this point in the history
A ceph udev action may be triggered before the local file systems are
mounted because there is no ordering in udev. The ceph udev action
delegates asynchronously to systemd via [email protected] which will
fail if (for instance) the LVM partition required to mount /var/lib/ceph
is not available yet. The systemd unit will retry a few times but will
eventually fail permanently. The sysadmin can systemctl reset-fail at a
later time and it will succeed.

Add a dependency to [email protected] so that it waits until the local
file systems are mounted:

After=local-fs.target

Since local-fs.target depends on lvm, it will wait until the lvm
partition (as well as any dm devices) is ready and mounted before
attempting to activate the OSD. It may still fail because the
corresponding journal/data partition is not ready yet (which is
expected) but it will no longer fail because the lvm/filesystems/dm are
not ready.

Fixes: http://tracker.ceph.com/issues/17889

Signed-off-by: Loic Dachary <[email protected]>
  • Loading branch information
ldachary committed Nov 22, 2016
1 parent 69c2996 commit d954de5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions systemd/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[Unit]
Description=Ceph disk activation: %f
After=local-fs.target
Wants=local-fs.target

[Service]
Type=oneshot
Expand Down

0 comments on commit d954de5

Please sign in to comment.