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

RE: backglue



> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
> Sent: Saturday, December 08, 2001 7:33 AM

> I configuration syntax bothers me a bit...  (multiple databases
> with same suffixes).

> How about an alternative syntax:
>
> database ldbm
> suffix "ou=Alumni Association,ou=People,o=University of
> Michigan,c=US"	subordinate
> directory ./test-db/1
> rootdn "cn=Manager,o=University of Michigan,c=US"
> rootpw secret
>
> database ldbm
> suffix "o=University of Michigan,c=US"
> directory ./test-db/2
> rootdn "cn=Manager,o=University of Michigan,c=US"
> rootpw secret
>
> The extra keyword "subordinate" says glue the immediate superior
> database.  The keyword would also disable this suffix from being
> listed as a namingContext.

I've implemented this change, except that "subordinate" is its own config
keyword, and not an argument of the suffix keyword. Also the code will only
process the first suffix of any backend. The syntax you suggested implies
that for a backend with multiple suffixes, some suffixes could be
subordinates while others aren't.

The rationale for splitting and gluing is that a single database is too
large, so it doesn't make sense to me to handle multiple suffixes in a
single database anyway, so I only process the first suffix. The subordinate
keyword applies to the whole database, and there must be only one suffix per
subordinate database.

I've added a "noSubordinates" argument to select_backend(). For search
operations this arg is set non-zero. For all other operations (that can only
affect a single entry in a single database anyway) this arg is 0. When
noSubordinates is non-zero, select_backend will skip any backends marked
subordinate when searching for a match. This insures that subtree searches
are processed by the parent of a glued hierarchy.

The slap tools have been tweaked a little bit to deal with this as well. If
you specify a database number, you will operate on that database, just as
before. If you select a base suffix, and the corresponding backend is the
parent of a glued hierarchy, you will operate on the entire hierarchy. If
you don't select anything and let it use the default first database, if this
database is a subordinate, it will search until it finds a non-subordinate
instead. This allows you to operate on specific databases as needed, but
otherwise will automatically process glued databases.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support