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

CSN too old, ignoring, N-way multi-master replication



I'm starting a new thread to make it easier to understand my problem.

I'm testing N-way multimaster replication with OpenLDAP 2.4.13.

I'm able to successfully import data into an instance and have my two
masters to sync correctly but then when I try to add a new entry in one
of the two masters, I'm getting strange messages :

let's say we have m1 & m2 (m1 & m2 are on the same server):
I initial import data into m1, it is successfully imported into m2 (at least it looks like it).
Then I'm trying to add an entry on m2 (cn=adrien-externe.futschik@edfgdf.fr,ou=personnes,o=edfgdf,c=fr). I'm getting strange message on m1 & m2 :

m1 log :(repetitively)
[...]
Entry ou=administrateurs,o=gazdefrance,c=fr CSN
20081224125950.481561Z#000000#001#000000 older or equal to ctx
20081224125950.481561Z#000000#001#000000
Entry cn=adrien-externe.futschik@edfgdf.fr,ou=personnes,o=edfgdf,c=fr
changed by peer, ignored
syncprov_search_response:

cookie=rid=004,sid=002,csn=20081224125950.481561Z#000000#001#000000;20081224130148.522455Z#000000#002#000000
do_syncrep2: rid=005 LDAP_RES_SEARCH_RESULT
[...]

m2 log : (repetitively)
[...]
master where I added an entry :
do_syncrep2: rid=004 LDAP_RES_INTERMEDIATE - SYNC_ID_SET
do_syncrep2: rid=004 LDAP_RES_SEARCH_RESULT
do_syncrep2:

cookie=rid=004,sid=002,csn=20081224125950.481561Z#000000#001#000000;20081224130148.522455Z#000000#002#000000
[...]

Is this a bug ? Am-I doing something wrong ?

If I add the same entry to m1 and not m2 I get the following messages :

on m2 :
syncrepl_entry: rid=004 LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_ADD)
syncrepl_entry: rid=004 be_search (0)
syncrepl_entry: rid=004
cn=adrien-externe.futschik@edfgdf.fr,ou=personnes,o=edfgdf,c=fr
<= bdb_equality_candidates: (entryCSN) not indexed
<= bdb_inequality_candidates: (entryCSN) not indexed
<= bdb_inequality_candidates: (entryCSN) not indexed
syncprov_search_response:
cookie=rid=005,sid=001,csn=20081224132158.749532Z#000000#001#000000
syncrepl_entry: rid=004 be_add (0)
do_syncrep2: rid=004 LDAP_RES_SEARCH_RESULT
do_syncrep2:
cookie=rid=004,sid=002,csn=20081224132238.790862Z#000000#001#000000
<= bdb_inequality_candidates: (entryCSN) not indexed
nonpresent_callback: rid=004 present UUID
96268508-6609-102d-9d8e-9742e72db399, dn c=fr
nonpresent_callback: rid=004 present UUID
962af700-6609-102d-9d8f-9742e72db399, dn o=edfgdf,c=fr
nonpresent_callback: rid=004 present UUID
962bd698-6609-102d-9d90-9742e72db399, dn ou=personnes,o=edfgdf,c=fr
nonpresent_callback: rid=004 present UUID
962c00b4-6609-102d-9d91-9742e72db399, dn ou=appli,o=edfgdf,c=fr
nonpresent_callback: rid=004 present UUID
962c2634-6609-102d-9d92-9742e72db399, dn ou=groupes,o=edfgdf,c=fr
nonpresent_callback: rid=004 present UUID
962ca492-6609-102d-9d93-9742e72db399, dn ou=administrateurs,o=edfgdf,c=fr
nonpresent_callback: rid=004 present UUID
962cce90-6609-102d-9d94-9742e72db399, dn o=edf,c=fr
nonpresent_callback: rid=004 present UUID
962d7138-6609-102d-9d95-9742e72db399, dn ou=personnes,o=edf,c=fr
nonpresent_callback: rid=004 present UUID
962d96f4-6609-102d-9d96-9742e72db399, dn ou=appli,o=edf,c=fr
nonpresent_callback: rid=004 present UUID
962deafa-6609-102d-9d97-9742e72db399, dn ou=groupes,o=edf,c=fr
nonpresent_callback: rid=004 present UUID
962ef026-6609-102d-9d98-9742e72db399, dn ou=administrateurs,o=edf,c=fr
nonpresent_callback: rid=004 present UUID
962f156a-6609-102d-9d99-9742e72db399, dn o=gazdefrance,c=fr
nonpresent_callback: rid=004 present UUID
962fca8c-6609-102d-9d9a-9742e72db399, dn ou=personnes,o=gazdefrance,c=fr
nonpresent_callback: rid=004 present UUID
962fef76-6609-102d-9d9b-9742e72db399, dn ou=appli,o=gazdefrance,c=fr
nonpresent_callback: rid=004 present UUID
9630106e-6609-102d-9d9c-9742e72db399, dn ou=groupes,o=gazdefrance,c=fr
nonpresent_callback: rid=004 present UUID
9630bfa0-6609-102d-9d9d-9742e72db399, dn
ou=administrateurs,o=gazdefrance,c=fr
nonpresent_callback: rid=004 present UUID
ae0e93d6-6609-102d-9d9e-9742e72db399, dn
cn=adrien-externe.futschik@edfgdf.fr,ou=personnes,o=edfgdf,c=fr
slap_queue_csn: queing 0x843fef0 20081224132238.790862Z#000000#001#000000
slap_graduate_commit_csn: removing 0x83d6410
20081224132238.790862Z#000000#001#000000

on m1 :
slap_queue_csn: queing 0x1df3860 20081224132238.790862Z#000000#001#000000
slap_graduate_commit_csn: removing 0x9703700
20081224132238.790862Z#000000#001#000000
<= bdb_equality_candidates: (entryCSN) not indexed
<= bdb_inequality_candidates: (entryCSN) not indexed
Entry ou=administrateurs,o=gazdefrance,c=fr CSN
20081224132158.749532Z#000000#001#000000 older or equal to ctx
20081224132158.749532Z#000000#001#000000
syncprov_search_response:
cookie=rid=004,sid=002,csn=20081224132238.790862Z#000000#001#000000
do_syncrep2: rid=005 LDAP_RES_INTERMEDIATE - SYNC_ID_SET
do_syncrep2: rid=005 LDAP_RES_SEARCH_RESULT
do_syncrep2:
cookie=rid=005,sid=001,csn=20081224132158.749532Z#000000#001#000000

Here is the entry I'm adding :

dn: cn=adrien-externe.futschik@edfgdf.fr,ou=personnes,o=edfgdf, c=fr
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetorgPerson
objectclass: ditPerson
cn: adrien-externe.futschik@edfgdf.fr
sn: Futschik
givenName: Adrien
uid: adrien-externe.futschik@edfgdf.fr
mail: adrien-externe.futschik@edfgdf.fr
telephonenumber: 0123456789
userpassword: {SSHA}GuU6CMRoOxp9EA1ANafzuRUXADKlBA0r
allowedServices: appli20

pretty simple isn't it ? What's going wrong ?

You'll find in attachment the script I'm using to set up the replication (modified version of test050-syncrepl-multimaster).

Here is the config :
initialization of m1 :
dn: cn=config
objectClass: olcGlobal
cn: config
olcServerID: 1

dn: olcDatabase={0}config,cn=config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcRootPW: ${PASSWD}

initialization of m2 :
dn: cn=config
objectClass: olcGlobal
cn: config
olcServerID: 2

dn: olcDatabase={0}config,cn=config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcRootPW: ${PASSWD}

syncprov overlay on m1 :
dn: cn=config
changetype: modify
replace: olcServerID
olcServerID: 1 $URI1
olcServerID: 2 $URI2

dn: olcOverlay=syncprov,olcDatabase={0}config,cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcSyncProvConfig
olcOverlay: syncprov

dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcSyncRepl
olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
 credentials=secret searchbase="cn=config" type=refreshAndPersist
 retry="5 5 300 5" timeout=3
olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
 credentials=secret searchbase="cn=config" type=refreshAndPersist
 retry="5 5 300 5" timeout=3
-
add: olcMirrorMode
olcMirrorMode: TRUE


syncrepl on m2:
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcSyncRepl
olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
 credentials=secret searchbase="cn=config" type=refreshAndPersist
 retry="5 5 300 5" timeout=3
olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
 credentials=secret searchbase="cn=config" type=refreshAndPersist
 retry="5 5 300 5" timeout=3
-
add: olcMirrorMode
olcMirrorMode: TRUE

schema on m1:
include: file://$ABS_SCHEMADIR/core.ldif
include: file://$ABS_SCHEMADIR/cosine.ldif
include: file://$ABS_SCHEMADIR/inetorgperson.ldif
include: file://$ABS_SCHEMADIR/openldap.ldif
include: file://$ABS_SCHEMADIR/nis.ldif
include: file://$ABS_SCHEMADIR/corba.ldif
include: file://$ABS_SCHEMADIR/java.ldif
include: file://$ABS_SCHEMADIR/misc.ldif
include: file://$ABS_SCHEMADIR/nds.ldif
include: file://$ABS_SCHEMADIR/dit.ldif

database en m1:
dn: olcDatabase={1}$BACKEND,cn=config
objectClass: olcDatabaseConfig
objectClass: olc${BACKEND}Config
olcDatabase: {1}$BACKEND
olcSuffix: $BASEDN
olcDbDirectory: ./openldap-data
olcRootDN: $MANAGERDN
olcRootPW: ${PASSWD}
olcDbIndex: default pres,eq
olcDbIndex: cn,sn pres,eq,sub
olcDbIndex: objectClass,seeAlso,entryUUID eq
olcDbIndex: mail,givenName,uid pres,eq,sub
olcSyncRepl: rid=004 provider=$URI1 binddn="$MANAGERDN" bindmethod=simple
 credentials=secret searchbase="$BASEDN" type=refreshOnly
 interval=$INTERVAL retry="5 5 300 5" timeout=3
olcSyncRepl: rid=005 provider=$URI2 binddn="$MANAGERDN" bindmethod=simple
 credentials=secret searchbase="$BASEDN" type=refreshOnly
 interval=$INTERVAL retry="5 5 300 5" timeout=3
olcMirrorMode: TRUE

dn: olcOverlay=syncprov,olcDatabase={1}${BACKEND},cn=config
changetype: add
objectClass: olcOverlayConfig
objectClass: olcSyncProvConfig
olcOverlay: syncprov

After that I populate m1 with attached arbre.ldif.

Thanks in advance.

Adrien

Attachment: build-master-replication
Description: Binary data

dn: c=fr
objectclass: top
objectclass: country
c: fr

# dn: cn=admin,c=fr
# objectclass: top
# objectclass: person
# cn: admin
# sn: admin
# description: Administrateur technique de l'annuaire
# userpassword: {SSHA}GuU6CMRoOxp9EA1ANafzuRUXADKlBA0r

# premiere branche de l'annuaire
dn: o=edfgdf,c=fr
objectclass: top
objectclass: organization
o: edfgdf

dn: ou=personnes,o=edfgdf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: personnes

dn: ou=appli,o=edfgdf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: appli

dn: ou=groupes,o=edfgdf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: groupes
#description : Groupes de personnes de l'organisation EDFGDF

dn: ou=administrateurs,o=edfgdf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: Administrateurs
#description : Administrateurs fonctionnels de l'organisation EDFGDF

# deuxieme branche de l'annuaire
dn: o=edf,c=fr
objectclass: top
objectclass: organization
o: edf

dn: ou=personnes,o=edf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: personnes

dn: ou=appli,o=edf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: appli

dn: ou=groupes,o=edf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: groupes
#description : Groupes de personnes de l'organisation EDF

dn: ou=administrateurs,o=edf,c=fr
objectclass: top
objectclass: organizationalUnit
ou: Administrateurs
#description : Administrateurs fonctionnels de l'organisation EDF


# troisieme branche de l'annuaire
dn: o=gazdefrance,c=fr
objectclass: top
objectclass: organization
o: gazdefrance

dn: ou=personnes,o=gazdefrance,c=fr
objectclass: top
objectclass: organizationalUnit
ou: personnes

dn: ou=appli,o=gazdefrance,c=fr
objectclass: top
objectclass: organizationalUnit
ou: appli

dn: ou=groupes,o=gazdefrance,c=fr
objectclass: top
objectclass: organizationalUnit
ou: groupes
#description : Groupes de personnes de l'organisation Gaz de France

dn: ou=administrateurs,o=gazdefrance,c=fr
objectclass: top
objectclass: organizationalUnit
ou: Administrateurs
#description : Administrateurs fonctionnels de l'organisation Gaz de France