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

Re: replication of multiple databases



Hi Daniel,

I think your problem really looks like the one described in ITS #2137 (see
http://www.openldap.org/its/index.cgi?findid=2137 for details)

A by-pass is to have an alias in /etc/hosts for your slave machine name
"slave.host", let's say "slavealias.host"
If you modify your conf the following way, it should work (only one replica
statement has been modified):

database        bdb
replica         host=slave.host:port
                binddn="cn=Replicator,ou=unit1,dc=company,dc=com"
                bindmethod= ...
replogfile      /path/to/my/single/replogfile
suffix          "cn=Replicator,ou=unit1,dc=company,dc=com"
...

database        bdb
replica         host=slavealias.host:port
                binddn="cn=Replicator,ou=unit1,dc=company,dc=com"
                bindmethod= ...
replogfile      /path/to/my/single/replogfile
suffix          "cn=Replicator,ou=unit2,dc=company,dc=com"
...

Hoping it will help

Bruno


----- Original Message -----
From: "Daniel Tiefnig" <openldap@qmail.infonova.at>
To: <openldap-software@OpenLDAP.org>
Sent: Friday, November 08, 2002 6:09 PM
Subject: replication of multiple databases


>
> Hi there,
>
> I've found something, that might be considered a bug, or maybe just
> "user error"(due to wrong configuration).
> AFAIK someone usually has to use one slurpd for each backend database to
> replicate. I'm now trying to replicate two databases, using just one
> slurpd. I'm doing thise merely by tricking slurpd into what I expect it
> to do.
>
> slapd.conf looks like that:
>
> database        bdb
> replica         host=slave.host:port
>                 binddn="cn=Replicator,ou=unit1,dc=company,dc=com"
>                 bindmethod= ...
> replogfile      /path/to/my/single/replogfile
> suffix          "cn=Replicator,ou=unit1,dc=company,dc=com"
> ...
>
> database        bdb
> replica         host=slave.host:port
>                 binddn="cn=Replicator,ou=unit1,dc=company,dc=com"
>                 bindmethod= ...
> replogfile      /path/to/my/single/replogfile
> suffix          "cn=Replicator,ou=unit2,dc=company,dc=com"
> ...
>
> Now, what i _expected_ was slurpd watching /path/to/my/single/replogfile
> until slapd writes something to it, then checking whether the entry
> belongs to a replica-configured database and doing the replication if
> so. What i _experienced_ now, was slurpd sending each update to one of
> the backends twice to the slave. (Not sure whether really _each_, but
> most of them at least.)
>
> If I remove the second replica directive in slapd.conf, everything wents
> fine, and both backends are replicated correctly. (It seems.)
> And that last thing is actually the part that I think shouldn't happen.
> AFAICT slurpd should ignore updates to ou=unit2, even if they are
> written to /path/to/my/single/replogfile. ("skipping foo (not mine)" or
> something like that, like it is done for replicas that are unknown by
> hostname or portnumber or so.)
>
> Comments? (I'm also interested whether I'll shoot myself into the foot
> anyway by planning the use of such a setup for a production
> environment.)
>
>
> lg,
> daniel