jamsda
2006-Oct-09 22:31 UTC
[Fedora-directory-users] Command-line Consumer Initialization
Does anybody know if there''s a way to initialize a consumer in a multi-master config from the command-line? Thanks, Jim __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Mike Jackson
2006-Oct-10 14:07 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
jamsda wrote:> Does anybody know if there''s a way to initialize a > consumer in a multi-master config from the > command-line?Use mmr.pl : http://www.netauth.com/~jacksonm/ldap/mmr.pl It handles initialization as well as creating and deleting agreements. BR, -- mike
Kimmo Koivisto
2006-Oct-10 15:13 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Mike Jackson wrote:> > Does anybody know if there''s a way to initialize a > > consumer in a multi-master config from the > > command-line? > > Use mmr.pl : > > http://www.netauth.com/~jacksonm/ldap/mmr.plHello Mike I have used your mmr.pl script to deploy about 10 multimaster replicated FDS installations, it always worked fine. Those deployments have had two servers and I know that in near future I need to deploy four-way mmr. Your script''s has the following options: --host1 FQDN of host 1 --host2 FQDN of host 2 --host1_id Replication ID number of host 1 --host2_id Replication ID number of host 2 When deploying four-way mmr, is it possible to define options --host3 and --host4 (and _id) options or how one should initialize four-way mmr? Best Regards Kimmo
Chris St. Pierre
2006-Oct-11 14:56 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
On Tue, 10 Oct 2006, Kimmo Koivisto wrote:>Hello Mike > >I have used your mmr.pl script to deploy about 10 multimaster replicated FDS >installations, it always worked fine. Those deployments have had two servers >and I know that in near future I need to deploy four-way mmr. > >Your script''s has the following options: > --host1 FQDN of host 1 > --host2 FQDN of host 2 > --host1_id Replication ID number of host 1 > --host2_id Replication ID number of host 2 > >When deploying four-way mmr, is it possible to define options --host3 >and --host4 (and _id) options or how one should initialize four-way mmr? > >Best Regards >KimmoYou''ll want to set up two-way replication agreements between each pair of hosts in your setup. So if you had A, B, C, and D, you''d set up agreements between A-B, A-C, A-D, B-C, B-D, and C-D. Chris St. Pierre Unix Systems Administrator Nebraska Wesleyan University
Gordon Messmer
2006-Oct-11 15:40 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Chris St. Pierre wrote:> You''ll want to set up two-way replication agreements between each pair > of hosts in your setup. So if you had A, B, C, and D, you''d set up > agreements between A-B, A-C, A-D, B-C, B-D, and C-D. >The documentation contradicts you. Look at the second figure in the "Multi-Master Replication" section of the admin manual (hard to see), and the section "Configuring 4-Way Multi-Master Replication" several pages below it: http://www.redhat.com/docs/manuals/dir-server/ag/7.1/replicat.html#1101818 The admin manual suggests a ring topology (and two agreements per set of peers) for multi-master agreements. You should have agreements between A->B, A->D, B->A, B->C, C->B, C->D, D->C, and D->A.
Mike Jackson
2006-Oct-11 17:00 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Gordon Messmer wrote:> Chris St. Pierre wrote: > >> You''ll want to set up two-way replication agreements between each pair >> of hosts in your setup. So if you had A, B, C, and D, you''d set up >> agreements between A-B, A-C, A-D, B-C, B-D, and C-D. >> > > > The documentation contradicts you. Look at the second figure in the > "Multi-Master Replication" section of the admin manual (hard to see), > and the section "Configuring 4-Way Multi-Master Replication" several > pages below it: > http://www.redhat.com/docs/manuals/dir-server/ag/7.1/replicat.html#1101818 > > The admin manual suggests a ring topology (and two agreements per set of > peers) for multi-master agreements. You should have agreements between > A->B, A->D, B->A, B->C, C->B, C->D, D->C, and D->A.Ring-topology survives 1 server failure, but not two. You need to understand your high-availability requirements to decide which is right for you. Full-mesh replication supports 2 servers failing at the same time, but increases replication traffic. Mininum level of agreements for 4-way MMR: 1 <-> 2 1 <-> 3 2 <-> 4 Maximum level of agreements (full-mesh) for 4-way MMR (each machine replicates to 3 targets): 1 <-> 2 1 <-> 3 1 <-> 4 2 <-> 3 2 <-> 4 3 <-> 4 Again, it''s much easier to visualize when you draw numbered boxes on paper and connect the dots :-) The systems I design require high-availability for writes, so I use full-mesh MMR. -- mike
jamsda
2006-Oct-16 22:15 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Hi Mike, Thanks for the responses. You mentioned earlier in the thread I could use mmr.pl to initialize (only) a consumer. I don''t see that option with the tool; only "create", "remove" and "display". I noticed the create function calls three other functions, "config_supplier", "add_rep_agreement", and then "initialize". If I want to initialize only, do I need to re-create the agreements? I tried modifying it to have an --init option with only the "initialize($host1, $host2) function being called, but kept getting the mmr usage, and wasn''t sure if its possible to do an initialize only. Thanks, Jim --- Mike Jackson <mj@sci.fi> wrote:> Gordon Messmer wrote: > > Chris St. Pierre wrote: > > > >> You''ll want to set up two-way replication > agreements between each pair > >> of hosts in your setup. So if you had A, B, C, > and D, you''d set up > >> agreements between A-B, A-C, A-D, B-C, B-D, and > C-D. > >> > > > > > > The documentation contradicts you. Look at the > second figure in the > > "Multi-Master Replication" section of the admin > manual (hard to see), > > and the section "Configuring 4-Way Multi-Master > Replication" several > > pages below it: > > >http://www.redhat.com/docs/manuals/dir-server/ag/7.1/replicat.html#1101818> > > > The admin manual suggests a ring topology (and two > agreements per set of > > peers) for multi-master agreements. You should > have agreements between > > A->B, A->D, B->A, B->C, C->B, C->D, D->C, and > D->A. > > Ring-topology survives 1 server failure, but not > two. You need to > understand your high-availability requirements to > decide which is right > for you. > > Full-mesh replication supports 2 servers failing at > the same time, but > increases replication traffic. > > Mininum level of agreements for 4-way MMR: > 1 <-> 2 > 1 <-> 3 > 2 <-> 4 > > > Maximum level of agreements (full-mesh) for 4-way > MMR (each machine > replicates to 3 targets): > 1 <-> 2 > 1 <-> 3 > 1 <-> 4 > 2 <-> 3 > 2 <-> 4 > 3 <-> 4 > > Again, it''s much easier to visualize when you draw > numbered boxes on > paper and connect the dots :-) > > The systems I design require high-availability for > writes, so I use > full-mesh MMR. > > -- > mike > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com >https://www.redhat.com/mailman/listinfo/fedora-directory-users>__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Mike Jackson
2006-Oct-20 09:08 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
jamsda wrote:> Hi Mike, > > Thanks for the responses. You mentioned earlier in the > thread I could use mmr.pl to initialize (only) a > consumer. I don''t see that option with the tool; only > "create", "remove" and "display". I noticed the create > function calls three other functions, > "config_supplier", "add_rep_agreement", and then > "initialize". > If I want to initialize only, do I need to re-create > the agreements? > I tried modifying it to have an --init option with > only the "initialize($host1, $host2) function being > called, but kept getting the mmr usage, and wasn''t > sure if its possible to do an initialize only.Hi Jim, First remove the agreement and then create it again. No need for an --init option. BR, -- mike
jamsda
2006-Oct-20 16:19 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Ok, so I''m guessing this is what happens behind the scenes (remove/re-create) when I do an "initialize consumer" from the GUI right? Thanks for the response, Jim --- Mike Jackson <mj@sci.fi> wrote:> jamsda wrote: > > Hi Mike, > > > > Thanks for the responses. You mentioned earlier in > the > > thread I could use mmr.pl to initialize (only) a > > consumer. I don''t see that option with the tool; > only > > "create", "remove" and "display". I noticed the > create > > function calls three other functions, > > "config_supplier", "add_rep_agreement", and then > > "initialize". > > If I want to initialize only, do I need to > re-create > > the agreements? > > I tried modifying it to have an --init option with > > only the "initialize($host1, $host2) function > being > > called, but kept getting the mmr usage, and wasn''t > > sure if its possible to do an initialize only. > > Hi Jim, > First remove the agreement and then create it > again. No need for an > --init option. > > BR, > -- > mike > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com >https://www.redhat.com/mailman/listinfo/fedora-directory-users>__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Mike Jackson
2006-Oct-20 18:40 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
jamsda wrote:> Ok, so I''m guessing this is what happens behind the > scenes (remove/re-create) when I do an "initialize > consumer" from the GUI right? >It is, for all intents and purposes, the functional equivalent. -- mike
Richard Megginson
2006-Oct-20 20:14 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Mike Jackson wrote:> jamsda wrote: >> Ok, so I''m guessing this is what happens behind the >> scenes (remove/re-create) when I do an "initialize >> consumer" from the GUI right? > > It is, for all intents and purposes, the functional equivalent.Not exactly. Do perform a replica init, all you need is the DN of the replication agreement. Step 1 - find the DN of the replication agreement with ldapsearch: ldapsearch -D "cn=directory manager" -w password -s sub -b cn=config ''(objectclass=nsds5ReplicationAgreement)'' cn Then choose the repl agreement you are interested in Step 2 - initiate repl init using ldapmodify ldapmodify -D "cn=directory manager" -w password dn: dn of your repl agreement from step 1 changetype: modify replace: nsds5BeginReplicaRefresh nsds5BeginReplicaRefresh: start That starts the replica refresh (init). Step 3 - view repl init status with ldapsearch - remember to escape or quote the quotes in the repl agreement DN ldapsearch -D "cn=directory manager" -w password -s base -b "dn of your repl agreement" "objectclass=*" nsds5BeginReplicaRefresh nsds5replicaUpdateInProgress nsds5ReplicaLastInitStart nsds5ReplicaLastInitEnd nsds5ReplicaLastInitStatus The init is complete when the nsds5BeginReplicaRefresh attribute is absent. Then you can check the status with nsds5ReplicaLastInitStatus, which should contain the string "Total update succeeded" if successful. If there are errors, check the error logs on the supplier and consumer.> > -- > mike > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users
jamsda
2006-Oct-26 23:08 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Thanks for the response. So after step 1 here''s my output: dn: cn="Replication to host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping tree,cn=config cn: "Replication to host2.xyz.com" cn: Replication to host2.xyz.com So how would step 2 look on the command-line? Here''s what I started with: ldapmodify -D "cn=directory manager" -w password -b n="Replication to host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping tree,cn=config but where do I specify the rest of these attributes: changetype: modify replace: nsds5BeginReplicaRefresh nsds5BeginReplicaRefresh: start Thanks, Jim --- Richard Megginson <rmeggins@redhat.com> wrote:> Mike Jackson wrote: > > jamsda wrote: > >> Ok, so I''m guessing this is what happens behind > the > >> scenes (remove/re-create) when I do an > "initialize > >> consumer" from the GUI right? > > > > It is, for all intents and purposes, the > functional equivalent. > Not exactly. Do perform a replica init, all you > need is the DN of the > replication agreement. > Step 1 - find the DN of the replication agreement > with ldapsearch: > ldapsearch -D "cn=directory manager" -w password -s > sub -b cn=config > ''(objectclass=nsds5ReplicationAgreement)'' cn > Then choose the repl agreement you are interested in > > Step 2 - initiate repl init using ldapmodify > ldapmodify -D "cn=directory manager" -w password > dn: dn of your repl agreement from step 1 > changetype: modify > replace: nsds5BeginReplicaRefresh > nsds5BeginReplicaRefresh: start > > That starts the replica refresh (init). > > Step 3 - view repl init status with ldapsearch - > remember to escape or > quote the quotes in the repl agreement DN > ldapsearch -D "cn=directory manager" -w password -s > base -b "dn of your > repl agreement" "objectclass=*" > nsds5BeginReplicaRefresh > nsds5replicaUpdateInProgress > nsds5ReplicaLastInitStart > nsds5ReplicaLastInitEnd nsds5ReplicaLastInitStatus > > The init is complete when the > nsds5BeginReplicaRefresh attribute is > absent. Then you can check the status with > nsds5ReplicaLastInitStatus, > which should contain the string "Total update > succeeded" if successful. > If there are errors, check the error logs on the > supplier and consumer. > > > > -- > > mike > > > > -- > > Fedora-directory-users mailing list > > Fedora-directory-users@redhat.com > > >https://www.redhat.com/mailman/listinfo/fedora-directory-users> > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com >https://www.redhat.com/mailman/listinfo/fedora-directory-users>__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Richard Megginson
2006-Oct-26 23:15 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
jamsda wrote:> Thanks for the response. So after step 1 here''s my > output: > > dn: cn="Replication to > host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping > tree,cn=config > cn: "Replication to host2.xyz.com" > cn: Replication to host2.xyz.com > > So how would step 2 look on the command-line? Here''s > what I started with: > > ldapmodify -D "cn=directory manager" -w password -b > n="Replication to > host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping > tree,cn=config >No, just ldapmodify -D "cn=directory manager" -w password Once you type this in, ldapmodify will wait for your input: dn: cn="Replication to host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping tree,cn=config changetype: modify replace: nsds5BeginReplicaRefresh nsds5BeginReplicaRefresh: start ^^ is a blank line then, type Ctrl-D to end the input - you should get the usual shell command prompt again.> but where do I specify the rest of these attributes: > > changetype: modify > replace: nsds5BeginReplicaRefresh > nsds5BeginReplicaRefresh: start > > > > > Thanks, > Jim > > --- Richard Megginson <rmeggins@redhat.com> wrote: > > >> Mike Jackson wrote: >> >>> jamsda wrote: >>> >>>> Ok, so I''m guessing this is what happens behind >>>> >> the >> >>>> scenes (remove/re-create) when I do an >>>> >> "initialize >> >>>> consumer" from the GUI right? >>>> >>> It is, for all intents and purposes, the >>> >> functional equivalent. >> Not exactly. Do perform a replica init, all you >> need is the DN of the >> replication agreement. >> Step 1 - find the DN of the replication agreement >> with ldapsearch: >> ldapsearch -D "cn=directory manager" -w password -s >> sub -b cn=config >> ''(objectclass=nsds5ReplicationAgreement)'' cn >> Then choose the repl agreement you are interested in >> >> Step 2 - initiate repl init using ldapmodify >> ldapmodify -D "cn=directory manager" -w password >> dn: dn of your repl agreement from step 1 >> changetype: modify >> replace: nsds5BeginReplicaRefresh >> nsds5BeginReplicaRefresh: start >> >> That starts the replica refresh (init). >> >> Step 3 - view repl init status with ldapsearch - >> remember to escape or >> quote the quotes in the repl agreement DN >> ldapsearch -D "cn=directory manager" -w password -s >> base -b "dn of your >> repl agreement" "objectclass=*" >> nsds5BeginReplicaRefresh >> nsds5replicaUpdateInProgress >> nsds5ReplicaLastInitStart >> nsds5ReplicaLastInitEnd nsds5ReplicaLastInitStatus >> >> The init is complete when the >> nsds5BeginReplicaRefresh attribute is >> absent. Then you can check the status with >> nsds5ReplicaLastInitStatus, >> which should contain the string "Total update >> succeeded" if successful. >> If there are errors, check the error logs on the >> supplier and consumer. >> >>> -- >>> mike >>> >>> -- >>> Fedora-directory-users mailing list >>> Fedora-directory-users@redhat.com >>> >>> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > >>> -- >>> >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> >> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
jamsda
2006-Oct-26 23:56 UTC
Re: [Fedora-directory-users] Command-line Consumer Initialization
Thanks Richard, Worked great!! Thanks, Jim --- Richard Megginson <rmeggins@redhat.com> wrote:> jamsda wrote: > > Thanks for the response. So after step 1 here''s my > > output: > > > > dn: cn="Replication to > > >host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping> > tree,cn=config > > cn: "Replication to host2.xyz.com" > > cn: Replication to host2.xyz.com > > > > So how would step 2 look on the command-line? > Here''s > > what I started with: > > > > ldapmodify -D "cn=directory manager" -w password > -b > > n="Replication to > > >host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping> > tree,cn=config > > > No, just ldapmodify -D "cn=directory manager" -w > password > Once you type this in, ldapmodify will wait for your > input: > dn: cn="Replication to >host2.xyz.com",cn=replica,cn="dc=xyz,dc=com",cn=mapping> tree,cn=config > changetype: modify > replace: nsds5BeginReplicaRefresh > nsds5BeginReplicaRefresh: start > > ^^ is a blank line > then, type Ctrl-D to end the input - you should get > the usual shell > command prompt again. > > but where do I specify the rest of these > attributes: > > > > changetype: modify > > replace: nsds5BeginReplicaRefresh > > nsds5BeginReplicaRefresh: start > > > > > > > > > > Thanks, > > Jim > > > > --- Richard Megginson <rmeggins@redhat.com> wrote: > > > > > >> Mike Jackson wrote: > >> > >>> jamsda wrote: > >>> > >>>> Ok, so I''m guessing this is what happens behind > >>>> > >> the > >> > >>>> scenes (remove/re-create) when I do an > >>>> > >> "initialize > >> > >>>> consumer" from the GUI right? > >>>> > >>> It is, for all intents and purposes, the > >>> > >> functional equivalent. > >> Not exactly. Do perform a replica init, all you > >> need is the DN of the > >> replication agreement. > >> Step 1 - find the DN of the replication agreement > >> with ldapsearch: > >> ldapsearch -D "cn=directory manager" -w password > -s > >> sub -b cn=config > >> ''(objectclass=nsds5ReplicationAgreement)'' cn > >> Then choose the repl agreement you are interested > in > >> > >> Step 2 - initiate repl init using ldapmodify > >> ldapmodify -D "cn=directory manager" -w password > >> dn: dn of your repl agreement from step 1 > >> changetype: modify > >> replace: nsds5BeginReplicaRefresh > >> nsds5BeginReplicaRefresh: start > >> > >> That starts the replica refresh (init). > >> > >> Step 3 - view repl init status with ldapsearch - > >> remember to escape or > >> quote the quotes in the repl agreement DN > >> ldapsearch -D "cn=directory manager" -w password > -s > >> base -b "dn of your > >> repl agreement" "objectclass=*" > >> nsds5BeginReplicaRefresh > >> nsds5replicaUpdateInProgress > >> nsds5ReplicaLastInitStart > >> nsds5ReplicaLastInitEnd > nsds5ReplicaLastInitStatus > >> > >> The init is complete when the > >> nsds5BeginReplicaRefresh attribute is > >> absent. Then you can check the status with > >> nsds5ReplicaLastInitStatus, > >> which should contain the string "Total update > >> succeeded" if successful. > >> If there are errors, check the error logs on the > >> supplier and consumer. > >> > >>> -- > >>> mike > >>> > >>> -- > >>> Fedora-directory-users mailing list > >>> Fedora-directory-users@redhat.com > >>> > >>> > > >https://www.redhat.com/mailman/listinfo/fedora-directory-users> > > >>> -- > >>> > >> Fedora-directory-users mailing list > >> Fedora-directory-users@redhat.com > >> > >> > > >https://www.redhat.com/mailman/listinfo/fedora-directory-users> > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > -- > > Fedora-directory-users mailing list > > Fedora-directory-users@redhat.com > > >https://www.redhat.com/mailman/listinfo/fedora-directory-users> > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com >https://www.redhat.com/mailman/listinfo/fedora-directory-users>__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com