Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#22597 - [autofs] deamon doesn't stop correctly

Attached to Project: Community Packages
Opened by Thijs Vermeir (lovebug356) - Tuesday, 25 January 2011, 09:16 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 27 March 2011, 19:48 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

When I stop the autofs package the automount deamon is not stopped correctly. Because of this the deamon is also not able to restart (because it's detected as already running)

reprocude:
/etc/rc.d/autofs stop
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Sunday, 27 March 2011, 19:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 5.0.5-5.
Comment by Thijs Vermeir (lovebug356) - Tuesday, 25 January 2011, 09:54 GMT
it works on my system if I do 2 modifications on the deamon script:
1) use "kill -9"
2) rm /var/run/autofs-running

don't know if this is the valid solution

stop)
stat_busy "Stopping $daemon_name daemon"
[ ! -z "$PID" ] && kill -9 $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm /var/run/autofs-running
rm_daemon $daemon_name
stat_done
fi
;;
Comment by Lukas Fleischer (lfleischer) - Tuesday, 25 January 2011, 18:12 GMT
Works for me. Do you have any special config?
Comment by Thijs Vermeir (lovebug356) - Tuesday, 25 January 2011, 19:52 GMT
No, I only have ssh configured (done with information on the archlinux wiki)
Comment by Lukas Fleischer (lfleischer) - Wednesday, 26 January 2011, 05:26 GMT
What do you mean by having "ssh configured"? Automounting an sshfs via automount? In case you do that, can you try to launch `/etc/rc.d/autofs stop` several times with a few seconds interval? If that doesn't help, you could either enable debugging [1] or strace autofs in foreground mode (`strace automount -f`) and maybe attach the log file snippet and/or strace output here (after sending SIGTERM a couple of times, of course).

[1] https://wiki.archlinux.org/index.php/Autofs#Optional_parameters
Comment by Thijs Vermeir (lovebug356) - Wednesday, 26 January 2011, 10:12 GMT
to have no confusion here is my configuration file:
----------------------------
$cat /etc/autofs/auto.master
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).

#/media /etc/autofs/auto.media

/media/ssh /etc/autofs/auto.ssh --timeout=60 --ghost
---------------------------
$cat /etc/autofs/auto.ssh
sheeva -fstype=fuse,rw,allow_other :sshfs\#sheeva\:/media/usb
plug -fstype=fuse,rw,allow_other :sshfs\#plug\:/media
tvmgs -fstype=fuse,rw,allow_other :sshfs\#tvmgs\:
----------------------------

I will also test the autofs stop multiple times
Comment by Lukas Fleischer (lfleischer) - Sunday, 30 January 2011, 23:16 GMT
Did you try stopping autofs multiple times yet? I guess that automount(8) doesn't exit cause your sshfs is still busy when you're doing a `/etc/rc.d/autofs stop`.
Comment by Thijs Vermeir (lovebug356) - Friday, 11 February 2011, 14:28 GMT
Indeed, it looks like the timeout is failing to stop the application fast. So the rc.d script is confused and reports failure.

When I try without accessing ssh connection, the program stops immediately.
Comment by Lukas Fleischer (lfleischer) - Monday, 21 February 2011, 12:25 GMT
I'd say we should either compile autofs with "--enable-force-shutdown" and send SIGUSR2 to autofs in a loop when stopping the daemon or just compile it with "--enable-ignore-busy".
Comment by Lukas Fleischer (lfleischer) - Wednesday, 09 March 2011, 17:53 GMT
5.0.5-5 built with "--enable-ignore-busy".
Comment by Lukas Fleischer (lfleischer) - Tuesday, 15 March 2011, 16:18 GMT
Does this work for you now...?

Loading...