* Problem with autofs 3.1.7 -> 4.1.0-beta2
@ 2003-12-07 4:34 Michael Blandford
2003-12-07 5:53 ` Ian Kent
2003-12-10 10:35 ` Ian Kent
0 siblings, 2 replies; 9+ messages in thread
From: Michael Blandford @ 2003-12-07 4:34 UTC (permalink / raw)
To: autofs
Hello,
I am currently running autofs 3.1.7 from Fedora Core 1. I am trying to
upgrade to 4.1.0-beta2 from atrpms.
I recently switched to using ldap. I admit I dont understand it the way
I do NIS..but anyway. Here is what my "map" looks like:
auto.services:
/ fileserver:/export/services/&
a fileserver:/export2/a
b fileserver:/export2/b
c fileserver:/export2/c
d fileserver:/export2/d
This works fine under 3.1.7. With 4.1.0, cd'ing into
/services/<anything> results in /export2/b getting mounted. I can't
understand this at all.
Any thoughts on how to fix this or debug the problem?
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-07 4:34 Problem with autofs 3.1.7 -> 4.1.0-beta2 Michael Blandford
@ 2003-12-07 5:53 ` Ian Kent
2003-12-07 6:43 ` Michael Blandford
2003-12-07 9:14 ` H. Peter Anvin
2003-12-10 10:35 ` Ian Kent
1 sibling, 2 replies; 9+ messages in thread
From: Ian Kent @ 2003-12-07 5:53 UTC (permalink / raw)
To: Michael Blandford; +Cc: autofs
Sounds like a bug. I'll investigate.
On Sat, 6 Dec 2003, Michael Blandford wrote:
> Hello,
>
> I am currently running autofs 3.1.7 from Fedora Core 1. I am trying to
> upgrade to 4.1.0-beta2 from atrpms.
>
> I recently switched to using ldap. I admit I dont understand it the way
> I do NIS..but anyway. Here is what my "map" looks like:
>
> auto.services:
> / fileserver:/export/services/&
> a fileserver:/export2/a
> b fileserver:/export2/b
> c fileserver:/export2/c
> d fileserver:/export2/d
This looks like a NIS map. Shouldn't the / be a * in this case and
shouldn't the wildcard map entry come last. I thouht that the defined
behaviour of the wildcard map entry was that once it is encountered map
processing stops.
>
> This works fine under 3.1.7. With 4.1.0, cd'ing into
> /services/<anything> results in /export2/b getting mounted. I can't
> understand this at all.
It might be something to with the multi-mount code getting confused.
--
,-._|\ Ian Kent
/ \ Perth, Western Australia
*_.--._/ E-mail: raven@themaw.net
v Web: http://themaw.net/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-07 5:53 ` Ian Kent
@ 2003-12-07 6:43 ` Michael Blandford
2003-12-07 12:29 ` Ian Kent
2003-12-07 9:14 ` H. Peter Anvin
1 sibling, 1 reply; 9+ messages in thread
From: Michael Blandford @ 2003-12-07 6:43 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
>This looks like a NIS map. Shouldn't the / be a * in this case and
>shouldn't the wildcard map entry come last. I thouht that the defined
>behaviour of the wildcard map entry was that once it is encountered map
>processing stops.
>
>
>
Yes, I didnt know how to represent what was in ldap very well so I made
it look like it did in NIS.
If there is a good way to do an ldapsearch to show the exact config,
please show me the syntax and I would be happy to report that back.
According to the automount man page, the wildcard for ldap is a / so
that is what I was using. What I thought was odd was it was always
choosing the same thing and it *wasn't* the wildcard.
I didnt think there was ordering per say in the nis or ldap maps.
If my config is wrong, or if I cant do wildcards in this way, that is
fine. I just know it works differently between 3.1.7 and 4.1.0.
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-07 5:53 ` Ian Kent
2003-12-07 6:43 ` Michael Blandford
@ 2003-12-07 9:14 ` H. Peter Anvin
1 sibling, 0 replies; 9+ messages in thread
From: H. Peter Anvin @ 2003-12-07 9:14 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Ian Kent wrote:
>
> This looks like a NIS map. Shouldn't the / be a * in this case and
> shouldn't the wildcard map entry come last. I thouht that the defined
> behaviour of the wildcard map entry was that once it is encountered map
> processing stops.
>
Nope... especially not for non-file maps where there really is no such
thing as "order"...
-hpa
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-07 6:43 ` Michael Blandford
@ 2003-12-07 12:29 ` Ian Kent
2003-12-07 22:15 ` Michael Blandford
0 siblings, 1 reply; 9+ messages in thread
From: Ian Kent @ 2003-12-07 12:29 UTC (permalink / raw)
To: Michael Blandford; +Cc: autofs mailing list
On Sat, 6 Dec 2003, Michael Blandford wrote:
>
> If there is a good way to do an ldapsearch to show the exact config,
> please show me the syntax and I would be happy to report that back.
Which schema are you using the nisMap or automountMap.
I'll need an ldif example in order to duplicate the problem.
You should be able to do an ldapsearch -x and get the entire database. As
long as your /etc/openldap/ldap.conf specifies the BASE and HOST entries.
>
> According to the automount man page, the wildcard for ldap is a / so
> that is what I was using. What I thought was odd was it was always
> choosing the same thing and it *wasn't* the wildcard.
Think the code is incorrect.
>
> I didnt think there was ordering per say in the nis or ldap maps.
Yep. As Peter says my understanding is not right.
>
> If my config is wrong, or if I cant do wildcards in this way, that is
> fine. I just know it works differently between 3.1.7 and 4.1.0.
That's no good.
Wherever possible and relevant v3 and v4 should provide the same behavior
for any given configuration.
--
,-._|\ Ian Kent
/ \ Perth, Western Australia
*_.--._/ E-mail: raven@themaw.net
v Web: http://themaw.net/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-07 12:29 ` Ian Kent
@ 2003-12-07 22:15 ` Michael Blandford
0 siblings, 0 replies; 9+ messages in thread
From: Michael Blandford @ 2003-12-07 22:15 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs mailing list
Ian Kent wrote:
>Which schema are you using the nisMap or automountMap.
>
>
>
automountMap
>I'll need an ldif example in order to duplicate the problem.
>
>
>
Names are changed to protect the innocent.
# auto.master, kmaclub, com
dn: ou=auto.master,dc=kmaclub,dc=com
objectClass: top
objectClass: automountMap
ou: auto.master
# /services, auto.master, kmaclub, com
dn: cn=/services, ou=auto.master,dc=kmaclub,dc=com
objectClass: automount
automountInformation: ldap:ou=auto.services,dc=kmaclub,dc=com
cn: /services
# auto.services, kmaclub, com
dn: ou=auto.services,dc=kmaclub,dc=com
objectClass: top
objectClass: automountMap
ou: auto.services
# /, auto.services, kmaclub, com
dn: cn=/,ou=auto.services,dc=kmaclub,dc=com
objectClass: automount
automountInformation: fileserver:/export/services/&
cn: /
# mounta, auto.services, kmaclub, com
dn: cn=mounta,ou=auto.services,dc=kmaclub,dc=com
objectClass: automount
cn: mounta
automountInformation: fileserver:/export2/mounta
# mountb, auto.services, kmaclub, com
dn: cn=mountb,ou=auto.services,dc=kmaclub,dc=com
objectClass: automount
cn: mountb
automountInformation: fileserver:/export2/mountb
# mountc, auto.services, kmaclub, com
dn: cn=mountc,ou=auto.services,dc=kmaclub,dc=com
objectClass: automount
cn: mountc
automountInformation: fileserver:/export2/mountc
# mountd, auto.services, kmaclub, com
dn: cn=mountd,ou=auto.services,dc=kmaclub,dc=com
objectClass: automount
cn: mountd
automountInformation: fileserver:/export2/mountd
~
>>According to the automount man page, the wildcard for ldap is a / so
>>that is what I was using. What I thought was odd was it was always
>>choosing the same thing and it *wasn't* the wildcard.
>>
>>
>
>Think the code is incorrect.
>
>
>
I reloaded autofs-4.1.0-beta2 again today just to play. What I have
found is cd'ing into /services/asdlfjadalsdjfaklsdjf will also suceed
and give me a mount to fileserver:/export2/mountb even though the mount
should fail.
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-07 4:34 Problem with autofs 3.1.7 -> 4.1.0-beta2 Michael Blandford
2003-12-07 5:53 ` Ian Kent
@ 2003-12-10 10:35 ` Ian Kent
2003-12-11 4:59 ` Michael Blandford
1 sibling, 1 reply; 9+ messages in thread
From: Ian Kent @ 2003-12-10 10:35 UTC (permalink / raw)
To: Michael Blandford; +Cc: autofs
On Sat, 6 Dec 2003, Michael Blandford wrote:
> Hello,
>
> I am currently running autofs 3.1.7 from Fedora Core 1. I am trying to
> upgrade to 4.1.0-beta2 from atrpms.
>
> I recently switched to using ldap. I admit I dont understand it the way
> I do NIS..but anyway. Here is what my "map" looks like:
>
> auto.services:
> / fileserver:/export/services/&
> a fileserver:/export2/a
> b fileserver:/export2/b
> c fileserver:/export2/c
> d fileserver:/export2/d
>
> This works fine under 3.1.7. With 4.1.0, cd'ing into
> /services/<anything> results in /export2/b getting mounted. I can't
> understand this at all.
>
> Any thoughts on how to fix this or debug the problem?
Could you try this patch please.
I'll add it to my source rpm at kernel.org if it works OK for you.
You will need to grab a src rpm, build it, install the bin, got to the rpm
build directory and do make clean, apply the patch, and make then make
install. Be aware this will toast youre autofs init script, auto.master
and auto.net (if you have changed them.
diff -Nur autofs-4.1.0.orig/lib/cache.c autofs-4.1.0/lib/cache.c
--- autofs-4.1.0.orig/lib/cache.c 2003-12-09 23:13:37.000000000 +0800
+++ autofs-4.1.0/lib/cache.c 2003-12-10 17:57:10.000000000 +0800
@@ -148,11 +148,15 @@
int cache_update(const char *key, const char *mapent, time_t age)
{
- struct mapent_cache *me = NULL;
+ struct mapent_cache *s, *me = NULL;
char *pkey, *pent;
unsigned int hashval;
- if ((me = cache_lookup(key)) == NULL) {
+ for (s = mapent_hash[hash(key)]; s != NULL; s = s->next)
+ if (strcmp(key, s->key) == 0)
+ me = s;
+
+ if (me == NULL) {
me = (struct mapent_cache *) malloc(sizeof(struct mapent_cache));
if (me == NULL) {
return 0;
@@ -348,14 +352,11 @@
"cache_ghost: entry in %s not valid map format, key %s",
gc.mapname, gc.key);
} else if (match == LKP_WILD) {
- /* Wildcard must be last key in map */
if (*me->key == '/')
syslog(LOG_NOTICE,
"cache_ghost: wildcard map key not valid in direct map");
- else
- syslog(LOG_NOTICE,
- "cache_ghost: cannot ghost wildcard map key");
- break;
+ me = me->next;
+ continue;;
}
switch (match) {
--
,-._|\ Ian Kent
/ \ Perth, Western Australia
*_.--._/ E-mail: raven@themaw.net
v Web: http://themaw.net/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-10 10:35 ` Ian Kent
@ 2003-12-11 4:59 ` Michael Blandford
2003-12-11 6:45 ` Ian Kent
0 siblings, 1 reply; 9+ messages in thread
From: Michael Blandford @ 2003-12-11 4:59 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Ian Kent wrote:
>Could you try this patch please.
>
>I'll add it to my source rpm at kernel.org if it works OK for you.
>You will need to grab a src rpm, build it, install the bin, got to the rpm
>build directory and do make clean, apply the patch, and make then make
>install. Be aware this will toast youre autofs init script, auto.master
>and auto.net (if you have changed them.
>
>
>
I used this patch all day and haven't had any problems with it. It
seems good to me.
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with autofs 3.1.7 -> 4.1.0-beta2
2003-12-11 4:59 ` Michael Blandford
@ 2003-12-11 6:45 ` Ian Kent
0 siblings, 0 replies; 9+ messages in thread
From: Ian Kent @ 2003-12-11 6:45 UTC (permalink / raw)
To: Michael Blandford; +Cc: autofs
On Wed, 10 Dec 2003, Michael Blandford wrote:
> Ian Kent wrote:
>
> >Could you try this patch please.
> >
> >I'll add it to my source rpm at kernel.org if it works OK for you.
> >You will need to grab a src rpm, build it, install the bin, got to the rpm
> >build directory and do make clean, apply the patch, and make then make
> >install. Be aware this will toast youre autofs init script, auto.master
> >and auto.net (if you have changed them.
> >
> >
> >
>
> I used this patch all day and haven't had any problems with it. It
> seems good to me.
>
Thanks, I'll put it with the 4.1.0 tar and add it to the source rpm (that
will be a -2) at kernel.org.
--
,-._|\ Ian Kent
/ \ Perth, Western Australia
*_.--._/ E-mail: raven@themaw.net
v Web: http://themaw.net/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-12-11 6:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-07 4:34 Problem with autofs 3.1.7 -> 4.1.0-beta2 Michael Blandford
2003-12-07 5:53 ` Ian Kent
2003-12-07 6:43 ` Michael Blandford
2003-12-07 12:29 ` Ian Kent
2003-12-07 22:15 ` Michael Blandford
2003-12-07 9:14 ` H. Peter Anvin
2003-12-10 10:35 ` Ian Kent
2003-12-11 4:59 ` Michael Blandford
2003-12-11 6:45 ` Ian Kent
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.