Bug 110575

Summary: autofs type mounts should be excluded from /etc/cron.daily/slocate.cron
Product: [Fedora] Fedora Reporter: Bob Arendt <rda>
Component: slocateAssignee: Miloslav Trmač <mitr>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: hps
Target Milestone: ---Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.7-21 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-16 09:13:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for slocate to correctly exclude autofs mounted filesystems none

Description Bob Arendt 2003-11-21 14:59:14 UTC
Description of problem:
/etc/cron.daily/slocate.cron should have "autofs" added to
it's default list of excluded types.

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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
I get a lot of autofs activity!

Expected results:
The default skips type "nfs".  It should skip "autofs" as well.

Additional info:
Modified my install so:
/usr/bin/updatedb -f "nfs,autofs,smbfs,ncpfs,proc,devpts" -e
"/tmp,/var/tmp,/usr/tmp,/afs,/net"

Comment 1 Miloslav Trmac 2003-11-21 16:32:53 UTC
Triage->Easyfix

Comment 2 Henning Schmiedehausen 2004-01-02 12:06:31 UTC
Can confirm this. Please add "autofs" to the exclude list.

Comment 3 Henning Schmiedehausen 2004-01-02 12:35:11 UTC
Hm. Seems to me that excluding autofs isn't _that_ easy.

I needed the attached patch to make autofs exclusion actually work.


Comment 4 Henning Schmiedehausen 2004-01-02 12:35:52 UTC
Created attachment 96740 [details]
Patch for slocate to correctly exclude autofs mounted filesystems

Comment 5 Jef Spaleta 2004-02-01 20:19:44 UTC
Just made an effort to confirm this patch applies to the new fc1
update slocate-2.7-4 package. Editted the slocate spec file locally
and added this as a new patch to apply.  It seems to apply cleanly.
And the package rebuilds on my system.  I'm setting the patch keyword.



Comment 6 Bob Arendt 2004-04-20 13:00:01 UTC
slocate-2.7-9 now excludes autofs by default, as seen in
/etc/updatedb.conf.  However, Henning's patch hasn't been applied;
The patch suggests that "/etc/mtab" isn't current (or doesn't
inidicate an autofs type?), and that "/proc/self/mounts" does.
However, I do see correct autofs entries in /etc/mtab ... perhaps
some other fix affecting /etc/mtab entries removed the need for
Henning's patch?

If there's concurrance, I believe that this enhancement bug is closed.

One nit - the man page for updatedb doesn't document the
PRUNEFS and PRUNEPATH environment vars used in /etc/updatedb.conf.
The slocate page doesn't document these variables either.

And an additional nit ...  I see there is now a rpc_pipefs mounted
at /var/lib/rpc_pipes .  Should this be excluded as well?  I don't
see any penalty for including it, but in general it doesn't have
any useful locate information.

Comment 7 Bill Nottingham 2004-05-21 17:26:02 UTC
Ideally, rpc_pipefs should be handled by a fix for bug 123914.

Closing, please reopen if it still fails for you with autofs.

Comment 8 Aleksandar Milivojevic 2005-04-15 15:41:52 UTC
Henning's patch seems to be needed in some cases (namely, when symbolic links
are used).  I've tested this on RH73, FC and RHEL might be the same, but on the
other might not (2.6 vs 2.4 kernel and all other changes might have affected how
/etc/mtab is being populated).

The case when they are needed is when symlinks are used.  For example, if /home
is symlink to /export/home, than we have this in /etc/mtab:

automount(pid807) /home autofs rw,fd=5,pgrp=807,minproto=2,maxproto=3 0 0
server:/users/foobar /home/foobar nfs rw,addr=1.2.3.4 0 0

On the other hand, /proc/self/mount has a bit different picture of how things
look like (second line would probably end up wrapped into two lines):

automount(pid807) /export/home autofs rw 0 0
server:/users/foobar /export/home/foobar nfs
rw,v3,rsize=4096,wsize=4096,hard,udp,lock,addr=server 0 0

It seems that updatedb traverses autofs and nfs mounted directories without the
patch (info read from /etc/mtab), however it works correctly with the patch
(info read from /proc/self/mounts).

Comment 9 Aleksandar Milivojevic 2005-04-15 15:44:23 UTC
Just realized I was unclear on what I tested, and what I haven't.  I tested on
RH73.  I did not test on FC and RHEL (only assuming the problem might exist on
them).

Comment 10 Miloslav Trmač 2005-04-16 09:13:15 UTC
(In reply to comment #9)
> Just realized I was unclear on what I tested, and what I haven't.  I tested on
> RH73.  I did not test on FC and RHEL (only assuming the problem might exist on
> them).
This seems to work fine on FC3 (no symlinks in /etc/mtab), but slocate should
be more robust in this respect anyway; slocate-2.7-21 will handle them correctly.