[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: one slapd to multiple backends LDAP
> At 14:21 07/12/01 +0100, Pierangelo Masarati a écrit:
>
> >You need to configure the proxies to point at the least common naming
> >context to spawn searches across the whole tree. This because the
> >appropriate database is selected based on the base of the request,
> >so if you have
> >
> ># database 1
> >suffix "ou=pers,dc=univ-nancy2,dc=fr"
> >
> ># database 2
> >suffix "ou=etudiants,dc=univ-nancy2,dc=fr"
> >
> >and you issue a search request with base "dc=univ-nancy2,dc=fr",
> >none of the databases will be selected.
>
> Thank's for the answer
>
> I have just done the following attempt:
>
> dc=univ-nancy2,dc=fr
> _________________|______________________________
> | |
> dc=univ-nancy2,dc=fr dc=univ-nancy2,dc=fr
> | |
> ou=pers ou=etudiants
>
> and my config is :
>
> database ldap
> uri ldap://neith.univ-nancy2.fr:395 # ou=pers,....
> suffix "dc=univ-nancy2,dc=fr"
>
>
> database ldap
> uri ldap://etumel.univ-nancy2.fr:392 # ou=etudiants,...
> suffix "dc=univ-nancy2,dc=fr"
>
> If I search :
> (uid=vmathieu) with the base dc=univ-nancy2.fr or ou=pers,dc=univ-nancy2,dc=fr, it works
>
> If I search :
> (uid=vmath999) with the base dc=univ-nancy2.fr or ou=etudiants,dc=univ-nancy2,dc=fr, it doesn' works
>
> vmathieu : uid=vmathieu,ou=People,ou=Pers,dc=univ-nancy2,dc=fr (in the first ldap database)
> vmath999: uid=vmath999,ou=MI,ou=PLG,ou=ETUDIANTS,dc=univ-nancy2,dc=fr (in the second database)
>
> It's as if only the first ldap database was treated
That's exactly what happens, because you did:
# database 1
suffix "dc=univ-nancy2,dc=fr"
# database 2
suffix "dc=univ-nancy2,dc=fr"
so your searches with base either "ou=pers,dc=univ-nancy2,dc=fr" or
"ou=etudiants,dc=univ-nancy2,dc=fr" are captured by the first
database, as "dc=univ-nancy2,dc=fr" is suffix for both bases.
>
>
> >You should try the (experimental) back-meta; it does exactly what
> >you expect.
>
> I am going to look
In this case, you will instruct one database, serving suffix
"dc=univ-nancy2,dc=fr" to look to different servers serving
the two subtrees, giving it a hint: if the search has base
"ou=pers,dc=univ-nancy2,dc=fr"
it will be forwarded to the appropriate server (the same will
apply to the other base). The striking difference is that a
search with base "dc=univ-nancy2,dc=fr" will be spawned to
both servers, and the results from both will be merged and
returned as one big result.
Let me know.