[Bug 354031] New: rcautofs stop leaves corrupted /etc/mtab
https://bugzilla.novell.com/show_bug.cgi?id=354031 Summary: rcautofs stop leaves corrupted /etc/mtab Product: openSUSE 10.2 Version: Final Platform: Other OS/Version: openSUSE 10.2 Status: NEW Severity: Major Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Michael.Bontenackels@gmx.de QAContact: qa@suse.de Found By: Other When executing "rcautofs stop" or "rcautofs restart" while nfs filesystems are still in use ("busy") and mounted by an automount process, the filesystems are not unmounted (that's ok) but the corresponding automount process is nevertheless killed (that's NOT ok). The file /etc/mtab as well as /proc/mounts still list the killed automount process afterwards thus preventing a restart of a new automount process for this mountpoint. Looking deeper into /etc/init.d/autofs reveals that automount processes are always killed if the "stop" or "restart" argument is passed to the script. The problem seems to be "killproc" since this command sends a KILL signal after some seconds if the TERM signal does not succeed. When automount controlls "busy" filesystems the daemon does not exit until all filesystems are unmounted. This behaviour drives killproc to send a KILL signal which stops the daemon but leaves the filesystems mounted. /etc/mtab and /proc/mounts are not updated and keep entries for a no longer running automount daemon. Calling "rcautofs start" which basically is a restart of automount daemons for the mountpoints defined in auto.master now fails because of these entries. From my point of view the killproc command has to be replaced by a usual kill which sends only the TERM signal. The "while alive" loop in the autofs script will never be entered because all automount processes are definitely terminated and killed by killproc. Excerpt from /etc/init.d/autofs ... stop) echo -n "Shutting down service automount" if checkproc $DAEMON ; then # kill all automounts in runlevel 0 and 6 to prevent busy case $RUNLEVEL in 0|6|s|S) kill_all_using_me ;; esac # now kill daemons pids=$(/sbin/pidof $DAEMON) killproc -TERM $DAEMON || return=1 if [ $return = 0 ] ; then echo -e "$rc_done" else echo -e "$rc_failed" fi count=1 while alive $pids; do sleep 5 count=$(expr $count + 1) if [ $count -gt 5 ]; then echo "Giving up on automounter" break; fi echo "Automounter not stopped yet: retrying... (attempt $count)" done if [ $count -gt 1 -a $count -le 10 ]; then echo "Automounter stopped" fi else return=0 echo -e "$rc_done" fi rm -f /var/lock/subsys/autofs ;; ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=354031
Mark Gordon
https://bugzilla.novell.com/show_bug.cgi?id=354031
User hvogel@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=354031#c1
Hendrik Vogelsang
participants (1)
-
bugzilla_noreply@novell.com