Skip to content

Commit

Permalink
lazy-umount-nfs.service: Run after automount shutdown
Browse files Browse the repository at this point in the history
lazy-umount-nfs.service sometimes stalled for several seconds during
shutdown. The assumed reason is, that is was started while automount was
still shuting down - possibly triggering new automounts.

Add a order dependency for automount.service. During shutdown,
automount.service is stopped (by its default dependency on
shutdown.target) and this service is started by its explicit dependency
on shutdown.target.

We could use "After=" or "Before=" [1], but "After=" seems a bit
more intuitive to me ("start lazy-umount-nfs.service AFTER
automount.service was stopped").

[1] `man systemd.unit` :

    If one unit with an ordering dependency on another unit is shut down
    while the latter is started up, the shut down is ordered before the start-up
    regardless whether the ordering dependency is actually of type
    After= or Before=.
  • Loading branch information
donald committed Feb 15, 2018
1 parent c91c4e4 commit 1d5150e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions misc_systemd_units/lazy-umount-nfs.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
Description=Lazy Umount NFS
Before=shutdown.target
After=automount.service
DefaultDependencies=false

[Service]
Expand Down

0 comments on commit 1d5150e

Please sign in to comment.