Red Hat Bugzilla – Bug 239029
Autofs is not looking up automountkey in ldap correctly.
Last modified: 2010-10-22 10:44:16 EDT
Description of problem:
We are using ldap maps using the automountkey/automountinformation type schema.
After upgrading to autofs-4.1.3-199.3, automount is no longer searching for
automountkey correctly. In the ldap server logs we see automount searching for
"cn=<key>", "cn=/", and "automountkey=/", but never a search for
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Use maps in ldap with automountkey/automountinformation schema
2. Start autofs
Keys are never matched, so the mount never happens successfully.
Automount should search for automountkey=<mountpoint>
Created attachment 154129 [details]
Logs from ldap server when autofs tries to mount "/software/Linux"
Please include a debug log and a copy of your master map and the ldif for the
map in question. Please also provide the contents of /etc/sysconfig/autofs and
the automount: line in /etc/nsswitch.conf. You can find information about
generating debug logs from:
Chalk this up as user error.
We change /etc/sysconfig/autofs to reflect the auto.master name. I noticed that
the rpm created /etc/sysconfig/autofs.rpmnew with the primary difference being
"OLD_LDAP_LOOKUP=0". Adding this line to /etc/sysconfig/autofs fixes our problem.
Thanks for the quick response!
Hmm, OLD_LDAP_LOOKUP=1 is supposed to preserve the existing behaviour! It seems
I botched that up, but good. I'm going to keep this bug open until I can figure
out exactly what is going on.
I'm glad it's working for you. You should also notice a reduced load on your
ldap servers with this new package. Enjoy!
It should be noted this is not user error. It appears to be a change in default
behavior, perhaps unintentionally. Previous versions of autofs did not define
OLD_LDAP_LOOKUP in /etc/sysconfig/autofs . Specifically autofs-4.1.3-187.
Upgrading to autofs-4.1.3-199.3 introduced changes into the autofs startup
script, specifically the OLD_LDAP_LOOKUP variable which is defined to 1 in the
script, thereby enabling the (undocumented ?) --use-old-ldap-lookup option. This
option apparently disables lookups using the automount style schema and enables
lookups using only the nisMap style schema.
Will a new package be available which maintains the existing default behavior
without requiring changes to the /etc/sysconfig/autofs file ?
(In reply to comment #5)
> It should be noted this is not user error. It appears to be a change in default
> behavior, perhaps unintentionally.
Let me set the story straight, here. I know this is not a user error, and I am
investigating a fix for this problem.
I introduced a patch to reduce the load on the back-end LDAP servers:
* Wed Jan 3 2007 Jeff Moyer <firstname.lastname@example.org> - 1:4.1.3-199
- Resolves: reduce the load incurred on ldap servers (bz #210182, bz #210185)
The patch introduced the OLD_LDAP_LOOKUP variable in /etc/sysconfig/autofs TO
RETAIN BACKWARDS COMPATIBILITY. The old behaviour was to try every schema type
for every LDAP query until an answer was returned. This is what should still be
happening (and obviously is not) when this flag is set to 1.
Now, with the new code, we cycle through each available schma type until we find
one that works. We then squirrel away the information on which schema works so
that we don't have to try every one in succession for future lookups.
Given that the new behaviour seems to work, it is actually preferrable to use
it. I will, however, fix the fallback behaviour.
> Will a new package be available which maintains the existing default behavior
> without requiring changes to the /etc/sysconfig/autofs file ?
Yes, as I stated above.
This bit us too after an up2date. Can confirm that OLD_LDAP_LOOKUP=0 gets it
*** Bug 242071 has been marked as a duplicate of this bug. ***
Created attachment 159799 [details]
Handle the return code of CHE_MISSING properly in lookup_one.
This patch fixes the problem in my test environment.
This bugzilla has Keywords: Regression.
Since no regressions are allowed between releases,
it is also being proposed as a blocker for this release.
Please resolve ASAP.
A fix for this bug was committed to autofs version 4.1.3-226.
This patch is missing parenthesis, which changes the result of the calculation.
It needs to be fixed.
Created attachment 186341 [details]
Fix up broken logic statement
A fix for this issue was committed to autofs version 4.1.3-231.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.