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

replication factored out of slapd

I have replication factored out in two overlays up and running right
now.  It's not 100% implemented, and it might get tricky at some point.
Most of all, the code is getting awful in terms of #ifdef's, so I'd like
to gather some consensus about this direction.

Basically, there are two overlays: "slurprov", which takes care of
logging modifications to replog, and "consumer", which takes care of
deciding whether a modification is to be accepted or not.

"slurprov" is a per-database overlay which allows to specify a replog, a
replica-argsfile, a replica-pidfile, a replicationinterval and multiple
replica instances.  There's little more to say.  A global replog is
allowed right now.

"consumer" is a global overlay.  It had to be local to allow mucking
with no-user-mod stuff and so.  When it's instantiated, it keeps track
of what databases are shadow, what updateref they have, and what type of
shadow they are.  Syncrepl shadows do not accept modifications (unless
"multimaster", I kept that code in place although I haven't tested it
yet).  Slurpd shadows can only be modified by the updatedn.  Moreover,
multimaster can be switched on via slapd.conf, if enabled at compile
time.  If stacked right before a global instance of the "chain" overlay,
it allows to write to a slave having the updateref chained to the

Both overlays support back-config in input; "slurprov" also in output,
while for "consumer" I have to work out an easy manner to allow a global
overlay to append entries below a database.

Right now, if the overlays are not compiled, the old code is used, so it
should be safe to commit them as they are now.  Only, the frontend code
that handles replication got quite hairy.

There might yet be issues with passwd exop, which I didn't test yet;
also, I haven't been able to cast slapo-refint and slapo-ppolicy into
this framework, essentially because I couldn't catch their logic at a
glance; I don't think it will be too hard to modify them accordingly. 

I'll play with these overlays a bit more and then commit to HEAD;
apologies if something won't work for a while.


Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it