FS#20903 - [nfs-utils][initscripts] Daemons in DAEMON_DEPENDS are stopped to early
Attached to Project:
Arch Linux
Opened by Paul Ezvan (paulez) - Tuesday, 21 September 2010, 14:36 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 26 August 2011, 14:42 GMT
Opened by Paul Ezvan (paulez) - Tuesday, 21 September 2010, 14:36 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 26 August 2011, 14:42 GMT
|
Details
Description:
Daemons listed in DAEMON_DEPENDS of an daemon initscript are stopped first when system is shutdown. For exemple, nfs-common has rpcbind in DAEMON_DEPENDS. When the system is shutdown, rpcbind is stopped first. Then network filesystems cannot be unmounted because of nfs server being unresponsive, resulting in a long delay (waiting for timeout) before stopping. Rpcbind should stop just before nfs-common to resolve this. Steps to reproduce: - Configure nfs mount in fstab - adding nfs-common in rc.conf before netfs - at shutdown nfs shares cannot be unmounted. |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Friday, 26 August 2011, 14:42 GMT
Reason for closing: Fixed
Additional comments about closing: 1.2.4-3
Friday, 26 August 2011, 14:42 GMT
Reason for closing: Fixed
Additional comments about closing: 1.2.4-3
On shutdown, daemons pulled in through DAEMON_DEPENDS are treated the same as daemons started manually. That is to say they are shutdown first, before the daemons in the DAEMONS array are stopped.
We should probably fix this. Until it is fixed, it would be best if DAEMON_DEPENDS are not used, and users instead are adviced to add the needed daemons to their rc.conf, in the correct order:
DAEMONS=(... rpcbind nfs-common ...)
Then we know to stop rpcbind last.
But should it before, or after, netfs?
if ! ck_daemon rpcbind; then
echo "ERROR: Refusing to start nfs-common without rpcbind running!" >&2
stat_die
fi
We would of course also need to notify the users to add rpcbind to their rc.conf. However, if they don't have rpcbind in rc.conf already they will have a hang on shutdown anyway...
ck_daemon rpcbind && { echo -n "Start rpcbind first." >&2; stat_die; }
(Taken from the avahi package, but not tested myself (just like the previous one was taken from the hal package without testing it myself...)).