Openldap 3-way multi-master (delta-syncrepl)

Servers, Versions

This is a test setup with 3 VMs running on the same host:

Versions:

Issues and questions:

1. Endless replication loop after fast subsequent modifications

Is this observation normal behaviour?

While testing subsequent ldapmodifys of the same attribute of the same DN object on one host, we noticed that the replication will get in an endless loop when subsequent modifications occur too fast after each other, for example:

2. Occasionally slapd hangs on shutdown

Occasionally when restarting/stopping the slapd service (using systemctl restart/stop slapd), the process just hangs with 100% CPU load.
Only a kill -9 <PID> helps. In the logs it states that slapd is waiting for some tasks: slapd shutdown: waiting for 2 operations/tasks to finish.

3. Occasionally slapd dies when another master is restarted

Occasionally when making an update using ldapmodify and after that restarting slapd on the same host,
it can happen that a slapd process on one of the other masters just dies away (with nothing in the error log).

4. Unwilling (53) slapd after service restart

Can the following symptoms safely be ignored?

This seems to be a temporary hickup under some circumstances, and fixes itself after another ldapmodify on the unwillig slapd.
We did the following:

do_syncrep2: rid=004 (53) Server is unwilling to perform

5. Is n-way multi-master using delta-syncrepl supported?

"Delta Replication (Accesslog) using OLC: This example assumes a Master (provider) of ldap1.example.com and a Slave (consumer) of ldap2.example.com. It could, of course, be equally applicable in a N-way multi-master configuration at the expense of some added complexity (though it is not - as of 2.4.35 - currently supported for N-Way multi-mastering)."

Setup procedure

Our setup procedure is as follows:

Set up the initial master slapd

openldap 16316 1 0 16:23 ? 00:00:00 /usr/sbin/slapd -h ldap:/// ldaps:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d
/usr/bin/ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/dphys.ldif
^createTimestamp
^creatorsName
^structuralObjectClass
^entryUUID
^entryCSN
^modifiersName
^modifyTimestamp
/usr/bin/ldapadd -Y EXTERNAL -H ldapi:/// -f /root/dump.ldif

Set up the additional slapd masters (one after each other):

/usr/sbin/slapcat -n 0 -l /etc/ldap/config/config.ldif
rm -r /etc/ldap/slapd.d
mkdir /etc/ldap/slapd.d
rm /var/lib/ldap/data.mdb
rm /var/lib/ldap/lock.mdb
mkdir /var/lib/ldap/deltalog
chown -R openldap:openldap /var/lib/ldap
/usr/sbin/slapadd -F /etc/ldap/slapd.d/ -n 0 -l /etc/ldap/config/config.ldif
chown -R openldap:openldap /etc/ldap/slapd.d


Author: Sven Mäder
Department: ISG D-PHYS ETH Zurich
Contact: ISG Homepage
Last modified: Tue Jul 18 09:29:54 CEST 2017
Copyright 2017 Sven Mäder