Description of problem: 'service autofs status' reports that the automounter is stopped when it's running, and 'service autofs stop' fails to stop the automounter even if nothing is mounted (i.e., it's not getting stuck trying to unmount an active mount). See attached transcript. Version-Release number of selected component (if applicable): autofs-5.0.1-0.rc1.1 kernel-2.6.17-1.2405.fc6 How reproducible: Every time Steps to Reproduce: 1. service autofs start 2. service autofs status 3. service autofs stop Actual results: 'status' reports the automounter is stopped (even though it's not) and 'stop' cannot stop the automounter (even though nothing is mounted and preventing it from stopping cleanly) Expected results: 'status' should report the automounter is running and 'stop' should stop the service Additional info: My system is an LDAP client and it's passing '-DOSREL=rhel_4.0' as a command line arg to the automount daemon.
(In reply to comment #0) > Description of problem: > 'service autofs status' reports that the automounter is stopped when it's > running, and 'service autofs stop' fails to stop the automounter even if nothing > is mounted (i.e., it's not getting stuck trying to unmount an active mount). Could I have a debug log of the process of start and stop activity please. Ian
I'll try and duplicate this on my FC6test1 instance and see what happens. The autofs debug log you posted, was the service stop run while it was logging? It looks like nothing ever got to autofs. Ian
Yes, I sent the debug log for the time (+30 secs) that I ran the three commands mentioned earlier. I noticed the debug log didn't show any activity either when I tried to stop it. I'm guessing the init script is having a problem finding the PID of the automount daemon and thus 'status' reports the daemon is stopped and 'stop' can't actually stop a daemon it can't find. This is just a gut feeling, though, and I haven't spent much time debugging it yet. Jeff
I just added set -x to the beginning of the init script to see what it was running to find the PID of the automount daemon. It ran pidof -c -o 20780 -o 20777 -o %PPID -x automount and didn't get anything back. Out of curiosity, I ran it by hand and removed the -c flag and it found the PID of the automount daemon. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@millipede init.d]# pgrep automount 20747 [root@millipede init.d]# pidof -c -o 20780 -o 20777 -o %PPID -x automount [root@millipede init.d]# pidof automount 20747 [root@millipede init.d]# pidof -o 20780 -o 20777 -o %PPID -x automount 20747 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I then edited the /etc/rc.d/init.d/functions file and removed the '-c' option from the __pids_pidof() function and now 'service autofs status' and 'service autofs stop' work. I guess this is a bug with the initscripts package, not autofs. I looked at the /etc/rc.d/init.d/functions file on my RHEL4 U3 system and the pidof command does not use the '-c' option. Jeff
(In reply to comment #8) > I then edited the /etc/rc.d/init.d/functions file and removed the '-c' option > from the __pids_pidof() function and now 'service autofs status' and 'service > autofs stop' work. > > I guess this is a bug with the initscripts package, not autofs. I looked at the > /etc/rc.d/init.d/functions file on my RHEL4 U3 system and the pidof command does > not use the '-c' option. Cool that will save me a bunch of time. I'll have a play around with it and add the initscripts maintainer to the copy list when I post my findings and see if we can get some attention. Ian
I update my FC6 box again this morning and re-checked this. It's now at autofs-5.0.1-0.rc2.8 initscripts-8.43-1 and the /etc/rc.d/init.d/functions file still uses the -c option with pidof, however, everything seems to be working now, so whatever was causing the problems with earlier FC6 test releases seems to be fixed. You can probably close this BZ. Thanks! Jeff