[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: question about the meta backend

> Hi, I have a question about using the meta backend to join two or more
> directories when whey have the same structure.
> Take for example to directories that have both have group named "group1"
> and after suffixmassage they will both have
> the same dn.
> dir1
> objectclass=groupOfNames
> dn="cn=group1,ou=groups,ou=osca,dc=mycompany,dc=com"
> dir2
> objectclass=groupOfNames
> dn="cn=group1,ou=groups,ou=osca,dc=mycompany,dc=org"

Here the namingContexts differ; I assume the above are __before__ massaging.

> What does openldap do when this situation arises? Does it just use the one
> from the first
> directory that it was found?

Actually, it uses both in an unpredictabel manner; for instance, a search
would return both fifo, and it's the client's responsibility to deal with
them.  Other operations will behave in an unpredictable manner.  It is the
administrator's responsibility to arrange things to avoid this type of
problems, and that's where massaging comes into play.

Note that code in HEAD is getting much more strict about these cases; for
instance, write operations now check that the entry beng written is unique
within the meta-DSA.  This check is done by running searches, so it relies
on targets allowing enough access, so YMMV.

> Can it be told to merge all of the objects
> with the same dn
> into one object containing the attributes of all?

No.  In principle, you could design a layer that does this; the
translucent overlay does something similar; the point is that to be able
to do it consistently for distributed systems, all search results should
be temporarily stored and merged until the very end before any results can
be returned.  Another issue is that write operations would be very
difficult, since back-meta should know how to split attributes and values
among the targets.  Of course one can figure out many ways to do it, but
it would get very implementation specific.


Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497