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

mirror mode replication



Hello,

I am having two problems one i think an issue with mirrormode
replication, and two i think the docs might be are wrong for
mirrormode.

The openldap admin quide states :

MirrorMode node 1:

       # Global section
       serverID    1
       # database section

       # syncrepl directive
       syncrepl      rid=001
                     provider=ldap://ldap-sid2.example.com
                     bindmethod=simple
                     binddn="cn=mirrormode,dc=example,dc=com"
                     credentials=mirrormode
                     searchbase="dc=example,dc=com"
                     schemachecking=on
                     type=refreshAndPersist
                     retry="60 +"

       mirrormode on

MirrorMode node 2:

       # Global section
       serverID    2
       # database section

       # syncrepl directive
       syncrepl      rid=001
                     provider=ldap://ldap-sid1.example.com
                     bindmethod=simple
                     binddn="cn=mirrormode,dc=example,dc=com"
                     credentials=mirrormode
                     searchbase="dc=example,dc=com"
                     schemachecking=on
                     type=refreshAndPersist
                     retry="60 +"

       mirrormode on

I have configured something like this, and it does an initial
syncronise, but subsquent writes to "node 1" are not replicated to
node 2.

Eg. changes to data use "ldap.example.com" LDAP are always made to
node 1 (ldap://ldap-sid1.example.com), and only to node 2
(ldap://ldap-sid2.example.com) if node 1 is unavailable (via a content
switch).

When a change happens via node 1, i get :

Node 1 (seems to be correct):

Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 939789 local4.debug]
syncprov_sendresp: to=002,
cookie=rid=001,sid=001,csn=20090618004246.225914Z#000000#001#000000
Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 905511 local4.debug]
do_syncrep2: cookie=rid=001,sid=002,csn=20090618004246.225914Z#000000#001#000000
Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 977386 local4.debug]
syncrepl_entry: rid=001 LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_ADD)
Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 565591 local4.debug]
syncrepl_entry: rid=001 be_search (0)
Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 709484 local4.debug]
syncrepl_entry: rid=001
mail=user@popmail.example.com,jvd=popmail.example.com,o=hosting,dc=example,dc=com
Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 819441 local4.debug]
syncrepl_entry: rid=001 entry unchanged, ignored
(mail=user@popmail.example.com,jvd=popmail.example.com,o=hosting,dc=example,dc=com)
Jun 18 10:42:46 qgmlr01 slapd[492]: [ID 784563 local4.debug]
syncprov_matchops: skipping relayed sid 002

Node 2 (indicates a problem maybe):

Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 905511 local4.debug]
do_syncrep2: cookie=rid=001,sid=001,csn=20090618004246.225914Z#000000#001#000000
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 977386 local4.debug]
syncrepl_entry: rid=001 LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_MODIFY)
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 565591 local4.debug]
syncrepl_entry: rid=001 be_search (0)
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 709484 local4.debug]
syncrepl_entry: rid=001
mail=user@popmail.example.com,jvd=popmail.example.com,o=hosting,dc=example,dc=com
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 824931 local4.debug]
syncprov_matchops: skipping original sid 001
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 939789 local4.debug]
syncprov_sendresp: to=001,
cookie=rid=001,sid=002,csn=20090618004246.225914Z#000000#001#000000
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 933660 local4.debug]
syncrepl_entry: rid=001 be_modify
mail=sitescop@popmail.example.com,jvd=popmail.example.com,o=hosting,dc=example,dc=com
(0)
Jun 18 10:42:46 qgmlr02 slapd[12018]: [ID 824931 local4.debug]
syncprov_matchops: skipping original sid 001

I'm presuming it is wrong (correct me if i am wrong) as the second
change change from node 2 is coming in, using the same sid as node 1,
hence "skipping original sid 001"

In previous example configs, each mirrormode node has had two rid's,
001 for "node 1" and 002 for "node 2" so the protocol can tell which
node made the change, one node should accept the change as it came
from the other node, the other should reject it as it came from
itself.

FYI, The previous example was something like below (eg. node 1, same
for node 2 but with "serverID 2") :

       # Global section
       serverID    1
       # database section

       # syncrepl directive
       syncrepl      rid=001
                     provider=ldap://ldap-sid1.example.com
                     bindmethod=simple
                     binddn="cn=mirrormode,dc=example,dc=com"
                     credentials=mirrormode
                     searchbase="dc=example,dc=com"
                     schemachecking=on
                     type=refreshAndPersist
                     retry="60 +"

       syncrepl      rid=002
                     provider=ldap://ldap-sid2.example.com
                     bindmethod=simple
                     binddn="cn=mirrormode,dc=example,dc=com"
                     credentials=mirrormode
                     searchbase="dc=example,dc=com"
                     schemachecking=on
                     type=refreshAndPersist
                     retry="60 +"

       mirrormode on

Is this still required ? I thought mirrormode meant any node may be
updated, but typically always the same one (unless one fails).

Cheers
Brett