[Date Prev][Date Next]
> -----Original Message-----
> From: Hallvard B Furuseth [mailto:firstname.lastname@example.org]
> I wrote:
> > Note that slapd.conf is read after the -u and -r options are processed,
> > which is done after listener URLs are opened (becuase that must be done
> > as root). So you'd have to put those options in some new config file
> > which is read earlier than slapd.conf.
> Duh... I forgot that since -u and -r have already been processed by the
> parent slapd, the child slapd won't see that file.
> So you could just as well put the new options in slapd.conf, which
> is read late, so you can't move many options there. Unless you do
> a major rewrite of slapd.conf processing.
I was heading there, but wasn't ready to discuss it yet. I have a
rewrite of config.c that I've been playing with. The main thing it does is
centralize argc validation into one place, so error messages about missing or
too many arguments is consolidated. This makes the messages more uniform and
reduces the typos that creep into all the repetitive Debug statements.
The other reason I went here was to allow the creation of a back-config
that provides an LDAP interface to slapd.conf. I use a single rdwr lock in
front end, all operations obtain a readlock. When back-config wants to update
something it releases its readlock and tries to obtain a writelock. It's
to allow adding of new configuration parameters - add new schema definitions,
add new ACLs. Even add new backends, I suppose. It's more difficult to allow
editing or removal of existing config info, and I probably won't get that
any time soon.
The table-driven structure allows back-config and config.c to share some
code. back-config has a hardwired DIT, and I'm still juggling it around. I
treat it very simply, with one object per config file, and just return each
as one value of a large multivalued attribute. In this case I just have to
"include" directives when constructing the tree. I'd prefer to try and be
about it, and break it up into an entry for global directives, and children
each database. But for update purposes I still want to know that some
came from some specific config file, not sure how this should be represented.
But as I said, that's a discussion for another time.
For now, soft-restart behavior:
The main intent is to allow starting a new instance of slapd without
existing clients. Since a new instance is executing, it will be possible to
a completely new slapd.conf, and thus modify any/all operating behavior -
databases, upgrade binaries/libraries, everything.
There's some unresolved issues re: commandline options vs configfile options.
There is no way to provide new commandline args to the new slapd instance. My
first thought here is that we then need to add configfile options to control
anything that we might want to change from the initial commandline. But this
for some odd behaviors...
Typically, if a feature can be specified in both a config file and on the
command line, the commandline would override the config file. Currently in
there is very little overlap between what can be specified on the command
and in the config file. Here's the list of slapd commandline options:
-4 IPV4 only
-6 IPv6 only
-d debug level
-f config file
-g group to run as
-h urls to listen to
-l syslog facility
-n service name
-r chroot path
-s syslog level
-t test config and exit
-u uid to run as
The -f and -t options obviously make no sense as configfile keywords. -g, -u,
are handled before the config file is opened, and I think it would get too
to provide these as config keywords.
For -s, there is in fact a "loglevel" config keyword that does the same
is implemented badly I think; since the config file is parsed after argv, the
keyword always overrides the -s commandline argument.
I think it would be useful to provide config keywords for the remaining
-4, -6, -d, -h, -l, -n but I haven't yet looked at what restructuring might
Also in a soft-restart scenario there's yet another ambiguity - I might want
respecify my listeners for a restart. I can only change parameters in the
In this case, I want the config file to override any propagated arguments.
listener URLs that were unchanged to remain open, listener URLs that
should be closed, and listener URLs that weren't present before should be
Hm, perhaps, for soft-restarts slapd should just reread the slapd.args file
a previous invocation. If you didn't configure it to write the slapd.args
then there is no way to modify the behavior. If you did configure it, then
can edit slapd.args to tweak behavior. That could be workable...
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support
- Re: gentlehup
- From: Hallvard B Furuseth <email@example.com>