Bug ID | 1017263 |
---|---|
Summary | systemctl stop autofs.service takes 5 minutes to stop |
Classification | openSUSE |
Product | openSUSE Distribution |
Version | Leap 42.1 |
Hardware | x86-64 |
OS | openSUSE 42.1 |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | Network |
Assignee | bnc-team-screening@forge.provo.novell.com |
Reporter | jimc@math.ucla.edu |
QA Contact | qa-bugs@suse.de |
Found By | --- |
Blocker | --- |
Created attachment 707891 [details]
/etc/systemd/system/autofs.service with SIGUSR2
This is for autofs-5.0.9-12.1.x86_64 on OpenSuSE "Leap" 42.1.
Cause it to mount something, by e.g. "ls /net/remotehost/home/". For a
test that's more difficult to pass, make the mountpoint busy by e.g.
(cd /net/remotehost/home; sleep 3600 )& . Now do "systemctl stop autofs"
or reboot the machine. Autofs receives SIGTERM but does not exit.
The man page says "that's not a bug, that's a feature". Eventually
systemd times out and sends (I assume) SIGKILL.
We need to send at least SIGUSR1 to immediately unmount all automounted
objects that aren't busy, or SIGUSR2 to do a lazy unmount even if they
are busy. Then autofs will exit on getting SIGTERM and the reboot
finishes at a normal pace.
I've attached a unit file which fixes the problem for me.