hello,
I wanted to synchronize 2 branches of a master DB (slapd-2.4.38). So I created 2 olcSyncrepl on the slave :
olcSyncrepl: {0}rid=201 provider=ldap://master searchbase="cn=branch1,suffixDB" scope=sub olcSyncrepl: {1}rid=202 provider=ldap://master searchbase="cn=branch2,suffixDB" scope=sub
Unfortunatly, it doesn't work. A change on branch2 on the master produces often a "CSN too old" on the slave.
After investigating, it seems that the pb comes from the fact there is one contextCSN by DB. So if the sync task on branch1 is the first to process, it updates the contextCSN and therefore the sync task on branch2 thinks that change is not newer. Am I right ?
So is there a proper way to achieve what I want ?
Thank for any hints,
julien soula wrote:
I wanted to synchronize 2 branches of a master DB (slapd-2.4.38). So I created 2 olcSyncrepl on the slave :
olcSyncrepl: {0}rid=201 provider=ldap://master searchbase="cn=branch1,suffixDB" scope=sub olcSyncrepl: {1}rid=202 provider=ldap://master searchbase="cn=branch2,suffixDB" scope=sub
Unfortunatly, it doesn't work. A change on branch2 on the master produces often a "CSN too old" on the slave.
Are cn=branch1,suffixDB and cn=branch2,suffixDB in separate databases on the consumer?
If not, you probably rather want to use an extensible filter in a *single* syncrepl statement like this:
(|(entryDN=suffixDB)(entryDN:dnSubtreeMatch:=cn=branch1,suffixDB)(entryDN:dnSubtreeMatch:=cn=branch2,suffixDB))
Note that it's quite likely to shoot yourself in the foot with partial replication.
Ciao, Michael.
julien soula wrote:
hello,
I wanted to synchronize 2 branches of a master DB (slapd-2.4.38). So I created 2 olcSyncrepl on the slave :
olcSyncrepl: {0}rid=201 provider=ldap://master searchbase="cn=branch1,suffixDB" scope=sub olcSyncrepl: {1}rid=202 provider=ldap://master searchbase="cn=branch2,suffixDB" scope=sub
Unfortunatly, it doesn't work. A change on branch2 on the master produces often a "CSN too old" on the slave.
After investigating, it seems that the pb comes from the fact there is one contextCSN by DB. So if the sync task on branch1 is the first to process, it updates the contextCSN and therefore the sync task on branch2 thinks that change is not newer. Am I right ?
So is there a proper way to achieve what I want ?
You have two "masters" for this DB, therefore you must configure the providers as multimaster providers - they must each have a unique serverID.
Howard Chu wrote:
julien soula wrote:
hello,
I wanted to synchronize 2 branches of a master DB (slapd-2.4.38). So I created 2 olcSyncrepl on the slave :
olcSyncrepl: {0}rid=201 provider=ldap://master searchbase="cn=branch1,suffixDB" scope=sub olcSyncrepl: {1}rid=202 provider=ldap://master searchbase="cn=branch2,suffixDB" scope=sub
Unfortunatly, it doesn't work. A change on branch2 on the master produces often a "CSN too old" on the slave.
After investigating, it seems that the pb comes from the fact there is one contextCSN by DB. So if the sync task on branch1 is the first to process, it updates the contextCSN and therefore the sync task on branch2 thinks that change is not newer. Am I right ?
So is there a proper way to achieve what I want ?
You have two "masters" for this DB, therefore you must configure the providers as multimaster providers - they must each have a unique serverID.
Never mind this - if both consumers are pointed at the same provider you obviously can't use different serverIDs. Use the extended filter as Michael or Abdelhamid suggested.
openldap-technical@openldap.org