Bug 187525

Summary: FC5 autofs package missing patches from RHEL
Product: [Fedora] Fedora Reporter: Jeff Bastian <jmbastia>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED UPSTREAM QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: ikent
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-31 17:30:40 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 to add support for $LDAPAUTOMASTER to FC5 autofs none

Description Jeff Bastian 2006-03-31 17:11:23 UTC
Description of problem:
It looks like the autofs package in FC diverged from the RHEL autofs package at
version 4.1.3-123.  FC jumped to autofs-4.1.4-x while RHEL stayed on 4.1.3-x and
the FC autofs package is missing patches that are included in RHEL.  The missing
patch that I noticed adds the $LDAPAUTOMASTER variable to the
/etc/sysconfig/autofs and /etc/rc.d/init.d/autofs files, but there are probably
more.

Version-Release number of selected component (if applicable):
RHEL autofs-4.1.3-165 added support for $LDAPAUTOMASTER
FC autofs-4.1.4-16.2.2 is missing this variable

How reproducible:
Every time

Steps to Reproduce:
1. Install FC5's autofs package
  
Actual results:
Check /etc/sysconfig/autofs and /etc/rc.d/init.d/autofs and note that
support for the $LDAPAUTOMASTER variable is missing

Expected results:
A blank variable $LDAPMASTER should be defined in /etc/sysconfig/autofs, and the
/etc/rc.d/init.d/autofs script should use this variable in the
/usr/lib/autofs/autofs-ldap-auto-master line.

Additional info:

Comment 1 Jeff Bastian 2006-03-31 17:13:41 UTC
Created attachment 127137 [details]
Patch to add support for $LDAPAUTOMASTER to FC5 autofs

Comment 2 Jeff Moyer 2006-03-31 17:30:40 UTC
Fedora is different from RHEL.  If you want features in Fedora, it is best to
take the issue upstream, as the autofs packages in Fedora match upstream almost
exactly.

Comment 3 Ian Kent 2006-04-06 10:21:49 UTC
(In reply to comment #1)
> Created an attachment (id=127137) [edit]
> Patch to add support for $LDAPAUTOMASTER to FC5 autofs
> 

It looks to me like $LDAPAUTOMASTER contains the master map name only.
Is that correct?


Comment 4 Jeff Moyer 2006-04-06 14:09:33 UTC
Exactly.  See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161648

Comment 5 Jeff Bastian 2006-04-06 14:21:19 UTC
No, we're actually using a different LDAP schema so we're using all of the
options available to the autofs-ldap-auto-master command.  Our
/etc/sysconfig/autofs file has this line:

LDAPAUTOMASTER="-m automountMap -e automount -n automountMapName -k automountKey
-v automountInformation auto_master_linux"

Some background: the original schema for putting NIS like data into LDAP stored
the automount key in the cn field.  The cn field, however, is case insensitive
which is different from NIS, NIS+, local files, etc.  I.E., with NIS, /mnt/foo
and /mnt/FOO would mount two different directories, but under LDAP they look the
same and which one gets mounted depends on which record the LDAP server decides
to return first.

Old schema (case insensitive):
  map object class:   nisMap
  entry object class: nisObject
  map name:           nisMapName
  entry key:          cn
  entry value:        nisMapEntry

New schema (case sensitive):
  map object class:   automountMap  
  entry object class: automount
  map name:           automountMapName
  entry key:          automountKey
  entry value:        automountInformation

Finally, you'll notice that our auto.master map name is auto_master_linux.  We
had to create two different auto.master maps -- one for Linux and one for
Solaris.  The Linux automounter for some reason does not read the /etc/ldap.conf
file nor does it remember the values passed in to the autofs-ldap-auto-master
program, so we have to duplicate information in the auto.master map, i.e., the
automountInformation field has to have the name of the LDAP server and the map
name in it:

$ ldapsearch -x -LLL -b automountMapName=auto_master_linux,ou=foo \
    automountKey=/home automountInformation
dn: description=/home, automountMapName=auto_master_linux, ou=foo
automountInformation: ldap:foo1.domain.com,foo2.domain.com:automountMapName=au
 to_home,ou=foo -rw,intr,timeo=600,retrans=2,vers=3,proto=tcp,nosuid,nobrowse,
 retry=100,rsize=32768,wsize=32768

(Host names and ou names changed to protect security.)

The auto_master tabled used by Solaris only needs the mount options, not the
LDAP server name and map location, because it gets that info from the LDAP
config files.

I believe I have a feature request in the RHEL IssueTracker system to enhance
the automounter with better LDAP support so I don't need two auto.master maps.

Jeff

Comment 6 Jeff Bastian 2006-04-06 14:28:37 UTC
FYI, the new LDAP scheme with case sensitive fields was defined in RFC 2307bis.
  http://www.padl.com/~lukeh/rfc2307bis.txt

Apparently this RFC never made it out ot the draft stage, but Sun has
implemented it with their Solaris automounter and, with a couple of patches that
I submitted for RHEL3, it too supports the new schema.

Comment 7 Jeff Bastian 2006-04-06 15:24:36 UTC
Clarification (or correction) on my earlier comment: the Solaris auto.master
automountInformation field only has the map name (e.g., auto_home) and the mount
options.  The Linux automountInformation field requires
  1. the fact that the information is stored in LDAP
  2. the names of the LDAP servers
  3. the map name
  4. the base dn to the map is stored under

It seems kind of silly to have to tell the automounter that the map is stored in
LDAP when it just queried LDAP to get this information.  And the automounter
should be able to get #2 and #4 from the /etc/ldap.conf file.  Only #3 is really
needed.

This
  ldap:foo1.domain.com,foo2.domain.com:automountMapName=auto_home,ou=foo
should be able to be reduced to
  auto_home
but the /etc/rc.d/init.d/autofs script basically launches the automount daemon
with the automountInformation verbatim (it just changes the : after ldap to a
space).

But I digress.  The point of this BZ is just to add the $LDAPAUTOMASTER variable
to /etc/sysconfig/autofs and /etc/rc.d/init.d/autofs.  We can work on making the
automounter more intelligent wrt LDAP in another BZ.

Jeff

Comment 8 Jeff Moyer 2006-04-06 15:34:35 UTC
Much of this work is already going on upstream, and that is the right place for it.

Comment 9 Ian Kent 2006-05-04 02:26:30 UTC
An update has been applied for this bug Apr 11.

I believe it is fixed so if I don't hear otherwise I will
close this case tomorrow.

Ian

Comment 10 Jeff Bastian 2006-05-19 20:07:25 UTC
I finally got a chance to update autofs on my FC5 box and the latest version
does have the $LDAPAUTOMASTER variable in it now and it works great.  Thanks!

Jeff