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

N-way multimaster replication with 2 masters

Hy again !

Still testing n-way multimaster replication with 2 masters.

I encountered a situation where my two masters where out of sync.

Here is the deal :

I have M1(serverID=1) & M2(serverID=2) synced and I am performing adds/modify to both M1 & M2.

1) I stop M2 and make a backup of it with slapcat.
2) I then restart M2.
3) I continue to make updates on M1 & M2.
4) I then stop (kill -INT PID) M2
5) I continue to make updates on M1
6) I then delete all *.bdb etc.. files from M2
7) I use the LDIF backup(see 1)) to restore M2 and then restart it.
8) restart M2
9) all entries modified/added during phase 5) are successfuly replicated to M2, but all entries modified/added on M2 dunring phase 3) are not replicated on M2.

This is because those entries have an entryCSN menchening that theses entries where last modified/created on M2
(ex: entryCSN: 20090219091852.789559Z#000000#002#000000)

So M1 doesn't send them back to M2 even though they aren't present on M2.

The trick I used to force M1 to send these entries to M2 is to change the serverID of M2. In fact, it is like setting up a whole new master. So I changed cn=config olcServerID from M1 before restarting M2 (before 8)) and I modify /appli/projects/m2/openldap_2.4.14/conf/slapd.d/cn=config.ldif also

This is the only way I found to make sure that M1 & M2 are really the same again.

Any other suggestions ? I didn't found anything in the documentation about that, maybe I missed-it.