Hello,
I feel a little bit spaming this list, but still - how to setup multi-master? Reading http://www.zytrax.com/books/ldap/ch7/#ol-syncrepl http://www.openldap.org/doc/admin24/replication.html gave me impression that simply adding serverID in global (above database) section, syncrepl and overlay syncprov in database section should give me multi master setup. THis did worked - meaning I got the same data on both servers, but I couldn't make updates to either of servers. Google says absolutely nothing about that. The error is "shadow context; no update referral at ..." Adding updateref directive to conf file seemed to me wrong, because multi master is meant to be multi write nodes setup, so I didn't tried that. After about four hours of searching for any full working example of multi-master implementation I decided to put mirror mode true on both servers at the end of conf file - that did the trick. So do I need add mirror mode or not? It is not clear the difference of multi-master and mirror mode, which I asked on different message. I didn't tried setting mirror mode false and see if updates are working, but if this is what I missed, then it is very strange, that official administrators guide is missing such a key point.
Thanks a lot if anybody would explain my mistakes Liutauras
Hi,
"Liutauras Adomaitis" liutauras.adomaitis@gmail.com writes:
Hello,
I feel a little bit spaming this list, but still - how to setup multi-master? Reading http://www.zytrax.com/books/ldap/ch7/#ol-syncrepl http://www.openldap.org/doc/admin24/replication.html gave me impression that simply adding serverID in global (above database) section, syncrepl and overlay syncprov in database section should give me multi master setup. THis did worked - meaning I got the same data on both servers, but I couldn't make updates to either of servers. Google says absolutely nothing about that. The error is "shadow context; no update referral at ..." Adding updateref directive to conf file seemed to me wrong, because multi master is meant to be multi write nodes setup, so I didn't tried that. After about four hours of searching for any full working example of multi-master implementation I decided to put mirror mode true on both servers at the end of conf file - that did the trick. So do I need add mirror mode or not? It is not clear the difference of multi-master and mirror mode, which I asked on different message. I didn't tried setting mirror mode false and see if updates are working, but if this is what I missed, then it is very strange, that official administrators guide is missing such a key point.
Multi-way replication and mirror mode are two different aproaches. While ldap servers configured for n-way replication are all visible and available by all clients and all allowing all operations. Mirror mode is a sort of backup and standby system. Only one ldap server should be visible and available, thus allowing write operations, while the second ldap-server is in hot standby position, and only available to clients if the first server fails. Run test050 to get simple configuration examples for n-way replication. For mirror mode configuration see http://www.openldap.org/doc/admin24/replication.html, part 17.3.2 and 17.4.4
-Dieter
On Sat, Jul 19, 2008 at 11:19 AM, Dieter Kluenter dieter@dkluenter.de wrote:
Hi,
"Liutauras Adomaitis" liutauras.adomaitis@gmail.com writes:
Hello,
I feel a little bit spaming this list, but still - how to setup
multi-master?
Reading http://www.zytrax.com/books/ldap/ch7/#ol-syncrepl http://www.openldap.org/doc/admin24/replication.html gave me impression that simply adding serverID in global (above database) section, syncrepl and overlay syncprov in database section should give me multi master setup. THis did worked - meaning I got the same data on both servers, but I couldn't make updates to either of servers. Google says absolutely nothing about that. The error is "shadow context; no update referral at ..." Adding updateref directive to conf file seemed to me
wrong,
because multi master is meant to be multi write nodes setup, so I didn't
tried
that. After about four hours of searching for any full working example of multi-master implementation I decided to put mirror mode true on both
servers
at the end of conf file - that did the trick. So do I need add mirror mode or not? It is not clear the difference of multi-master and mirror mode, which I asked on different message. I didn't tried setting mirror mode false and see if updates are working,
but
if this is what I missed, then it is very strange, that official administrators guide is missing such a key point.
Multi-way replication and mirror mode are two different aproaches. While ldap servers configured for n-way replication are all visible and available by all clients and all allowing all operations. Mirror mode is a sort of backup and standby system. Only one ldap server should be visible and available, thus allowing write operations, while the second ldap-server is in hot standby position, and only available to clients if the first server fails. Run test050 to get simple configuration examples for n-way replication. For mirror mode configuration see http://www.openldap.org/doc/admin24/replication.html, part 17.3.2 and 17.4.4
Your explanation has answered the other my question "difference between multi master and mirror mode".
I was always using Mandriva rpms and never compiled openldap by myself. But few days ago I did compiling of openldap srpm and saw it doing some tests. I'm going to dig arround for how to make this test050 on Mandriva.
Thanks a lot Liutauras
Hello again,
Run test050 to get simple configuration examples for n-way
replication. For mirror mode configuration see http://www.openldap.org/doc/admin24/replication.html, part 17.3.2 and 17.4.4
I have examined a bit tests scripts provided with openldap-tests rpm from
Mandriva. First it is not very clear how to run scritps, the ./run gives me./run [-b <backend>] [-c] [-k] [-p] [-u] [-w] <script>, but it is not clear what does these switches mean. Maybe it is possible to guess after examine ./run script. So I decided to examine test050 script and at first. As I understood it runs test slapd with dynamic configuration. Maybe it is a great tool of openldap, but this will probably be my next step of learning openldap. It would be nice if somebody could give me conf file example. FInanly to the topic: sniff of the test050 scritpt: ....... echo "Configuring syncrepl on consumer2..." $LDAPMODIFY -D cn=config -H $URI3 -y $CONFIGPWF <<EOF >>$TESTOUT 2>&1 dn: olcDatabase={0}config,cn=config changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=3 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=3 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=3 - add: olcMirrorMode olcMirrorMode: TRUE EOF .........
It shows, that it is adding MirrorMode TRUE. So why? man page of slapd.conf states: "mirrormode on | off - This option puts a replica database into "mirror" mode...." Adding this to my conf file lets me do writes to masters, but I don't want MirrorMode, I want MultiMaster.
Liutauras
On Sunday 20 July 2008 23:34:03 Liutauras Adomaitis wrote:
Hello again,
Run test050 to get simple configuration examples for n-way
replication. For mirror mode configuration see http://www.openldap.org/doc/admin24/replication.html, part 17.3.2 and 17.4.4
I have examined a bit tests scripts provided with openldap-tests rpm from
Mandriva. First it is not very clear how to run scritps,
Where did you look for documentation? I could add some detail on how to run the scripts in the description of the package, or a readme file, but it really is just the standard test suite ...
Did you see the Makefile?
the ./run gives me./run [-b <backend>] [-c] [-k] [-p] [-u] [-w] <script>, but it is not clear what does these switches mean.
For now, just './run test050' or similar.
Maybe it is possible to guess after examine ./run script. So I decided to examine test050 script and at first. As I understood it runs test slapd with dynamic configuration. Maybe it is a great tool of openldap, but this will probably be my next step of learning openldap. It would be nice if somebody could give me conf file example. FInanly to the topic: sniff of the test050 scritpt: ....... echo "Configuring syncrepl on consumer2..." $LDAPMODIFY -D cn=config -H $URI3 -y $CONFIGPWF <<EOF >>$TESTOUT 2>&1 dn: olcDatabase={0}config,cn=config changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=3 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=3 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=3
add: olcMirrorMode olcMirrorMode: TRUE EOF .........
It shows, that it is adding MirrorMode TRUE. So why?
The configuration directive may have been overloaded when multi-master was added (after mirrormode). AFAIK it allows the database in question to both have a syncrepl directive, yet take updates from a DN besides the updatedn (see the description on the slapd.conf man page).
man page of slapd.conf states: "mirrormode on | off - This option puts a replica database into "mirror" mode...." Adding this to my conf file lets me do writes to masters, but I don't want MirrorMode, I want MultiMaster.
See the rest of the paragraph, which continues to say:
"Update operations will be accepted from any user, not just the updatedn."
Regards, Buchan
On Mon, Jul 21, 2008 at 12:49 PM, Buchan Milne bgmilne@staff.telkomsa.net wrote:
On Sunday 20 July 2008 23:34:03 Liutauras Adomaitis wrote:
Hello again,
Run test050 to get simple configuration examples for n-way
replication. For mirror mode configuration see http://www.openldap.org/doc/admin24/replication.html, part 17.3.2 and 17.4.4
I have examined a bit tests scripts provided with openldap-tests rpm
from
Mandriva. First it is not very clear how to run scritps,
Where did you look for documentation? I could add some detail on how to run the scripts in the description of the package, or a readme file, but it really is just the standard test suite ...
I looked in /usr/share/doc/openldap[-servers] and /usr/share/openldap/tests, scroll through run and opened Makefile I also read urpmf --description openldap-tests. I think it would be really nice if ./run --help could give a sentence of description for each switch instead of just lising them.
For now, just './run test050' or similar.
FInanly to the topic: sniff of the test050 scritpt:
add: olcMirrorMode olcMirrorMode: TRUE EOF .........
It shows, that it is adding MirrorMode TRUE. So why?
The configuration directive may have been overloaded when multi-master was added (after mirrormode). AFAIK it allows the database in question to both have a syncrepl directive, yet take updates from a DN besides the updatedn (see the description on the slapd.conf man page).
are you saying, that in multimaster configuration I have to have updatedn directive to be able to do writes? I didnot find anything about that in documentation http://www.openldap.org/doc/admin24/replication.html. On the other hand man page says: updatedn <dn> This option is only applicable in a slave database.
man page of slapd.conf states: "mirrormode on | off - This option puts a replica database into
"mirror"
mode...." Adding this to my conf file lets me do writes to masters, but I don't
want
MirrorMode, I want MultiMaster.
See the rest of the paragraph, which continues to say:
"Update operations will be accepted from any user, not just the updatedn."
Regards, Buchan
In thread "explain diff between multimaster and mirror mode" I found out, that mirrormode is kind of high availability implementation for openldap. In my case I want to have multimaster replication, which could allow me to do writes to different master servers at a time. It contradicts mirrormode, which says, that writes should be directed to one master and switched only on failure of first master.
I would like to stress my question again: how to do writes in multimaster configuration? Simply following documentation didn't let me do writes to any master.
Liutauras
On Monday 21 July 2008 14:48:23 Liutauras Adomaitis wrote:
On Mon, Jul 21, 2008 at 12:49 PM, Buchan Milne bgmilne@staff.telkomsa.net
wrote:
On Sunday 20 July 2008 23:34:03 Liutauras Adomaitis wrote:
[...]
It shows, that it is adding MirrorMode TRUE. So why?
The configuration directive may have been overloaded when multi-master was added (after mirrormode). AFAIK it allows the database in question to both have a syncrepl directive, yet take updates from a DN besides the updatedn (see the description on the slapd.conf man page).
are you saying, that in multimaster configuration I have to have updatedn directive to be able to do writes?
No. Without mirrormode or multi-master, a slave would only accept updates from the updatedn. In multi-master, the master is also a slave, so it needs to accept updates from any DN, while being configured as a slave (having replication configuration).
I didnot find anything about that in documentation http://www.openldap.org/doc/admin24/replication.html. On the other hand man page says: updatedn <dn> This option is only applicable in a slave database.
man page of slapd.conf states: "mirrormode on | off - This option puts a replica database into
"mirror"
mode...." Adding this to my conf file lets me do writes to masters, but I don't
want
MirrorMode, I want MultiMaster.
See the rest of the paragraph, which continues to say:
"Update operations will be accepted from any user, not just the updatedn."
Regards, Buchan
In thread "explain diff between multimaster and mirror mode" I found out, that mirrormode is kind of high availability implementation for openldap. In my case I want to have multimaster replication, which could allow me to do writes to different master servers at a time.
You may want to think very carefully about why you want this, and not mirrormode, or a single master.
It contradicts mirrormode, which says, that writes should be directed to one master and switched only on failure of first master.
But the prerequisites (replication, as well as allowing writes from an identity that is not updatedn) remain the same for both.
I would like to stress my question again: how to do writes in multimaster configuration? Simply following documentation didn't let me do writes to any master.
I succeeded by reading the documentation ...
Are you sure it is not some other aspect of your configuration? Have you posted details? Have you posted the error message?
Regards, Buchan
On Sunday 20 July 2008 22:12:38 Liutauras Adomaitis wrote:
On Sat, Jul 19, 2008 at 11:19 AM, Dieter Kluenter dieter@dkluenter.de
wrote:
Hi,
"Liutauras Adomaitis" liutauras.adomaitis@gmail.com writes:
Hello,
I feel a little bit spaming this list, but still - how to setup
multi-master?
Reading http://www.zytrax.com/books/ldap/ch7/#ol-syncrepl http://www.openldap.org/doc/admin24/replication.html gave me impression that simply adding serverID in global (above database) section, syncrepl and overlay syncprov in database section should give me multi master setup. THis did worked - meaning I got the same data on both servers, but I couldn't make updates to either of servers. Google says absolutely nothing about that. The error is "shadow context; no update referral at ..." Adding updateref directive to conf file seemed to me
wrong,
because multi master is meant to be multi write nodes setup, so I didn't
tried
that. After about four hours of searching for any full working example of multi-master implementation I decided to put mirror mode true on both
servers
at the end of conf file - that did the trick. So do I need add mirror mode or not? It is not clear the difference of multi-master and mirror mode, which I asked on different message. I didn't tried setting mirror mode false and see if updates are working,
but
if this is what I missed, then it is very strange, that official administrators guide is missing such a key point.
Multi-way replication and mirror mode are two different aproaches. While ldap servers configured for n-way replication are all visible and available by all clients and all allowing all operations. Mirror mode is a sort of backup and standby system. Only one ldap server should be visible and available, thus allowing write operations, while the second ldap-server is in hot standby position, and only available to clients if the first server fails. Run test050 to get simple configuration examples for n-way replication. For mirror mode configuration see http://www.openldap.org/doc/admin24/replication.html, part 17.3.2 and 17.4.4
Your explanation has answered the other my question "difference between multi master and mirror mode".
I was always using Mandriva rpms and never compiled openldap by myself. But few days ago I did compiling of openldap srpm and saw it doing some tests.
No need to compile to get the tests, just 'urpmi openldap-tests', and as a normal (non-root) user you should be able to run all the tests as follows:
$ make -C /usr/share/openldap/tests/ tests
Note that it is configured to work in $TMP/openldap-testrun by default. For your purposes, you may want to:
$ cd /usr/share/openldap/tests $ ./run test050
Now look in $TMP/openldap-testrun
I'm going to dig arround for how to make this test050 on Mandriva.
No need to dig, as we ship the tests ready-to-run ...
BTW, 2.4.11 is available in backports for 2008.1 as of Friday.
Regards, Buchan
openldap-software@openldap.org