This is a test setup with 3 VMs running on the same host:
000
: phd-aa1 (initial master)001
: phd-aa2002
: phd-aa3Versions:
Is this observation normal behaviour?
While testing subsequent ldapmodify
s 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:
A
of cn=00000,ou=tt,dc=phys,dc=ethz,dc=ch
on phd-aa1A
of cn=00000,ou=tt,dc=phys,dc=ethz,dc=ch
on phd-aa1slapd
s are somehow in a loop, sending cookies foreverslapd
s helps to kill the loopslapd
s was nessecary to kill the loopslapd
hangs on shutdownOccasionally 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
.
slapd
dies when another master is restartedOccasionally 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).
slapd
after service restartCan 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:
000
): initial master001
): replicates all data002
): replicates all dataldapmodify
an attribute on each master separately: all syncing correctlyrid=004
) is unwilling:do_syncrep2: rid=004 (53) Server is unwilling to perform
slapd
on phd-aa3: now this one starts reporting the same.retry
parameter interval, logging the error above on each cycle.slapd
s are still syncing correctly though.ldapmodify
on phd-aa1 the error message above is gone and all logs look ok."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)."
Our setup procedure is as follows:
slapd
(installed using apt
) with this config.systemctl
, output of ps -ef
when running: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
cn=config
) configured for replication: using syncrepl (no delta-syncrepl)dc=phys,dc=ethz,dc=ch
) configure for replication using delta-syncrepl (accesslog: cn=deltalog)slapd
as backend/usr/bin/ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/dphys.ldif
slapcat
. Remove the following lines in the dump:^createTimestamp
^creatorsName
^structuralObjectClass
^entryUUID
^entryCSN
^modifiersName
^modifyTimestamp
slapd
initial master:/usr/bin/ldapadd -Y EXTERNAL -H ldapi:/// -f /root/dump.ldif
slapd
on the initial master (maybe not nessecary), dump the slapd
config using:/usr/sbin/slapcat -n 0 -l /etc/ldap/config/config.ldif
slapd
on the initial master and transfer the config.ldif to the other masters.slapd
using apt
and stop slapd
.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
slapd