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

Re: n-way replication question

Dieter Kluenter wrote:
Gavin Henry <ghenry@OpenLDAP.org> writes:

Dieter Kluenter wrote:
Holger Kaelberer <Holger.Kaelberer@telefonica.de> writes:


Dieter Kluenter wrote:

What is your configuration on all servers?  In detail, what's the
value of the serverID statements, of the syncrepl statements and
what's the URI you're running them with?
Solved it, silly me!
The initial slapd.conf should only contain one serverID statement
without any additional address, only after starting all peers the
serverID has to be modified to include all participating peers.

seems that I had exactly the same problem when setting up
multimaster-repl. By trial and error I solved it by only defining one
serverID on each host:

# master1
serverID 1

# master2
serverID 2

With this setting multimaster-repl seems to work correctly.

As I don't understand exactly how this statement affects
multimaster-replication my question is, whether it is ok to do so or
do I *need* to define all serverID as

serverID NUM URL

on all participating master.
If one thinks about it, it is obvious that each participating peer
to be informed about its sid, as other peers are not participating
prior to the initial setup, its only one sid.
After starting all peers, they have to be informed about all
particiating sids, that is prior to adding any data the sids have to
be anounced. So my initial configuration was as you described above.
After the initial setup I added all sids with a small shell script,
copied from test050,
$LDAPMODIFY -x -D cn=config -H $HOST -w $CPW <<EOF
dn: cn=config
changetype: modify
replace: olcServerID
olcServerID: 1 $URL1
olcServerID: 2 $URL2
Now the contextCSN looks like
contextCSN: 20081022192158.873555Z#000000#001#000000
contextCSN: 20081022184543.202017Z#000000#002#000000
note the different sids 001, 002. ContextCSN, that is time + sid,
indicate which peer modified the database last.

I pretty sure this is what test50 does at

When we add 1 $URL1 etc. it's after the server has already been

I will rewrite this section. If using slapd.conf, would we need to add
this after slapd has been started and restart the masters then?

If you use slapd.conf, at the initial setup of each peer, only a single 'serverID' without URI has to be configured, after the start of all particating peers, you modify cn=config to add the other serverID plus adding URI, if applicable. You don't have to restart any participating server.


Obviously that's the way on the fly, but I meant for users who are still using slapd.conf and don't want to use cn=config (for whatever reasons).

Kind Regards,

Gavin Henry.
OpenLDAP Engineering Team.

E ghenry@OpenLDAP.org

Community developed LDAP software.