Bug 187525
Summary: | FC5 autofs package missing patches from RHEL | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeff Bastian <jmbastia> | ||||
Component: | autofs | Assignee: | Jeff Moyer <jmoyer> | ||||
Status: | CLOSED UPSTREAM | QA Contact: | Brock Organ <borgan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5 | CC: | 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
Jeff Bastian
2006-03-31 17:11:23 UTC
Created attachment 127137 [details]
Patch to add support for $LDAPAUTOMASTER to FC5 autofs
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. (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? 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 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. 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 Much of this work is already going on upstream, and that is the right place for it. 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 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 |