Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98037 - net-fs/autofs - etc/init.d/autofs reload does a restart, not a reload
Summary: net-fs/autofs - etc/init.d/autofs reload does a restart, not a reload
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-05 11:53 UTC by Mark Keisler
Modified: 2008-03-25 11:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
autofs init script patch to HUP on reload. (autofs.patch,370 bytes, patch)
2005-07-05 11:55 UTC, Mark Keisler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Keisler 2005-07-05 11:53:07 UTC
The automount daemon can be signaled to reload using the HUP signal, but the
reload function in /etc/init.d/autofs sends a USR2 signal to kill the daemon and
then tries to restart it.  Most times this results in daemons not coming back
just because I am trying to keep my clients apprised of changes in maps with
wildcards in them (another bug and another story).

Reproducible: Always
Steps to Reproduce:
1. /etc/init.d/autofs reload


Actual Results:  
az10admin02 /etc/init.d # ps -ef | grep automount |wc -l
8
az10admin02 /etc/init.d # /etc/init.d/autofs reload
Reloading automounter: checking for changes ...
Stopping automounter: --timeout 60 --pid-file /var/run/autofs.apps.internal.pid
/apps/internal yp auto.appsinternal -rw,intr,nobrowse -DOSNAME=RedHat -DOSREL=3
Stopping automounter: --timeout 60 --pid-file /var/run/autofs.apps.public.pid
/apps/public yp auto.appspublic -rw,intr,nobrowse -DOSNAME=RedHat -DOSREL=3
Stopping automounter: --timeout 60 --pid-file /var/run/autofs.apps.vendor.pid
/apps/vendor yp auto.appsvendor -rw,intr,nobrowse -DOSNAME=RedHat -DOSREL=3
Stopping automounter: eout 60 --pid-file /var/run/autofs.home.pid /home yp
auto.home -rw,nosuid,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
Stopping automounter: --timeout 60 --pid-file /var/run/autofs.project.pid
/project yp auto.project -rw,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
Stopping automounter: --timeout 60 --pid-file /var/run/autofs.usr.prod.pid
/usr/prod yp auto.prod rpid,rw,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
Stopping automounter: --timeout 60 --pid-file /var/run/autofs.usr.test.pid
/usr/test yp auto.test rpid,rw,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
 * WARNING:  "autofs" has already been started.
az10admin02 /etc/init.d # ps -ef | grep automount |wc -l
2
az10admin02 /etc/init.d #


Expected Results:  
az10admin02 /etc/init.d # ps -ef | grep automount |wc -l
8
az10admin02 /etc/init.d # /etc/init.d/autofs.mk reload
Reloading automounter: checking for changes ...
Reloading automounter: --timeout 60 --pid-file /var/run/autofs.apps.internal.pid
/apps/internal yp auto.appsinternal -rw,intr,nobrowse -DOSNAME=RedHat -DOSREL=3
Reloading automounter: --timeout 60 --pid-file /var/run/autofs.apps.public.pid
/apps/public yp auto.appspublic -rw,intr,nobrowse -DOSNAME=RedHat -DOSREL=3
Reloading automounter: --timeout 60 --pid-file /var/run/autofs.apps.vendor.pid
/apps/vendor yp auto.appsvendor -rw,intr,nobrowse -DOSNAME=RedHat -DOSREL=3
Reloading automounter: eout 60 --pid-file /var/run/autofs.home.pid /home yp
auto.home -rw,nosuid,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
Reloading automounter: --timeout 60 --pid-file /var/run/autofs.project.pid
/project yp auto.project -rw,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
Reloading automounter: --timeout 60 --pid-file /var/run/autofs.usr.prod.pid
/usr/prod yp auto.prod rpid,rw,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
Reloading automounter: --timeout 60 --pid-file /var/run/autofs.usr.test.pid
/usr/test yp auto.test rpid,rw,nobrowse,intr -DOSNAME=RedHat -DOSREL=3
az10admin02 /etc/init.d # ps -ef | grep automount |wc -l
8
az10admin02 /etc/init.d #


I am running NIS.
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r11 i686)
=================================================================
System uname: 2.6.11-gentoo-r11 i686 Intel(R) Xeon(TM) CPU 2.80GHz
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Jun 13 2005, 14:29:18)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.9.5, 1.7.9-r1, 1.6.3, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="C"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts avi berkdb bitmap-fonts bzlib crypt cups curl
emboss encode f77 fam foomaticdb fortran gd gdbm gif gimpprint gpm gtk2 imap
imlib java jpeg ldap libg++ libpng libwww mad mikmod motif mp3 mpeg mysql
ncurses nis nls oggvorbis opengl oss pam pcre pdflib perl php png ppds python
quicktime readline spell ssl tcpd tiff truetype truetype-fonts type1-fonts usb
xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Mark Keisler 2005-07-05 11:55:32 UTC
Created attachment 62704 [details, diff]
autofs init script patch to HUP on reload.

autofs init script that sends a HUP insteasd of USR2 upon reload.
Comment 2 Chr. Schaefer 2006-02-05 08:22:37 UTC
Thanks for the patch, Mark. It should be applied to the tree. I was always annoyed about the broken reload function, leaving me with killed daemons and a service i had to "zap".
Comment 3 Stefaan De Roeck (RETIRED) gentoo-dev 2008-02-03 11:39:35 UTC
New maintainer, net-fs/autofs-5.0.3-r1 is now in the tree.  
Comment 4 Stefaan De Roeck (RETIRED) gentoo-dev 2008-02-03 11:48:13 UTC
Very old bug :)

Do we still fix this in autofs-4, or do we move on to autofs-5?  (The new init script for autofs-5 does kill -HUP instead of -USR2)
Comment 5 Mark Keisler 2008-02-03 21:50:14 UTC
yes, very old bug.  It is sad that this was left for so long.  If autofs5 is stable, I suppose we can just leave this in the dust.
Comment 6 Stefaan De Roeck (RETIRED) gentoo-dev 2008-03-25 11:59:02 UTC
(In reply to comment #5)
> yes, very old bug.  It is sad that this was left for so long.  If autofs5 is
> stable, I suppose we can just leave this in the dust.
> 

That's why we could use the extra manpower to fix this kind of silly problems.  You're more than welcome to join the Gentoo developers, it's one of the best ways to help the project move forwards!

Marking as fixed.