Skip to contentSkip to conversation

5.0.3 oddity with LDAP map

DISCUSSION Mike Marion 2 participants 6 messages Sep 9, 2008 – Sep 11, 2008 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Taking my first real stab at testing 5.0.3 (patched up to all patches in the patch_order file from last night). Have been sticking to supported autofs5 from Novell on our hosts thus far, but still having some issues here and there (long story, mostly because we have HUGE maps I think) but ran into a problem starting 5.0.3. It seems to be truncating info the ldap server gives it. The patches all successfully applied and the compile went smoothly.

The debug info shows failure to mount like:
do_bind: lookup(ldap): ldap anonymous bind returned 0
get_query_dn: lookup(ldap): query succeeded, no matches for (&(objectclass=automountMap)(automountMapName=o.projects))
do_bind: lookup(ldap): failed to get query dn
lookup(ldap): couldn't connect to server default
do_read_map: lookup module ldap failed
mount_autofs_direct: failed to read direct map
handle_mounts: mount of /- failed!
master_do_mount: failed to startup mount

The automountMapName=o.projects above should be =auto.projects.. it seems to be truncating the "aut" from "auto". This seems to happen for each result, strace shows it getting the right answer, then coming back for the next maps with the truncation:
[strace info here only including the stuff I want to save space]

7109  read(5, "\246\4cautomountKey=/-,automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com0?0\'\4\24automountInformation1\17\4\rauto.projects0\24\4\fautomountKey1\4\4\2/-", 167) = 167
7130  write(2, "lookup_nss_read_map: reading map ldap o.projects", 48) = 48
7130  write(2, "parse_server_string: lookup(ldap): Attempting to parse LDAP information from string \"o.projects\".", 97) = 97
7130  write(2, "parse_server_string: lookup(ldap): mapname o.projects", 53) = 53
7130  write(10, "0\201\217\2\1\2c\201\211\4%ou=sandiego,ou=qct,dc=qualcomm,dc=com\n\1\2\n\1\3\2\1\0\2\1\0\1\1\0\240=\243\33\4\vobjectclass\4\fautomountMap\243\36\4\20automountMapName\4\no.projects0\22\4\20automountMapName", 146) = 146
7130  write(2, "get_query_dn: lookup(ldap): query succeeded, no matches for (&(objectclass=automountMap)(automountMapName=o.projects))", 118) = 118

same for auto.home:
mmarion@lnxlabbld3:/> grep o.home /tmp/out.autofs

7109  read(5, "\250\4fautomountKey=/usr2,automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com0>0#\4\24automountInformation1\v\4\tauto.home0\27\4\fautomountKey1\7\4\5/usr2", 169) = 169
7134  write(2, "lookup_nss_read_map: reading map ldap o.home", 44) = 44
7134  write(2, "parse_server_string: lookup(ldap): Attempting to parse LDAP information from string \"o.home\".", 93) = 93
7134  write(2, "parse_server_string: lookup(ldap): mapname o.home", 49) = 49
7134  write(21, "0\201\213\2\1\2c\201\205\4%ou=sandiego,ou=qct,dc=qualcomm,dc=com\n\1\2\n\1\3\2\1\0\2\1\0\1\1\0\2409\243\33\4\vobjectclass\4\fautomountMap\243\32\4\20automountMapName\4\6o.home0\22\4\20automountMapName", 142) = 142
7134  write(2, "get_query_dn: lookup(ldap): query succeeded, no matches for (&(objectclass=automountMap)(automountMapName=o.home))", 114) = 114

This is on a stock sles10-sp2 host, with openafs added (which wouldn't touch this anyway). Not sure why the ldap info is being truncated like the above.

Signature · 7 lines
Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com
"A home pool inevitably results in storing large quantities of the chemical 
dihydrogen oxide where household members may be exposed to it. Acute 
overexposure to dihydrogen oxide probably results in more fatalities each year 
than overexposure to any other single chemical! Of course, dihydrogen oxide is 
more commonly known as water, and acute overexposure to water is usually called 
drowning." -- Taken from pool owner tips at www.poolsolutions.com
maintainer
#1 lore raw
Quoted 8 lines · Mike Marion

Taking my first real stab at testing 5.0.3 (patched up to all patches in the patch_order file from last night). Have been sticking to supported autofs5 from Novell on our hosts thus far, but still having some issues here and there (long story, mostly because we have HUGE maps I think) but ran into a problem starting 5.0.3. It seems to be truncating info the ldap server gives it. The patches all successfully applied and the compile went smoothly.

Quoted 9 lines

The debug info shows failure to mount like:
do_bind: lookup(ldap): ldap anonymous bind returned 0
get_query_dn: lookup(ldap): query succeeded, no matches for (&(objectclass=automountMap)(automountMapName=o.projects))
do_bind: lookup(ldap): failed to get query dn
lookup(ldap): couldn't connect to server default
do_read_map: lookup module ldap failed
mount_autofs_direct: failed to read direct map
handle_mounts: mount of /- failed!
master_do_mount: failed to startup mount

Mmmm .. what have I done now!

Lets have a look at the maps and I'll try to duplicate it.

Ian

maintainer
#2 lore raw
Quoted 19 lines · Ian Kent
Quoted 8 lines · Mike Marion

Taking my first real stab at testing 5.0.3 (patched up to all patches in the patch_order file from last night). Have been sticking to supported autofs5 from Novell on our hosts thus far, but still having some issues here and there (long story, mostly because we have HUGE maps I think) but ran into a problem starting 5.0.3. It seems to be truncating info the ldap server gives it. The patches all successfully applied and the compile went smoothly.

Quoted 9 lines

The debug info shows failure to mount like:
do_bind: lookup(ldap): ldap anonymous bind returned 0
get_query_dn: lookup(ldap): query succeeded, no matches for (&(objectclass=automountMap)(automountMapName=o.projects))
do_bind: lookup(ldap): failed to get query dn
lookup(ldap): couldn't connect to server default
do_read_map: lookup module ldap failed
mount_autofs_direct: failed to read direct map
handle_mounts: mount of /- failed!
master_do_mount: failed to startup mount

Quoted 3 lines

Mmmm .. what have I done now!

Lets have a look at the maps and I'll try to duplicate it.

I've tried a bunch of variations but can't see a problem. I'll need the map configuration.

Ian

#3 lore raw
Quoted 2 lines · Ian Kent

I've tried a bunch of variations but can't see a problem. I'll need the map configuration.

Assuming you mean this.. (I'm not privy to the ldap servers themselves, but could pull the admin that originally setup the stuff if needed):

$ ldapsearch -x -h qctldap -b automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com "(objectclass=automount)"
# extended LDIF
#
# LDAPv3
# base
# <automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com>
# with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#

# /-, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/-,automountMapName=auto_master,ou=automountMaps,ou=sandiego,
ou=qct,dc=qualcomm,dc=com
automountInformation: auto.projects
automountKey: /-
description: /-
objectClass: automount
objectClass: top

# /net, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/net,automountMapName=auto_master,ou=automountMaps,ou=sandieg
o,ou=qct,dc=qualcomm,dc=com
automountInformation: -hosts -nosuid
automountKey: /net
objectClass: automount
objectClass: top

# /usr2, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/usr2,automountMapName=auto_master,ou=automountMaps,ou=sandie
go,ou=qct,dc=qualcomm,dc=com
automountInformation: auto.home
automountKey: /usr2
description: /usr2
objectClass: automount
objectClass: top

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

This same setup has been working great with autofs-5.0.2. Well, not
perfect, but basically every problem we've had can be related to either filer bugs, or the box being run OOM and the automount daemon suffering

If I then query for, say auto.projects, I get (as of now) 8551 results (yeah, we have MASSIVE maps and we're working on trimming to subsets where required), trimmed for just one path result and header/footer from that...

$ ldapsearch -x -h qctldap -b automountMapName=auto.projects,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com
"(objectclass=automount)" | less
# extended LDIF
#
# LDAPv3
# base
# <automountMapName=auto.projects,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com>
# with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#
[snip]
# /prj/qct/gv, auto.projects, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/prj/qct/gv,automountMapName=auto.projects,ou=automountMaps,o
 u=sandiego,ou=qct,dc=qualcomm,dc=com
objectClass: top
objectClass: automount
automountKey: /prj/qct/gv
automountInformation: -rw,acdirmin=1,acdirmax=5,acregmin=1,acregmax=5,noquota
 filer:/vol/volname/qct_gv
[snip]
# search result
search: 2
result: 0 Success

# numResponses: 8552
# numEntries: 8551

Not entirely sure this 2nd ldapsearch is completely right.. the strace is hard to read

Signature · 3 lines
Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com
[X] YES! I'm a brain-damaged lemur on crack, and I'd like to
    order your software package for $459.95!
maintainer
#4 lore raw
Quoted 9 lines · Mike Marion
Quoted 2 lines · Ian Kent

I've tried a bunch of variations but can't see a problem. I'll need the map configuration.

Assuming you mean this.. (I'm not privy to the ldap servers themselves, but could pull the admin that originally setup the stuff if needed):

$ ldapsearch -x -h qctldap -b automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com "(objectclass=automount)"

And the stuff with objectclass=automountMap

Quoted 83 lines
# extended LDIF
#
# LDAPv3
# base
# <automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com>
# with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#

# /-, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/-,automountMapName=auto_master,ou=automountMaps,ou=sandiego,
ou=qct,dc=qualcomm,dc=com
automountInformation: auto.projects
automountKey: /-
description: /-
objectClass: automount
objectClass: top

# /net, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/net,automountMapName=auto_master,ou=automountMaps,ou=sandieg
o,ou=qct,dc=qualcomm,dc=com
automountInformation: -hosts -nosuid
automountKey: /net
objectClass: automount
objectClass: top

# /usr2, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/usr2,automountMapName=auto_master,ou=automountMaps,ou=sandie
go,ou=qct,dc=qualcomm,dc=com
automountInformation: auto.home
automountKey: /usr2
description: /usr2
objectClass: automount
objectClass: top

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

This same setup has been working great with autofs-5.0.2. Well, not
perfect, but basically every problem we've had can be related to either filer bugs, or the box being run OOM and the automount daemon suffering

If I then query for, say auto.projects, I get (as of now) 8551 results (yeah, we have MASSIVE maps and we're working on trimming to subsets where required), trimmed for just one path result and header/footer from that...

$ ldapsearch -x -h qctldap -b automountMapName=auto.projects,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com
"(objectclass=automount)" | less
# extended LDIF
#
# LDAPv3
# base
# <automountMapName=auto.projects,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com>
# with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#
[snip]
# /prj/qct/gv, auto.projects, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/prj/qct/gv,automountMapName=auto.projects,ou=automountMaps,o
 u=sandiego,ou=qct,dc=qualcomm,dc=com
objectClass: top
objectClass: automount
automountKey: /prj/qct/gv
automountInformation: -rw,acdirmin=1,acdirmax=5,acregmin=1,acregmax=5,noquota
 filer:/vol/volname/qct_gv
[snip]
# search result
search: 2
result: 0 Success

# numResponses: 8552
# numEntries: 8551

Not entirely sure this 2nd ldapsearch is completely right.. the strace is hard to read

maintainer
#5 lore raw
Quoted 6 lines · Ian Kent
Quoted 5 lines · Mike Marion
Quoted 2 lines · Ian Kent

I've tried a bunch of variations but can't see a problem. I'll need the map configuration.

Quoted 6 lines
Quoted 4 lines

Assuming you mean this.. (I'm not privy to the ldap servers themselves, but could pull the admin that originally setup the stuff if needed):

$ ldapsearch -x -h qctldap -b automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com "(objectclass=automount)"

And the stuff with objectclass=automountMap

And if you've used the configuration setting MASTER_MAP_NAME, the value it's set to.

If your master map actually comes from a file then that too and the "automount:" entry in /etc/nsswitch.conf.

So far, the only difference I can see between what I tried and this is the ou=automountMaps which I thought might be confusing the lexer. I've made an LDAP map similar to this and it also works OK.

So, send the info above and if I don't have any joy I'll check to make sure the patched code is in fact the same as what is in repository.

If that still doesn't get to a resolution I'll need the full debug log. Sent it to me privately if there are privacy concerns.

Quoted 89 lines
Quoted 78 lines
# extended LDIF
#
# LDAPv3
# base
# <automountMapName=auto_master,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com>
# with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#

# /-, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/-,automountMapName=auto_master,ou=automountMaps,ou=sandiego,
ou=qct,dc=qualcomm,dc=com
automountInformation: auto.projects
automountKey: /-
description: /-
objectClass: automount
objectClass: top

# /net, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/net,automountMapName=auto_master,ou=automountMaps,ou=sandieg
o,ou=qct,dc=qualcomm,dc=com
automountInformation: -hosts -nosuid
automountKey: /net
objectClass: automount
objectClass: top

# /usr2, auto_master, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/usr2,automountMapName=auto_master,ou=automountMaps,ou=sandie
go,ou=qct,dc=qualcomm,dc=com
automountInformation: auto.home
automountKey: /usr2
description: /usr2
objectClass: automount
objectClass: top

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

This same setup has been working great with autofs-5.0.2. Well, not
perfect, but basically every problem we've had can be related to either filer bugs, or the box being run OOM and the automount daemon suffering

If I then query for, say auto.projects, I get (as of now) 8551 results (yeah, we have MASSIVE maps and we're working on trimming to subsets where required), trimmed for just one path result and header/footer from that...

$ ldapsearch -x -h qctldap -b automountMapName=auto.projects,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com
"(objectclass=automount)" | less
# extended LDIF
#
# LDAPv3
# base
# <automountMapName=auto.projects,ou=automountMaps,ou=sandiego,ou=qct,dc=qualcomm,dc=com>
# with scope subtree
# filter: (objectclass=automount)
# requesting: ALL
#
[snip]
# /prj/qct/gv, auto.projects, automountMaps, sandiego, qct, qualcomm.com
dn: automountKey=/prj/qct/gv,automountMapName=auto.projects,ou=automountMaps,o
 u=sandiego,ou=qct,dc=qualcomm,dc=com
objectClass: top
objectClass: automount
automountKey: /prj/qct/gv
automountInformation: -rw,acdirmin=1,acdirmax=5,acregmin=1,acregmax=5,noquota
 filer:/vol/volname/qct_gv
[snip]
# search result
search: 2
result: 0 Success
Quoted 6 lines

# numResponses: 8552
# numEntries: 8551

Not entirely sure this 2nd ldapsearch is completely right.. the strace is hard to read

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs