Bug 55932 - "/etc/init.d/autofs stop" has problems
"/etc/init.d/autofs stop" has problems
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
: 70707 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-11-08 19:59 EST by Michael Schwendt
Modified: 2005-10-31 17:00 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-20 17:19:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Schwendt 2001-11-08 19:59:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012

Description of problem:
Run "service autofs stop" on a running automount service and observe how
the [  OK  ] turns to [Failed] almost immediately, although the shutdown

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. service autofs start
2. service autofs stop
3. Observe the status output of the service script.

Actual Results:  "service autofs stop" prints [  OK  ] and almost
immediately changes it to [FAILED].

Expected Results:  "service autofs stop" should print [  OK  ] only.

Additional info:
I think the problem here is that "automount" forks a child process upon
shutdown which confuses the "stop" code in the "autofs" service script.
After sending a USR2 signal to the single automount process, the script 
checks /sbin/pidof /usr/sbin/automount which returns the daemon's PID plus
a second PID as long as automount has not shutdown yet. This causes the
script to enter a special shutdown loop which fails to terminate automount
which has finished its shutdown code meanwhile.
Comment 1 Jesse Keating 2002-04-19 01:57:19 EDT
Again, do you have to have mountpoints defined for this to work?  I am unable to
reproduce this problem.
Comment 2 Michael Schwendt 2002-04-19 07:42:28 EDT
Yes. Running automount without any mount-points makes no sense.

On Enigma (reproducible on Skipjack-beta2), see description above:

# /etc/auto.master
/home/ftp/pub/mnt/enigma     /etc/auto.enigma  -timeout 600

# /etc/auto.enigma
disc1       -fstype=iso9660,ro,loop :/home/ftp/pub/rh72/iso/enigma-i386-disc1.iso
disc2       -fstype=iso9660,ro,loop :/home/ftp/pub/rh72/iso/enigma-i386-disc2.iso

# the long lines above probably get wrapped by bugzilla (don't know)

# service autofs start
Starting automount:                                        [  OK  ]

The following first reads [  OK  ] and then immediately turns into [FAILED]:

# service autofs stop 
Stopping automount:                                        [FAILED]
Comment 3 Michael Schwendt 2003-01-25 13:42:33 EST
Original report was about Red Hat Linux 7.2 (Enigma). Reproducible on Phoebe

What is written in "Additional info:" is still true.

# service autofs start
Starting automount:                                        [  OK  ]
# pidof /usr/sbin/automount
2279 2255
# service autofs stop
Stopping automount:                                        [FAILED]
# service autofs start
Starting automount:                                        [  OK  ]
# service autofs stop
Stopping automount:                                        [  OK  ]
# service autofs start
Starting automount:                                        [  OK  ]
# service autofs stop
Stopping automount:                                        [FAILED]
Comment 4 Jeffrey Moyer 2004-03-19 17:56:05 EST
*** Bug 70707 has been marked as a duplicate of this bug. ***
Comment 5 Jeffrey Moyer 2004-03-22 10:11:16 EST
I will push a fix for this into rawhide, once the pool opens up.

Note You need to log in before you can comment on or make changes to this bug.