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

Re: requesting clarification of slapd.conf-versus-slapd.d configuration



On Thu, 20 Apr 2006, Howard Chu wrote:

>Regardless of any existing config directory, when both flags are
>specified, the slapd.conf file is read and written out in config
>directory format. If there were any other conditions on the behavior, it
>would say so. Since there is not, it does not.

With OpenLDAP 2.3.21, if I change the 'dbconfig shm_key #' in slapd.conf
and then restart slapd with both '-f' and '-F' the
slapd.d/cn=config/olcDatabase{1}bdb.ldif file does not get updated and a
new DB_CONFIG file is not generated.  It seems like when a valid config
directory exists the '-f' option isn't being considered.  I can't seem to
find any change I can make to the slapd.conf file or the slapd.d files
that make a difference as to whether slapd.d gets generated again.  Are
other people having different experiences or should I do some more digging
and open an ITS?

Actually, I seem to be having a variety of problems.  I imagine I'll have
to poke around with this a little while to see what all is going on...

>> 'ldapsearch -b cn=config'?  I figure there are fundamental problems with
>> the notion of a 'slapadd -l config.ldif' but functionality to convert ldif
>> to slapd.d the way slapd.conf is converted to slapd.d by specifying both
>> -f and -F should be reasonably simple.  Maybe some code to handle a
>> '-L config.ldif'?  Is this already done or underway or would such a
>> contribution be in line with the current road-map?
>
>Already done. Just do "slapadd -n0 -l config.ldif"

Maybe I'm missing something.  Not only does that not work for me, but I
can't see how it would without code to notice the absence of a config
directory.  Or maybe it would work fine if there were already a valid
config in place, but it doesn't seem to work for bootstrapping a config.

Wouldn't "slapadd -n0 -l config.ldif" try to open database 0 specified in
the default config file before ever parsing config.ldif?  What I'm getting
at is that it would be nice to simply say

"slapadd -F new/slapd.d -l config.ldif"

and construct a config directory from scratch in 'new/slapd.d' to
boot-strap a new directory.  I'm still unclear as to whether slapd.conf is
destined to go away completely, but if it is then being able to boot-strap
in this way would be a lot more convenient than building the config in
back-ldif format.  But slapadd would need to know that the ldif file it is
given is to be parsed before trying to open any databases and to ignore
the default behavior of looking for a default config directory followed by
looking for a default config file when neither '-f' nor '-F' is specified.

-- 
Eric Irrgang - UT Austin ITS Unix Systems - (512)475-9342