Bug 129311 - Direct map support in v4 might break working config
Direct map support in v4 might break working config
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: autofs (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeffrey Moyer
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2004-08-06 08:20 EDT by Göran Uddeborg
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-09 04:34:02 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 Göran Uddeborg 2004-08-06 08:20:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.2)

Description of problem:
Strating to support direct maps in version four is of course mostly an
enhancement.  But since direct maps work differently than on other
systems, it might actually break things.  This happens if there are
other mounts under the same top-level directory.

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

How reproducible:

Steps to Reproduce:
1. Enter "/- auto.direct -rw,intr" and "/nfs/vm auto.vm -rw,intr" in
2. Enter "/nfs/ipatinga/src ipatinga:/lfs/src" into auto.direct.
3. Enter "cvs lehrter:/lfs/vm/&" into auto.vm.

Actual Results:  With autofs 3 the direct map is ignored. 
/nfs/ipatinga/src is not available while /nfs/vm/cvs is.

With autofs 4 the direct map is used, and replaces the entire /nfs
tree.  /nfs/ipatinga/src becomes available, but /nfs/vm/cvs disappears.

Additional info:

On other systems (Solaris, HP-UX, AIX) both directories are available,
since not the whole tree is taken.  Adding support for direct mounts
certainly is a good thing.  Adding it in a different way than used on
other systems, is unfortunate, but better than nothing.  Applying that
change between two update releases is slightly questionable though.

We had of course done workarounds on our Linux systems to cater for
the lack of support for direct maps.  We can certainly figure out some
other workaround for the different behaviour in treatment of direct
maps in the new version.  While I would count on having to do that
kind of work for an upgrade to RHEL4, I would not expect it for an
upgrade release.

An idea would be to have an easy way to disable the direct maps.  Then
you could choose if you want the new functionality, or prefer it the
old way.  This could be a switch in /etc/sysconfig/autofs; if the
variable is set, the /etc/rc.d/init.d/autofs would skip /- entries in
the map.

This kind of patch could be kept for the RHEL3U* releases, and removed
with RHEL4.
Comment 1 Jeffrey Moyer 2004-08-06 09:44:24 EDT
Yes, this point has been bothering me.  I put together a new package
which disables direct support by default.  You can enable it by setting
in /etc/sysconfig/autofs.

Thanks for the report.  I will update the bug when the new package is

Comment 2 Göran Uddeborg 2004-09-09 04:34:02 EDT
I see this is implemented in U3.

I'm slightly surprised by the test used.

            if [ $DISABLE_DIRECT -eq 1 \
                        -a x`echo $dir | grep -E "^/-"` != 'x' ]

Wouldn't it have been simpler and still correct to just say like this?

            if [ $DISABLE_DIRECT -eq 1 -a x$dir = x/- ]

A difference would be that this would not remove a dir of the form
"/-xxx".  But should that really be removed?

Anyway, the delivered fix works, so I close this.

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