* Slapd(8) enhancements
- Syncrepl enhancements, including push-mode and
- Multi-Master support
+ Multi-Provider support
- Dynamic configuration enhancements, including
online schema editing and full access control
- Dynamic monitoring enhancements, including
Fixed slapd-bdb/hdb/mdb to not convert certain IDLs to ranges (ITS#8868)
Fixed slapo-accesslog deadlock during cleanup (ITS#8752)
Fixed slapo-memberof cn=config modifications (ITS#8663)
- Fixed slapo-ppolicy with multimaster replication (ITS#8927)
+ Fixed slapo-ppolicy with multi-provider replication (ITS#8927)
Fixed slapo-syncprov with NULL modlist (ITS#8843)
Build Environment
Added slapd reproducible build support (ITS#8928)
Fixed slapd segfault with invalid hostname (ITS#8631)
Fixed slapd sasl SEGV rebind in same session (ITS#8568)
Fixed slapd syncrepl filter handling (ITS#8413)
- Fixed slapd syncrepl infinite looping mods with delta-sync MMR (ITS#8432)
+ Fixed slapd syncrepl infinite looping mods with delta-sync MPR (ITS#8432)
Fixed slapd callback struct so older modules without writewait should function.
Custom modules may need to be updated for sc_writewait callback (ITS#8435)
Fixed slapd-ldap/meta broken LDAP_TAILQ macro (ITS#8576)
Fixed slapd-ldap to skip client controls in ldap_back_entry_get (ITS#8244)
Fixed slapd-null to have an option to return a search entry (ITS#8249)
Fixed slapd-relay to correctly handle quoted options (ITS#8284)
- Fixed slapo-accesslog delta-sync MMR with interrupted refresh phase (ITS#8281)
+ Fixed slapo-accesslog delta-sync MPR with interrupted refresh phase (ITS#8281)
Fixed slapo-dds segfault when using slapo-memberof (ITS#8133)
Fixed slapo-ppolicy to allow purging of stale pwdFailureTime attributes (ITS#8185)
Fixed slapo-ppolicy to release entry on failure (ITS#7537)
Fixed slapd slapadd config db import of minimal frontend entry (ITS#8150)
Fixed slapd slapadd onetime leak with -w (ITS#8014)
Fixed slapd sasl auxprop crash with invalid config (ITS#8092)
- Fixed slapd syncrepl delta-mmr issue with overlays and slapd.conf (ITS#7976)
+ Fixed slapd syncrepl delta-mpr issue with overlays and slapd.conf (ITS#7976)
Fixed slapd syncrepl mutex for cookie state (ITS#7968)
Fixed slapd syncrepl memory leaks (ITS#8035)
Fixed slapd syncrepl to free presentlist at end of refresh mode (ITS#8038)
Fixed liblmdb wasted space on split (ITS#7589)
Fixed slapd for certs with a NULL issuerDN (ITS#7746)
Fixed slapd cn=config with empty nested includes (ITS#7739)
- Fixed slapd syncrepl memory leak with delta-sync MMR (ITS#7735)
+ Fixed slapd syncrepl memory leak with delta-sync MPR (ITS#7735)
Fixed slapd-bdb/hdb to stop processing on dn not found (ITS#7741)
Fixed slapd-bdb/hdb with indexed ANDed filters (ITS#7743)
Fixed slapd-mdb to stop processing on dn not found (ITS#7741)
Fixed liblmdb to validate data limits (ITS#7485)
Fixed liblmdb mdb_update_key for large keys (ITS#7505)
Fixed ldapmodify to not core dump with invalid LDIF (ITS#7477)
- Fixed slapd syncrepl for old entries in MMR setup (ITS#7427)
+ Fixed slapd syncrepl for old entries in MPR setup (ITS#7427)
Fixed slapd signedness for index_substr_any_* (ITS#7449)
Fixed slapd enforce SLAPD_MAX_DAEMON_THREADS (ITS#7450)
Fixed slapd mutex in send_ldap_ber (ITS#6164)
Fixed slapd-meta segfault when modifying olcDbUri (ITS#7526)
Fixed slapd-sql back-config support (ITS#7499)
Fixed slapo-constraint handle uri and restrict correctly (ITS#7418)
- Fixed slapo-constraint with multi-master replication (ITS#7426)
+ Fixed slapo-constraint with multi-provider replication (ITS#7426)
Fixed slapo-constraint segfault (ITS#7431)
Fixed slapo-deref control initialization (ITS#7436)
Fixed slapo-deref control exposure (ITS#7445)
Fixed slapd alock handling on Windows (ITS#7361)
Fixed slapd acl handling with zero-length values (ITS#7350)
Fixed slapd syncprov to not reference ops inside a lock (ITS#7172)
- Fixed slapd delta-syncrepl MMR with large attribute values (ITS#7354)
+ Fixed slapd delta-syncrepl MPR with large attribute values (ITS#7354)
Fixed slapd slapd_rw_destroy function (ITS#7390)
Fixed slapd-ldap idassert bind handling (ITS#7403)
Fixed slapd-mdb slapadd -q -w double free (ITS#7356)
Fixed slapd listener initialization (ITS#7233)
Fixed slapd cn=config with olcTLSVerifyClient (ITS#7197)
Fixed slapd delta-syncrepl fallback on non-leaf error (ITS#7195)
- Fixed slapd to reject MMR setups with bad serverID setting (ITS#7200)
+ Fixed slapd to reject MPR setups with bad serverID setting (ITS#7200)
Fixed slapd approxIndexer key generation (ITS#7203)
Fixed slapd modification of olcSuffix (ITS#7205)
Fixed slapd schema validation with missing definitions (ITS#7224)
Added slapd support for draft-wahl-ldap-session (ITS#6984)
Added slapadd pipelining capability (ITS#7078)
Added slapd Add-if-not-present (ITS#6561)
- Added slapd delta-syncrepl MMR (ITS#6734,ITS#7029,ITS#7031)
+ Added slapd delta-syncrepl MPR (ITS#6734,ITS#7029,ITS#7031)
Added slapd-mdb experimental backend (ITS#7079)
Added slapd-passwd dynamic config support
Added slapd-perl dynamic config support
Fixed slapo-syncprov filter race condition (ITS#6708)
Fixed slapo-syncprov active mod race (ITS#6709)
Fixed slapo-syncprov to refresh if context is dirty (ITS#6710)
- Fixed slapo-syncprov CSN updates to all replicas (ITS#6718)
+ Fixed slapo-syncprov CSN updates to all consumers (ITS#6718)
Fixed slapo-syncprov sessionlog ordering (ITS#6716)
Fixed slapo-syncprov sessionlog with adds (ITS#6503)
Fixed slapo-syncprov mutex (ITS#6438)
- Fixed slapo-syncprov mincsn check with MMR (ITS#6717)
+ Fixed slapo-syncprov mincsn check with MPR (ITS#6717)
Fixed slapo-syncprov control leak (ITS#6795)
Fixed slapo-syncprov error codes (ITS#6812)
Fixed slapo-translucent entry leak (ITS#6746)
OpenLDAP 2.4.19 Release (2009/10/06)
Fixed client tools with null timeouts (ITS#6282)
- Fixed slapadd to warn about missing attrs for replicas (ITS#6281)
+ Fixed slapadd to warn about missing attrs for consumers (ITS#6281)
Fixed slapd acl cache (ITS#6287)
Fixed slapd tools to allow -n for conversion (ITS#6258)
Fixed slapd-ldap with null timeouts (ITS#6282)
Fixed slapd schema_init freed value (ITS#6036)
Fixed slapd syncrepl newCookie sync messages (ITS#5972)
Fixed slapd syncrepl hang during shutdown (ITS#6011)
- Fixed slapd syncrepl too many MMR messages (ITS#6020)
- Fixed slapd syncrepl skipped entries with MMR (ITS#5988)
+ Fixed slapd syncrepl too many MPR messages (ITS#6020)
+ Fixed slapd syncrepl skipped entries with MPR (ITS#5988)
Fixed slapd-bdb/hdb cachesize handling (ITS#5860)
Fixed slapd-bdb/hdb with slapcat with empty dn (ITS#6006)
Fixed slapd-bdb/hdb with NULL transactions (ITS#6012)
Fixed slapo-accesslog interaction with ppolicy (ITS#5979)
Fixed slapo-dynlist conversion to cn=config (ITS#6002)
Fixed slapo-syncprov newCookie sync messages (ITS#5972)
- Fixed slapd-syncprov too many MMR messages (ITS#6020)
- Fixed slapo-syncprov replica lockout (ITS#5985)
+ Fixed slapd-syncprov too many MPR messages (ITS#6020)
+ Fixed slapo-syncprov consumer lockout (ITS#5985)
Fixed slapo-syncprov modtarget tracking (ITS#5999)
Fixed slapo-syncprov multiple CSN propagation (ITS#5973)
Fixed slapo-syncprov race condition (ITS#6045)
Fixed slapo-syncprov sending cookies without CSN (ITS#6024)
- Fixed slapo-syncprov skipped entries with MMR (ITS#5988)
+ Fixed slapo-syncprov skipped entries with MPR (ITS#5988)
Fixed tools passphrase free (ITS#6014)
Build Environment
Cleaned up alloc/free functions for Windows (ITS#6005)
Fixed running of autosave files in testsuite (ITS#6026)
Documentation
- admin24 clarified MMR URI requirements (ITS#5942,ITS#5987)
+ admin24 clarified MPR URI requirements (ITS#5942,ITS#5987)
Added ldapexop(1) manual page (ITS#5982)
slapd-ldap/meta(5) added missing TLS options (ITS#5989)
Fixed slapd connection assert (ITS#5835)
Fixed slapd epoll handling (ITS#5886)
Fixed slapd frontend/backend options handling (ITS#5857)
- Fixed slapd glue with MMR (ITS#5925)
+ Fixed slapd glue with MPR (ITS#5925)
Fixed slapd logging on Windows (ITS#5392)
Fixed slapd listener comparison (ITS#5613)
Fixed slapd manageDSAit with glue entries (ITS#5921)
Fixed slapd relax behavior with structuralObjectClass (ITS#5792)
Fixed slapd syncrepl rename handling (ITS#5809)
- Fixed slapd syncrepl MMR when adding new server (ITS#5850)
- Fixed slapd syncrepl MMR with deleted entries (ITS#5843)
+ Fixed slapd syncrepl MPR when adding new server (ITS#5850)
+ Fixed slapd syncrepl MPR with deleted entries (ITS#5843)
Fixed slapd syncrepl replication with glued DB (ITS#5866)
Fixed slapd syncrepl replication with moddn (ITS#5901)
Fixed slapd syncrepl replication with referrals (ITS#5881)
Fixed slapd equality rules for olcRootDN/olcSchemaDN (ITS#5540)
Fixed slapd sets memory leak (ITS#5557)
Fixed slapd sortvals binary search (ITS#5578)
- Fixed slapd syncrepl updates with multiple masters (ITS#5597)
+ Fixed slapd syncrepl updates with multiple providers (ITS#5597)
Fixed slapd syncrepl superior objectClass delete/add (ITS#5600)
Fixed slapd syncrepl/slapo-syncprov contextCSN updates as internal ops (ITS#5596)
Added slapd-ldap/slapd-meta option to filter out search references (ITS#5593)
Fixed slapd syncrepl crash on empty CSN (ITS#5432)
Fixed slapd syncrepl refreshAndPersist (ITS#5454)
Fixed slapd syncrepl modrdn processing (ITS#5397)
- Fixed slapd syncrepl MMR partial refresh (ITS#5470)
+ Fixed slapd syncrepl MPR partial refresh (ITS#5470)
Fixed slapd value list termination (ITS#5450)
Fixed slapd/slapo-accesslog rq mutex usage (ITS#5442)
Fixed slapd-bdb ID_NOCACHE handling (ITS#5439)
Fixed slapd-bdb crash with modrdn (ITS#5358)
Fixed slapd-bdb SEGV with bdb4.6 (ITS#5322)
Fixed slapd-bdb modrdn to same dn (ITS#5319)
- Fixed slapd-bdb MMR (ITS#5332)
+ Fixed slapd-bdb MPR (ITS#5332)
Added slapd-bdb/slapd-hdb DB encryption (ITS#5359)
Fixed slapd-ldif delete (ITS#5265)
Fixed slapd-meta link to slapd-ldap (ITS#5355)
Fixed slapd paged results handling when using rootdn (ITS#5230)
Fixed slapd syncrepl presentlist handling (ITS#5231)
Fixed slapd core schema 'c' definition for RFC4519 (ITS#5236)
- Fixed slapd 3-way Multi-Master Replication (ITS#5238)
+ Fixed slapd 3-way multi-provider replication (ITS#5238)
Fixed slapd hash collisions in index slots (ITS#5183)
Fixed slapd replication of dSAOperation attributes (ITS#5268)
Fixed slapadd contextCSN updating (ITS#5225)
To use LDAP and still have reasonable security in a networked,
Internet/Intranet environment, secure shell can be used to setup
secure, encrypted connections between client machines and the LDAP
-server, and between the LDAP server and any replica or slave servers
-that might be used.
+server, and between all LDAP nodes that might be used.
To perform the LDAP "bind" operation:
.B lastbind_forward_updates
Specify that updates of the authTimestamp attribute
on a consumer should be forwarded
-to a master instead of being written directly into the consumer's local
+to a provider instead of being written directly into the consumer's local
database. This setting is only useful on a replication consumer, and
also requires the
.B updateref
intro_tree.png \
ldap-sync-refreshandpersist.png \
ldap-sync-refreshonly.png \
- n-way-multi-master.png \
+ n-way-multi-provider.png \
push-based-complete.png \
push-based-standalone.png \
refint.png \
slapd(8) includes support for {{LDAP Sync}}-based replication, called
{{syncrepl}}, which may be used to maintain shadow copies of directory
information on multiple directory servers. In its most basic
-configuration, the {{master}} is a syncrepl provider and one or more
-{{slave}} (or {{shadow}}) are syncrepl consumers. An example
-master-slave configuration is shown in figure 3.3. Multi-Master
+configuration, the {{provider}} is a syncrepl provider and one or more
+{{consumer}} (or {{shadow}}) are syncrepl consumers. An example
+provider-consumer configuration is shown in figure 3.3. Multi-Provider
configurations are also supported.
!import "config_repl.png"; align="center"; title="Replicated Directory Services"
operations. They may have the ability to replicate information
widely in order to increase availability and reliability, while
reducing response time. When directory information is replicated,
-temporary inconsistencies between the replicas may be okay, as long
+temporary inconsistencies between the consumers may be okay, as long
as inconsistencies are resolved in a timely manner.
There are many different ways to provide a directory service.
required while providing high performance.
{{B:Replication}}: {{slapd}} can be configured to maintain shadow
-copies of directory information. This {{single-master/multiple-slave}}
+copies of directory information. This {{single-provider/multiple-consumer}}
replication scheme is vital in high-volume environments where a
single {{slapd}} installation just doesn't provide the necessary availability
or reliability. For extremely demanding environments where a
-single point of failure is not acceptable, {{multi-master}} replication
+single point of failure is not acceptable, {{multi-provider}} replication
is also available. {{slapd}} includes support for {{LDAP Sync}}-based
replication.
.{{S: }}
+{{B: Start the server}}
-Obviously this doesn't cater for any complicated deployments like {{SECT: MirrorMode}} or {{SECT: N-Way Multi-Master}},
+Obviously this doesn't cater for any complicated deployments like {{SECT: MirrorMode}} or {{SECT: N-Way Multi-Provider}},
but following the above sections and using either commercial support or community support should help. Also check the
{{SECT: Troubleshooting}} section.
It is also used for {{SECT:delta-syncrepl replication}}
-Note: An accesslog database is unique to a given master. It should
+Note: An accesslog database is unique to a given provider. It should
never be replicated.
H3: Access Logging Configuration
H3: Chaining Configuration
In order to demonstrate how this overlay works, we shall discuss a typical
-scenario which might be one master server and three Syncrepl slaves.
+scenario which might be one provider server and three Syncrepl replicas.
On each replica, add this near the top of the {{slapd.conf}}(5) file
(global), before any database definitions:
> overlay chain
-> chain-uri "ldap://ldapmaster.example.com"
+> chain-uri "ldap://ldapprovider.example.com"
> chain-idassert-bind bindmethod="simple"
> binddn="cn=Manager,dc=example,dc=com"
> credentials="<secret>"
Add this below your {{syncrepl}} statement:
-> updateref "ldap://ldapmaster.example.com/"
+> updateref "ldap://ldapprovider.example.com/"
-The {{B:chain-tls}} statement enables TLS from the slave to the ldap master.
+The {{B:chain-tls}} statement enables TLS from the replica to the ldap provider.
The DITs are exactly the same between these machines, therefore whatever user
-bound to the slave will also exist on the master. If that DN does not have
-update privileges on the master, nothing will happen.
+bound to the replica will also exist on the provider. If that DN does not have
+update privileges on the provider, nothing will happen.
-You will need to restart the slave after these {{slapd.conf}} changes.
+You will need to restart the replica after these {{slapd.conf}} changes.
Then, if you are using {{loglevel stats}} (256), you can monitor an
-{{ldapmodify}} on the slave and the master. (If you're using {{cn=config}}
+{{ldapmodify}} on the replica and the provider. (If you're using {{cn=config}}
no restart is required.)
-Now start an {{ldapmodify}} on the slave and watch the logs. You should expect
+Now start an {{ldapmodify}} on the replica and watch the logs. You should expect
something like:
-> Sep 6 09:27:25 slave1 slapd[29274]: conn=11 fd=31 ACCEPT from IP=143.199.102.216:45181 (IP=143.199.102.216:389)
-> Sep 6 09:27:25 slave1 slapd[29274]: conn=11 op=0 STARTTLS
-> Sep 6 09:27:25 slave1 slapd[29274]: conn=11 op=0 RESULT oid= err=0 text=
-> Sep 6 09:27:25 slave1 slapd[29274]: conn=11 fd=31 TLS established tls_ssf=256 ssf=256
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=1 BIND dn="uid=user1,ou=people,dc=example,dc=com" method=128
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=1 BIND dn="uid=user1,ou=People,dc=example,dc=com" mech=SIMPLE ssf=0
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=1 RESULT tag=97 err=0 text=
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=2 MOD dn="uid=user1,ou=People,dc=example,dc=com"
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=2 MOD attr=mail
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=2 RESULT tag=103 err=0 text=
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 op=3 UNBIND
-> Sep 6 09:27:28 slave1 slapd[29274]: conn=11 fd=31 closed
-> Sep 6 09:27:28 slave1 slapd[29274]: syncrepl_entry: LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_MODIFY)
-> Sep 6 09:27:28 slave1 slapd[29274]: syncrepl_entry: be_search (0)
-> Sep 6 09:27:28 slave1 slapd[29274]: syncrepl_entry: uid=user1,ou=People,dc=example,dc=com
-> Sep 6 09:27:28 slave1 slapd[29274]: syncrepl_entry: be_modify (0)
-
-And on the master you will see this:
-
-> Sep 6 09:23:57 ldapmaster slapd[2961]: conn=55902 op=3 PROXYAUTHZ dn="uid=user1,ou=people,dc=example,dc=com"
-> Sep 6 09:23:57 ldapmaster slapd[2961]: conn=55902 op=3 MOD dn="uid=user1,ou=People,dc=example,dc=com"
-> Sep 6 09:23:57 ldapmaster slapd[2961]: conn=55902 op=3 MOD attr=mail
-> Sep 6 09:23:57 ldapmaster slapd[2961]: conn=55902 op=3 RESULT tag=103 err=0 text=
-
-Note: You can clearly see the PROXYAUTHZ line on the master, indicating the
-proper identity assertion for the update on the master. Also note the slave
-immediately receiving the Syncrepl update from the master.
+> Sep 6 09:27:25 replica1 slapd[29274]: conn=11 fd=31 ACCEPT from IP=143.199.102.216:45181 (IP=143.199.102.216:389)
+> Sep 6 09:27:25 replica1 slapd[29274]: conn=11 op=0 STARTTLS
+> Sep 6 09:27:25 replica1 slapd[29274]: conn=11 op=0 RESULT oid= err=0 text=
+> Sep 6 09:27:25 replica1 slapd[29274]: conn=11 fd=31 TLS established tls_ssf=256 ssf=256
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=1 BIND dn="uid=user1,ou=people,dc=example,dc=com" method=128
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=1 BIND dn="uid=user1,ou=People,dc=example,dc=com" mech=SIMPLE ssf=0
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=1 RESULT tag=97 err=0 text=
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=2 MOD dn="uid=user1,ou=People,dc=example,dc=com"
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=2 MOD attr=mail
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=2 RESULT tag=103 err=0 text=
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 op=3 UNBIND
+> Sep 6 09:27:28 replica1 slapd[29274]: conn=11 fd=31 closed
+> Sep 6 09:27:28 replica1 slapd[29274]: syncrepl_entry: LDAP_RES_SEARCH_ENTRY(LDAP_SYNC_MODIFY)
+> Sep 6 09:27:28 replica1 slapd[29274]: syncrepl_entry: be_search (0)
+> Sep 6 09:27:28 replica1 slapd[29274]: syncrepl_entry: uid=user1,ou=People,dc=example,dc=com
+> Sep 6 09:27:28 replica1 slapd[29274]: syncrepl_entry: be_modify (0)
+
+And on the provider you will see this:
+
+> Sep 6 09:23:57 ldapprovider slapd[2961]: conn=55902 op=3 PROXYAUTHZ dn="uid=user1,ou=people,dc=example,dc=com"
+> Sep 6 09:23:57 ldapprovider slapd[2961]: conn=55902 op=3 MOD dn="uid=user1,ou=People,dc=example,dc=com"
+> Sep 6 09:23:57 ldapprovider slapd[2961]: conn=55902 op=3 MOD attr=mail
+> Sep 6 09:23:57 ldapprovider slapd[2961]: conn=55902 op=3 RESULT tag=103 err=0 text=
+
+Note: You can clearly see the PROXYAUTHZ line on the provider, indicating the
+proper identity assertion for the update on the provider. Also note the replica
+immediately receiving the Syncrepl update from the provider.
H3: Handling Chaining Errors
{{TERM:LDAP}} servers typically hold one or more subtrees of a
{{TERM:DIT}}. Replica (or shadow) servers hold shadow copies of
-entries held by one or more master servers. Changes are propagated
-from the master server to replica (slave) servers using LDAP Sync
+entries held by one or more provider servers. Changes are propagated
+from the provider server to replica servers using LDAP Sync
replication. An LDAP cache is a special type of replica which holds
entries corresponding to search filters instead of subtrees.
consumer {{TERM:LDAP}} server to maintain a shadow copy of a
{{TERM:DIT}} fragment. A syncrepl engine resides at the consumer
and executes as one of the {{slapd}}(8) threads. It creates and maintains a
-consumer replica by connecting to the replication provider to perform
+replica by connecting to the replication provider to perform
the initial DIT content load followed either by periodic content
polling or by timely updates upon content changes.
Syncrepl uses the LDAP Content Synchronization protocol (or LDAP Sync for
-short) as the replica synchronization protocol. LDAP Sync provides
+short) as the consumer synchronization protocol. LDAP Sync provides
a stateful replication which supports both pull-based and push-based
synchronization and does not mandate the use of a history store.
In pull-based replication the consumer periodically
syncrepl consumer and provider maintain their content status, the
consumer can poll the provider content to perform incremental
synchronization by asking for the entries required to make the
-consumer replica up-to-date with the provider content. Syncrepl
-also enables convenient management of replicas by maintaining replica
-status. The consumer replica can be constructed from a consumer-side
+consumer up-to-date with the provider content. Syncrepl
+also enables convenient management of consumers by maintaining replication
+status. The consumer database can be constructed from a consumer-side
or a provider-side backup at any synchronization status. Syncrepl
-can automatically resynchronize the consumer replica up-to-date
+can automatically resynchronize the consumer database to be up-to-date
with the current provider content.
Syncrepl supports both pull-based and push-based synchronization.
a persistent search and sends them necessary updates as the provider
replication content gets modified.
-With syncrepl, a consumer server can create a replica without
+With syncrepl, a consumer can create a replication agreement without
changing the provider's configurations and without restarting the
provider server, if the consumer server has appropriate access
privileges for the DIT fragment to be replicated. The consumer
Syncrepl supports partial, sparse, and fractional replications. The shadow
DIT fragment is defined by a general search criteria consisting of
-base, scope, filter, and attribute list. The replica content is
+base, scope, filter, and attribute list. The consumer content is
also subject to the access privileges of the bind identity of the
syncrepl replication connection.
phase of the refresh synchronization. It is possible to configure
a session log in the provider which stores the
{{EX:entryUUID}}s of a finite number of entries deleted from a
-database. Multiple replicas share the same session log. The syncrepl
-engine uses the
-delete phase if the session log is present and the state of the
-consumer server is recent enough that no session log entries are
+database. Multiple consumers share the same session log. The syncrepl
+engine uses the delete phase if the session log is present and the state
+of the consumer server is recent enough that no session log entries are
truncated after the last synchronization of the client. The syncrepl
engine uses the present phase if no session log is configured for
-the replication content or if the consumer replica is too outdated
+the replication content or if the consumer is too outdated
to be covered by the session log. The current design of the session
log store is memory based, so the information contained in the
session log is not persistent over multiple provider invocations.
recorded in the suffix entry's {{EX:contextCSN}} attribute, a
checkpoint will be immediately written with the new value.
-The consumer also stores its replica state, which is the provider's
+The consumer also stores its replication state, which is the provider's
{{EX:contextCSN}} received as a synchronization cookie, in the
-{{EX:contextCSN}} attribute of the suffix entry. The replica state
+{{EX:contextCSN}} attribute of the suffix entry. The replication state
maintained by a consumer server is used as the synchronization state
indicator when it performs subsequent incremental synchronization
with the provider server. It is also used as a provider-side
Because a general search filter can be used in the syncrepl
specification, some entries in the context may be omitted from the
synchronization content. The syncrepl engine creates a glue entry
-to fill in the holes in the replica context if any part of the
-replica content is subordinate to the holes. The glue entries will
+to fill in the holes in the consumer context if any part of the
+consumer content is subordinate to the holes. The glue entries will
not be returned in the search result unless {{ManageDsaIT}} control
is provided.
For example, suppose you have a database consisting of 102,400 objects of 1 KB
each. Further, suppose you routinely run a batch job to change the value of
a single two-byte attribute value that appears in each of the 102,400 objects
-on the master. Not counting LDAP and TCP/IP protocol overhead, each time you
+on the provider. Not counting LDAP and TCP/IP protocol overhead, each time you
run this job each consumer will transfer and process {{B:100 MB}} of data to
process {{B:200KB of changes!}}
changelog of a selectable depth in a separate database on the provider. The replication consumer
checks the changelog for the changes it needs and, as long as
the changelog contains the needed changes, the consumer fetches the changes
-from the changelog and applies them to its database. If, however, a replica
+from the changelog and applies them to its database. If, however, a consumer
is too far out of sync (or completely empty), conventional syncrepl is used to
bring it up to date and replication then switches back to the delta-syncrepl
mode.
For configuration, please see the {{SECT:Delta-syncrepl}} section.
-H3: N-Way Multi-Master replication
+H3: N-Way Multi-Provider Replication
-Multi-Master replication is a replication technique using Syncrepl to replicate
-data to multiple provider ("Master") Directory servers.
+Multi-Provider replication is a replication technique using Syncrepl to replicate
+data to multiple provider ("Provider") Directory servers.
-H4: Valid Arguments for Multi-Master replication
+H4: Valid Arguments for Multi-Provider replication
* If any provider fails, other providers will continue to accept updates
* Avoids a single point of failure
the network/globe.
* Good for Automatic failover/High Availability
-H4: Invalid Arguments for Multi-Master replication
+H4: Invalid Arguments for Multi-Provider replication
-(These are often claimed to be advantages of Multi-Master replication but
+(These are often claimed to be advantages of Multi-Provider replication but
those claims are false):
* It has {{B:NOTHING}} to do with load balancing
* Providers {{B:must}} propagate writes to {{B:all}} the other servers, which
means the network traffic and write load spreads across all
-of the servers the same as for single-master.
+of the servers the same as for single-provider.
* Server utilization and performance are at best identical for
-Multi-Master and Single-Master replication; at worst Single-Master is
+Multi-Provider and Single-Provider replication; at worst Single-Provider is
superior because indexing can be tuned differently to optimize for the
different usage patterns between the provider and the consumers.
-H4: Arguments against Multi-Master replication
+H4: Arguments against Multi-Provider replication
* Breaks the data consistency guarantees of the directory model
* {{URL:http://www.openldap.org/faq/data/cache/1240.html}}
* Typically, a particular machine cannot distinguish between losing contact
with a peer because that peer crashed, or because the network link has failed
* If a network is partitioned and multiple clients start writing to each of the
-"masters" then reconciliation will be a pain; it may be best to simply deny
+"providers" then reconciliation will be a pain; it may be best to simply deny
writes to the clients that are partitioned from the single provider
-For configuration, please see the {{SECT:N-Way Multi-Master}} section below
+For configuration, please see the {{SECT:N-Way Multi-Provider}} section below
H3: MirrorMode replication
MirrorMode is a hybrid configuration that provides all of the consistency
-guarantees of single-master replication, while also providing the high
-availability of multi-master. In MirrorMode two providers are set up to
-replicate from each other (as a multi-master configuration), but an
+guarantees of single-provider replication, while also providing the high
+availability of multi-provider. In MirrorMode two providers are set up to
+replicate from each other (as a multi-provider configuration), but an
external frontend is employed to direct all writes to only one of
the two servers. The second provider will only be used for writes if
the first provider crashes, at which point the frontend will switch to
H4: Arguments against MirrorMode
-* MirrorMode is not what is termed as a Multi-Master solution. This is because
+* MirrorMode is not what is termed as a Multi-Provider solution. This is because
writes have to go to just one of the mirror nodes at a time
* MirrorMode can be termed as Active-Active Hot-Standby, therefore an external
server (slapd in proxy mode) or device (hardware load balancer)
replication and has been completely removed from OpenLDAP 2.4.
The slurpd daemon was the original replication mechanism inherited from
-UMich's LDAP and operated in push mode: the master pushed changes to the
-slaves. It was replaced for many reasons, in brief:
+UMich's LDAP and operated in push mode: the provider pushed changes to the
+replicas. It was replaced for many reasons, in brief:
* It was not reliable
** It was extremely sensitive to the ordering of records in the replog
** It could easily go out of sync, at which point manual intervention was
- required to resync the slave database with the master directory
- ** It wasn't very tolerant of unavailable servers. If a slave went down
+ required to resync the replica database with the provider directory
+ ** It wasn't very tolerant of unavailable servers. If a replica went down
for a long time, the replog could grow to a size that was too large for
slurpd to process
* It only worked in push mode
- * It required stopping and restarting the master to add new slaves
- * It only supported single master replication
+ * It required stopping and restarting the provider to add new replicas
+ * It only supported single provider replication
Syncrepl has none of those weaknesses:
* Syncrepl can operate in either direction
* Consumers can be added at any time without touching anything on the
provider
- * Multi-master replication is supported
+ * Multi-provider replication is supported
H2: Configuring the different replication types
Because syncrepl is a consumer-side replication engine, the syncrepl
specification is defined in {{slapd.conf}}(5) of the consumer
server, not in the provider server's configuration file. The initial
-loading of the replica content can be performed either by starting
+loading of the consumer content can be performed either by starting
the syncrepl engine with no synchronization cookie or by populating
-the consumer replica by loading an {{TERM:LDIF}} file dumped as a
+the consumer by loading an {{TERM:LDIF}} file dumped as a
backup at the provider.
When loading from a backup, it is not required to perform the initial
loading from the up-to-date backup of the provider content. The
syncrepl engine will automatically synchronize the initial consumer
-replica to the current provider content. As a result, it is not
-required to stop the provider server in order to avoid the replica
+to the current provider content. As a result, it is not
+required to stop the provider server in order to avoid the replication
inconsistency caused by the updates to the provider content during
the content backup and loading process.
When replicating a large scale directory, especially in a bandwidth
-constrained environment, it is advised to load the consumer replica
+constrained environment, it is advised to load the consumer
from a backup instead of performing a full initial load using
syncrepl.
H4: Set up the consumer slapd
-The syncrepl replication is specified in the database section of
-{{slapd.conf}}(5) for the replica context. The syncrepl engine
+The syncrepl directive is specified in the database section of
+{{slapd.conf}}(5) for the consumer context. The syncrepl engine
is backend independent and the directive can be defined with any
database type.
cookie is a comma separated list of name=value pairs. Currently
supported syncrepl cookie fields are {{csn=<csn>}} and {{rid=<rid>}}.
{{<csn>}} represents the current synchronization state of the
-consumer replica. {{<rid>}} identifies a consumer replica locally
+consumer. {{<rid>}} identifies a consumer locally
within the consumer server. It is used to relate the cookie to the
syncrepl definition in {{slapd.conf}}(5) which has the matching
-replica identifier. The {{<rid>}} must have no more than 3 decimal
+{{<rid>}}. The {{<rid>}} must have no more than 3 decimal
digits. The command line cookie overrides the synchronization
-cookie stored in the consumer replica database.
+cookie stored in the consumer database.
H3: Delta-syncrepl
H4: Delta-syncrepl Provider configuration
-Setting up delta-syncrepl requires configuration changes on both the master and
+Setting up delta-syncrepl requires configuration changes on both the provider and
replica servers:
-> # Give the replica DN unlimited read access. This ACL needs to be
+> # Give the replicator DN unlimited read access. This ACL needs to be
> # merged with other ACL statements, and/or moved within the scope
> # of a database. The "by * break" portion causes evaluation of
> # subsequent rules. See slapd.access(5) for details.
> syncprov-nopresent TRUE
> syncprov-reloadhint TRUE
>
-> # Let the replica DN have limitless searches
+> # Let the replicator DN have limitless searches
> limits dn.exact="cn=replicator,dc=example,dc=com" time.soft=unlimited time.hard=unlimited size.soft=unlimited size.hard=unlimited
>
> # Primary database definitions
> # scan the accesslog DB every day, and purge entries older than 7 days
> logpurge 07+00:00 01+00:00
>
-> # Let the replica DN have limitless searches
+> # Let the replicator DN have limitless searches
> limits dn.exact="cn=replicator,dc=example,dc=com" time.soft=unlimited time.hard=unlimited size.soft=unlimited size.hard=unlimited
For more information, always consult the relevant man pages ({{slapo-accesslog}}(5) and {{slapd.conf}}(5))
>
> # syncrepl directives
> syncrepl rid=0
-> provider=ldap://ldapmaster.example.com:389
+> provider=ldap://ldapprovider.example.com:389
> bindmethod=simple
> binddn="cn=replicator,dc=example,dc=com"
> credentials=secret
> retry="60 +"
> syncdata=accesslog
>
-> # Refer updates to the master
-> updateref ldap://ldapmaster.example.com
+> # Refer updates to the provider
+> updateref ldap://ldapprovider.example.com
The above configuration assumes that you have a replicator identity defined
in your database that can be used to bind to the provider. In addition,
all of the databases (primary, replica, and the accesslog
storage database) should also have properly tuned {{DB_CONFIG}} files that meet
-your needs.
+your needs if using the bdb or hdb backends.
-Note: An accesslog database is unique to a given master. It should
+Note: An accesslog database is unique to a given provider. It should
never be replicated.
-H3: N-Way Multi-Master
+H3: N-Way Multi-Provider
-For the following example we will be using 3 Master nodes. Keeping in line with
-{{B:test050-syncrepl-multimaster}} of the OpenLDAP test suite, we will be configuring
+For the following example we will be using 3 Provider nodes. Keeping in line with
+{{B:test050-syncrepl-multiprovider}} of the OpenLDAP test suite, we will be configuring
{{slapd(8)}} via {{B:cn=config}}
This sets up the config database:
> olcDatabase: {0}config
> olcRootPW: secret
-This sets up syncrepl as a provider (since these are all masters):
+This sets up syncrepl as a provider (since these are all providers):
> dn: cn=module,cn=config
> objectClass: olcModuleList
> olcModulePath: /usr/local/libexec/openldap
> olcModuleLoad: syncprov.la
-Now we setup the first Master Node (replace $URI1, $URI2 and $URI3 etc. with your actual ldap urls):
+Now we setup the first Provider Node (replace $URI1, $URI2 and $URI3 etc. with your actual ldap urls):
> dn: cn=config
> changetype: modify
> add: olcMirrorMode
> olcMirrorMode: TRUE
-Now start up the Master and a consumer/s, also add the above LDIF to the first consumer, second consumer etc. It will then replicate {{B:cn=config}}. You now have N-Way Multimaster on the config database.
+Now start up the provider and a consumer/s, also add the above LDIF to the first consumer, second consumer etc. It will then replicate {{B:cn=config}}. You now have N-Way Multi-Provider on the config database.
-We still have to replicate the actual data, not just the config, so add to the master (all active and configured consumers/masters will pull down this config, as they are all syncing). Also, replace all {{${}}} variables with whatever is applicable to your setup:
+We still have to replicate the actual data, not just the config, so add to the provider (all active and configured consumers/providers will pull down this config, as they are all syncing). Also, replace all {{${}}} variables with whatever is applicable to your setup:
> dn: olcDatabase={1}$BACKEND,cn=config
> objectClass: olcDatabaseConfig
H4: MirrorMode Summary
You will now have a directory architecture that provides all of the
-consistency guarantees of single-master replication, while also providing the
-high availability of multi-master replication.
+consistency guarantees of single-provider replication, while also providing the
+high availability of multi-provider replication.
H3: Syncrepl Proxy
The following example is for a self-contained push-based replication solution:
> #######################################################################
-> # Standard OpenLDAP Master/Provider
+> # Standard OpenLDAP Provider
> #######################################################################
>
> include /usr/local/etc/openldap/schema/core.schema
> overlay syncprov
> syncprov-checkpoint 1000 60
>
-> # Let the replica DN have limitless searches
+> # Let the replicator DN have limitless searches
> limits dn.exact="cn=replicator,dc=suretecsystems,dc=com" time.soft=unlimited time.hard=unlimited size.soft=unlimited size.hard=unlimited
>
> database monitor
A replica configuration for this type of setup could be:
> #######################################################################
-> # Standard OpenLDAP Slave without Syncrepl
+> # Standard OpenLDAP Replica without Syncrepl
> #######################################################################
>
> include /usr/local/etc/openldap/schema/core.schema
>
> database mdb
> suffix "dc=suretecsystems,dc=com"
-> directory /usr/local/var/openldap-slave/data
+> directory /usr/local/var/openldap-consumer/data
>
> maxsize 85899345920
> checkpoint 1024 5
> rootdn "cn=admin,dc=suretecsystems,dc=com"
> rootpw testing
>
-> # Let the replica DN have limitless searches
+> # Let the replicator DN have limitless searches
> limits dn.exact="cn=replicator,dc=suretecsystems,dc=com" time.soft=unlimited time.hard=unlimited size.soft=unlimited size.hard=unlimited
>
> updatedn "cn=replicator,dc=suretecsystems,dc=com"
>
-> # Refer updates to the master
+> # Refer updates to the provider
> updateref ldap://localhost:9011
>
> database monitor
You can see we use the {{updatedn}} directive here and example ACLs ({{F:usr/local/etc/openldap/slapd.acl}}) for this could be:
-> # Give the replica DN unlimited read access. This ACL may need to be
+> # Give the replicator DN unlimited read access. This ACL may need to be
> # merged with other ACL statements.
>
> access to *
In order to support more replicas, just add more {{database ldap}} sections and
increment the {{syncrepl rid}} number accordingly.
-Note: You must populate the Master and Slave directories with the same data,
+Note: You must populate the Provider and Replica directories with the same data,
unlike when using normal Syncrepl
-If you do not have access to modify the master directory configuration you can
+If you do not have access to modify the provider directory configuration you can
configure a standalone ldap proxy, which might look like:
!import "push-based-standalone.png"; align="center"; title="Syncrepl Standalone Proxy Mode"
> [syncdata=default|accesslog|changelog]
-This directive specifies the current database as a replica of the
-master content by establishing the current {{slapd}}(8) as a
+This directive specifies the current database as a consumer of the
+provider content by establishing the current {{slapd}}(8) as a
replication consumer site running a syncrepl replication engine.
-The master database is located at the replication provider site
-specified by the {{EX:provider}} parameter. The replica database is
-kept up-to-date with the master content using the LDAP Content
+The provider database is located at the provider site
+specified by the {{EX:provider}} parameter. The consumer database is
+kept up-to-date with the provider content using the LDAP Content
Synchronization protocol. See {{REF:RFC4533}}
for more information on the protocol.
is non-negative and is no more than three decimal digits in length.
The {{EX:provider}} parameter specifies the replication provider site
-containing the master content as an LDAP URI. The {{EX:provider}}
+containing the provider content as an LDAP URI. The {{EX:provider}}
parameter specifies a scheme, a host and optionally a port where the
provider slapd instance can be found. Either a domain name or IP
address may be used for <hostname>. Examples are
{{EX:ldap://provider.example.com:389}} or {{EX:ldaps://192.168.1.1:636}}.
If <port> is not given, the standard LDAP port number (389 or 636) is used.
Note that the syncrepl uses a consumer-initiated protocol, and hence its
-specification is located at the consumer site, whereas the {{EX:replica}}
-specification is located at the provider site. {{EX:syncrepl}} and
-{{EX:replica}} directives define two independent replication
-mechanisms. They do not represent the replication peers of each other.
+specification is located on the consumer.
-The content of the syncrepl replica is defined using a search
+The content of the syncrepl consumer is defined using a search
specification as its result set. The consumer slapd will
send search requests to the provider slapd according to the search
specification. The search specification includes {{EX:searchbase}},
by the {{EX:interval}} parameter. It is set to one day by default.
In the {{EX:refreshAndPersist}} operation, a synchronization search
remains persistent in the provider {{slapd}} instance. Further updates to the
-master replica will generate {{EX:searchResultEntry}} to the consumer slapd
+provider will generate {{EX:searchResultEntry}} to the consumer slapd
as the search responses to the persistent synchronization search.
If an error occurs during replication, the consumer will attempt to reconnect
The schema checking can be enforced at the LDAP Sync consumer site
by turning on the {{EX:schemachecking}} parameter.
If it is turned on, every replicated entry will be checked for its
-schema as the entry is stored into the replica content.
-Every entry in the replica should contain those attributes
+schema as the entry is stored on the consumer.
+Every entry in the consumer should contain those attributes
required by the schema definition.
If it is turned off, entries will be stored without checking
schema conformance. The default is off.
The {{EX:binddn}} parameter gives the DN to bind as for the
syncrepl searches to the provider slapd. It should be a DN
which has read access to the replication content in the
-master database.
+provider database.
The {{EX:bindmethod}} is {{EX:simple}} or {{EX:sasl}},
depending on whether simple password-based authentication or
H4: olcUpdateref: <URL>
-This directive is only applicable in a slave slapd. It
+This directive is only applicable in a {{replica}} (or {{shadow}})
+{{slapd}}(8) instance. It
specifies the URL to return to clients which submit update
requests upon the replica.
If specified multiple times, each {{TERM:URL}} is provided.
\Example:
-> olcUpdateref: ldap://master.example.net
+> olcUpdateref: ldap://provider.example.net
H4: Sample Entries
> [syncdata=default|accesslog|changelog]
-This directive specifies the current database as a replica of the
-master content by establishing the current {{slapd}}(8) as a
+This directive specifies the current database as a consumer of the
+provider content by establishing the current {{slapd}}(8) as a
replication consumer site running a syncrepl replication engine.
-The master database is located at the replication provider site
-specified by the {{EX:provider}} parameter. The replica database is
-kept up-to-date with the master content using the LDAP Content
+The provider database is located at the replication provider site
+specified by the {{EX:provider}} parameter. The consumer database is
+kept up-to-date with the provider content using the LDAP Content
Synchronization protocol. See {{REF:RFC4533}}
for more information on the protocol.
is non-negative and is no more than three decimal digits in length.
The {{EX:provider}} parameter specifies the replication provider site
-containing the master content as an LDAP URI. The {{EX:provider}}
+containing the provider content as an LDAP URI. The {{EX:provider}}
parameter specifies a scheme, a host and optionally a port where the
provider slapd instance can be found. Either a domain name or IP
address may be used for <hostname>. Examples are
{{EX:ldap://provider.example.com:389}} or {{EX:ldaps://192.168.1.1:636}}.
If <port> is not given, the standard LDAP port number (389 or 636) is used.
Note that the syncrepl uses a consumer-initiated protocol, and hence its
-specification is located at the consumer site, whereas the {{EX:replica}}
-specification is located at the provider site. {{EX:syncrepl}} and
-{{EX:replica}} directives define two independent replication
-mechanisms. They do not represent the replication peers of each other.
+specification is located on the consumer.
-The content of the syncrepl replica is defined using a search
+The content of the syncrepl consumer is defined using a search
specification as its result set. The consumer slapd will
send search requests to the provider slapd according to the search
specification. The search specification includes {{EX:searchbase}},
by the {{EX:interval}} parameter. It is set to one day by default.
In the {{EX:refreshAndPersist}} operation, a synchronization search
remains persistent in the provider {{slapd}} instance. Further updates to the
-master replica will generate {{EX:searchResultEntry}} to the consumer slapd
+provider will generate {{EX:searchResultEntry}} to the consumer slapd
as the search responses to the persistent synchronization search.
If an error occurs during replication, the consumer will attempt to reconnect
The schema checking can be enforced at the LDAP Sync consumer site
by turning on the {{EX:schemachecking}} parameter.
If it is turned on, every replicated entry will be checked for its
-schema as the entry is stored into the replica content.
-Every entry in the replica should contain those attributes
+schema as the entry is stored on the consumer.
+Every entry in the consumer should contain those attributes
required by the schema definition.
If it is turned off, entries will be stored without checking
schema conformance. The default is off.
The {{EX:binddn}} parameter gives the DN to bind as for the
syncrepl searches to the provider slapd. It should be a DN
which has read access to the replication content in the
-master database.
+provider database.
The {{EX:bindmethod}} is {{EX:simple}} or {{EX:sasl}},
depending on whether simple password-based authentication or
H4: updateref <URL>
-This directive is only applicable in a {{slave}} (or {{shadow}})
+This directive is only applicable in a {{replica}} (or {{shadow}})
{{slapd}}(8) instance. It
specifies the URL to return to clients which submit update
requests upon the replica.
\Example:
-> updateref ldap://master.example.net
+> updateref ldap://provider.example.net
H3: BDB and HDB Database Directives
The next section of the configuration file defines a BDB
backend that will handle queries for things in the
"dc=example,dc=com" portion of the tree. The
-database is to be replicated to two slave slapds, one on
+database is to be replicated to two replica slapds, one on
truelies, the other on judgmentday. Indices are to be
maintained for several attributes, and the {{EX:userPassword}}
attribute is to be protected from unauthorized access.
x="96.974648"
y="113.75929"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara27617">Master/Provider</flowPara></flowRoot> <flowRoot
+ id="flowPara27617">Provider</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot3120"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial"
x="137.38075"
y="681.46503"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara15542">Replica Pool</flowPara></flowRoot> <flowRoot
+ id="flowPara15542">Consumer Pool</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot15534"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial"
x="137.38075"
y="681.46503"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara15544">Replica Pool</flowPara></flowRoot> <path
+ id="flowPara15544">Consumer Pool</flowPara></flowRoot> <path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.71494228px;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Arrow1Lstart);marker-end:url(#Arrow1Lend);stroke-opacity:1"
d="M 254.55844,186.23712 L 254.55844,261.49474"
id="path16515" />
id="svg7893"
inkscape:version="0.46"
sodipodi:docbase="/home/ghenry/Desktop"
- sodipodi:docname="n-way-multi-master.svg"
+ sodipodi:docname="n-way-multi-provider.svg"
sodipodi:version="0.32"
width="744.09448"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0"
- inkscape:export-filename="/home/ghenry/Desktop/n-way-multi-master.png"
+ inkscape:export-filename="/home/ghenry/Desktop/n-way-multi-provider.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
x="194.28572"
y="475.52304"
style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara6968">N-Way Multi-Master</flowPara></flowRoot> <text
+ id="flowPara6968">N-Way Multi-Provider</flowPara></flowRoot> <text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="316"
x="96.974648"
y="113.75929"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara27617">Master/Provider</flowPara></flowRoot> <g
+ id="flowPara27617">Provider</flowPara></flowRoot> <g
id="g3073"
transform="matrix(0.1267968,0,0,0.1710106,264.00249,370.01498)">
<path
x="412.14224"
y="279.42432"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara3136">Primary directory also contains back-ldap databases that replicate from the Master directory and push out changes to the replicas</flowPara></flowRoot> <flowRoot
+ id="flowPara3136">Primary directory also contains back-ldap databases that replicate from the provider directory and push out changes to the replicas</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot6975"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="96.974648"
y="113.75929"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara27617">Master/Provider</flowPara></flowRoot> <g
+ id="flowPara27617">Provider</flowPara></flowRoot> <g
id="g3073"
transform="matrix(0.1267968,0,0,0.1710106,264.00249,370.01498)"
inkscape:export-filename="/anything/src/openldap/ldap/doc/guide/images/src/push-based-complete.png"
x="412.14224"
y="279.42432"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Arial" /></flowRegion><flowPara
- id="flowPara3136">Primary directory is a standard OpenLDAP Master, ldap proxy using Syncrepl pulls in changes from the master and pushes out to replicas. Useful if you don't have access to original master.</flowPara></flowRoot> <flowRoot
+ id="flowPara3136">Primary directory is a standard OpenLDAP provider, ldap proxy using Syncrepl pulls in changes from the provider and pushes out to replicas. Useful if you don't have access to original provider.</flowPara></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot6975"
style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
.TP
.B LDAP_SCHEMA_DIRECTORY_OPERATION
the attribute type is operational and is pertinent to the directory
-itself, i.e. it has the same value on all servers that master the
+itself, i.e. it has the same value on all servers that provide the
entry containing this attribute type.
.TP
.B LDAP_SCHEMA_DISTRIBUTED_OPERATION
.B LDAP_SCHEMA_DSA_OPERATION
the attribute type is operational and is pertinent to the directory
server itself, i.e. it may have different values for the same entry
-when retrieved from different servers that master the entry.
+when retrieved from different servers that provide the entry.
.LP
Object classes can be of three kinds:
.TP
to 3 hexadecimal digits). The ID may also be specified as a
hexadecimal ID by prefixing the value with "0x".
Non-zero IDs are
-required when using multimaster replication and each master must have a
-unique non-zero ID. Note that this requirement also applies to separate masters
+required when using multi-provider replication and each provider must have a
+unique non-zero ID. Note that this requirement also applies to separate providers
contributing to a glued set of databases.
If the URL is provided, this directive may be specified
multiple times, providing a complete list of participating servers
and their IDs. The fully qualified hostname of each server should be
used in the supplied URLs. The IDs are used in the "replica id" field
of all CSNs generated by the specified server. The default value is zero, which
-is only valid for single master replication.
+is only valid for single provider replication.
Example:
.LP
.nf
resolve an entry, used to avoid infinite alias loops. The default is 15.
.TP
.B olcMirrorMode: TRUE | FALSE
-This option puts a replica database into "mirror" mode. Update
+This option puts a consumer database into "mirror" mode. Update
operations will be accepted from any user, not just the updatedn. The
database must already be configured as syncrepl consumer
before this keyword may be set. This mode also requires a
.B [logfilter=<filter str>]
.B [syncdata=default|accesslog|changelog]
.RS
-Specify the current database as a replica which is kept up-to-date with the
-master content by establishing the current
+Specify the current database as a consumer which is kept up-to-date with the
+provider content by establishing the current
.BR slapd (8)
as a replication consumer site running a
.B syncrepl
replication engine.
-The replica content is kept synchronized to the master content using
+The consumer content is kept synchronized to the provider content using
the LDAP Content Synchronization protocol. Refer to the
"OpenLDAP Administrator's Guide" for detailed information on
setting up a replicated
It is a non-negative integer having no more than three decimal digits.
.B provider
-specifies the replication provider site containing the master content
+specifies the replication provider site containing the provider content
as an LDAP URI. If <port> is not given, the standard LDAP port number
(389 or 636) is used.
The content of the
.B syncrepl
-replica is defined using a search
+consumer is defined using a search
specification as its result set. The consumer
.B slapd
will send search requests to the provider
In the
.B refreshAndPersist
operation, a synchronization search remains persistent in the provider slapd.
-Further updates to the master replica will generate
+Further updates to the provider will generate
.B searchResultEntry
to the consumer slapd as the search responses to the persistent
synchronization search. If the initial search fails due to an error, the
.RE
.TP
.B olcUpdateDN: <dn>
-This option is only applicable in a slave
+This option is only applicable in a replica
database.
It specifies the DN permitted to update (subject to access controls)
the replica. It is only needed in certain push-mode
.I should not
be the same as the
.B rootdn
-used at the master.
+used at the provider.
.TP
.B olcUpdateRef: <url>
Specify the referral to pass back when
to 3 hexadecimal digits). The ID may also be specified as a
hexadecimal ID by prefixing the value with "0x".
Non-zero IDs are
-required when using multimaster replication and each master must have a
-unique non-zero ID. Note that this requirement also applies to separate masters
+required when using multi-provider replication and each provider must have a
+unique non-zero ID. Note that this requirement also applies to separate providers
contributing to a glued set of databases.
If the URL is provided, this directive may be specified
multiple times, providing a complete list of participating servers
and their IDs. The fully qualified hostname of each server should be
used in the supplied URLs. The IDs are used in the "replica id" field
of all CSNs generated by the specified server. The default value is zero, which
-is only valid for single master replication.
+is only valid for single provider replication.
Example:
.LP
.nf
resolve an entry, used to avoid infinite alias loops. The default is 15.
.TP
.B mirrormode on | off
-This option puts a replica database into "mirror" mode. Update
+This option puts a consumer database into "mirror" mode. Update
operations will be accepted from any user, not just the updatedn. The
database must already be configured as a syncrepl consumer
before this keyword may be set. This mode also requires a
.B [logfilter=<filter str>]
.B [syncdata=default|accesslog|changelog]
.RS
-Specify the current database as a replica which is kept up-to-date with the
-master content by establishing the current
+Specify the current database as a consumer which is kept up-to-date with the
+provider content by establishing the current
.BR slapd (8)
as a replication consumer site running a
.B syncrepl
replication engine.
-The replica content is kept synchronized to the master content using
+The consumer content is kept synchronized to the provider content using
the LDAP Content Synchronization protocol. Refer to the
"OpenLDAP Administrator's Guide" for detailed information on
setting up a replicated
to three decimal digits).
.B provider
-specifies the replication provider site containing the master content
+specifies the replication provider site containing the provider content
as an LDAP URI. If <port> is not given, the standard LDAP port number
(389 or 636) is used.
The content of the
.B syncrepl
-replica is defined using a search
+consumer is defined using a search
specification as its result set. The consumer
.B slapd
will send search requests to the provider
In the
.B refreshAndPersist
operation, a synchronization search remains persistent in the provider slapd.
-Further updates to the master replica will generate
+Further updates to the provider will generate
.B searchResultEntry
to the consumer slapd as the search responses to the persistent
synchronization search. If the initial search fails due to an error, the
.RE
.TP
.B updatedn <dn>
-This option is only applicable in a slave
+This option is only applicable in a replica
database.
It specifies the DN permitted to update (subject to access controls)
the replica. It is only needed in certain push-mode
.I should not
be the same as the
.B rootdn
-used at the master.
+used at the provider.
.TP
.B updateref <url>
Specify the referral to pass back when
.SH REPLICATION
This implementation of RFC 2589 provides a restricted interpretation of how
-dynamic objects replicate. Only the master takes care of handling dynamic
-object expiration, while replicas simply see the dynamic object as a plain
+dynamic objects replicate. Only the provider takes care of handling dynamic
+object expiration, while consumers simply see the dynamic object as a plain
object.
When replicating these objects, one needs to explicitly exclude the
read-write functionality, but it is mainly intended for use
with local storage backends. The maintenance operations it performs
are internal to the server on which the overlay is configured and
-are never replicated. Replica servers should be configured with their
+are never replicated. Consumer servers should be configured with their
own instances of the memberOf overlay if it is desired to maintain
-these memberOf attributes on the replicas. Note that slapo-memberOf
+these memberOf attributes on the consumers. Note that slapo-memberOf
is not compatible with syncrepl based replication, and should not be
used in a replicated environment. An alternative is to use slapo-dynlist
to emulate slapo-memberOf behavior.
.B ppolicy_forward_updates
Specify that policy state changes that result from Bind operations (such
as recording failures, lockout, etc.) on a consumer should be forwarded
-to a master instead of being written directly into the consumer's local
+to a provider instead of being written directly into the consumer's local
database. This setting is only useful on a replication consumer, and
also requires the
.B updateref
Note that the current IETF Password Policy proposal does not define
how these operational attributes are expected to behave in a
replication environment. In general, authentication attempts on
-a slave server only affect the copy of the operational attributes
-on that slave and will not affect any attributes for
-a user's entry on the master server. Operational attribute changes
-resulting from authentication attempts on a master server
-will usually replicate to the slaves (and also overwrite
-any changes that originated on the slave).
+a replica server only affect the copy of the operational attributes
+on that replica and will not affect any attributes for
+a user's entry on the provider. Operational attribute changes
+resulting from authentication attempts on a provider
+will usually replicate to the replicas (and also overwrite
+any changes that originated on the replica).
These behaviors are not guaranteed and are subject to change
when a formal specification emerges.
.B \-s
disable schema checking. This option is intended to be used when loading
databases containing special objects, such as fractional objects on a
-partial replica. Loading normal objects which do not conform to
+partial consumer. Loading normal objects which do not conform to
schema may result in unexpected and ill behavior.
.TP
.BI \-S \ SID
.B rid
must be provided in order for any other specified values to be used.
.B sid
-is the server id in a multi-master/mirror-mode configuration.
+is the server id in a multi-provider configuration.
.B csn
is the commit sequence number received by a previous synchronization
-and represents the state of the consumer replica content which the
+and represents the state of the consumer content which the
syncrepl engine will synchronize to the current provider content.
-In case of \fImirror-mode\fP or \fImulti-master\fP replication agreement,
+In case of \fImulti-provider\fP replication agreement,
multiple
.B csn
values, semicolon separated, can appear.
# This file should be world readable but not world writable.
#BASE dc=example,dc=com
-#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
+#URI ldap://ldap.example.com ldap://ldap-provider.example.com:666
#SIZELIMIT 12
#TIMELIMIT 15
/*
* do the add if 1 && (2 || 3)
* 1) there is an add function implemented in this backend;
- * 2) this backend is master for what it holds;
+ * 2) this backend is the provider for what it holds;
* 3) it's a replica and the dn supplied is the updatedn.
*/
if ( op->o_bd->be_add ) {
op->o_bd = glue_back_select (b0, &op->o_req_ndn);
- /* If we're on the master backend, let overlay framework handle it */
+ /* If we're on the primary backend, let overlay framework handle it */
if ( op->o_bd == b0 )
return SLAP_CB_CONTINUE;
BackendDB *be = op->o_bd;
be = glue_back_select (op->o_bd, &op->o_req_ndn);
- /* If we're on the master backend, let overlay framework handle it.
+ /* If we're on the primary backend, let overlay framework handle it.
* Otherwise, bail out.
*/
return ( op->o_bd == be ) ? SLAP_CB_CONTINUE : SLAP_CB_BYPASS;
/* ITS#4615 - overlays configured above the glue overlay should be
* invoked for the entire glued tree. Overlays configured below the
- * glue overlay should only be invoked on the master backend.
+ * glue overlay should only be invoked on the primary backend.
* So, if we're searching on any subordinates, we need to force the
* current overlay chain to stop processing, without stopping the
* overall callback flow.
glue_sub_search( Operation *op, SlapReply *rs, BackendDB *b0,
slap_overinst *on )
{
- /* Process any overlays on the master backend */
+ /* Process any overlays on the primary backend */
if ( op->o_bd == b0 && on->on_next ) {
BackendInfo *bi = op->o_bd->bd_info;
int rc = SLAP_CB_CONTINUE;
int rc;
struct timeval tv;
- /* Init connection to master */
+ /* Init connection to provider */
rc = ldap_initialize( &ld, sb->sb_uri.bv_val );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
/*
* do the delete if 1 && (2 || 3)
* 1) there is a delete function implemented in this backend;
- * 2) this backend is master for what it holds;
+ * 2) this backend is the provider for what it holds;
* 3) it's a replica and the dn supplied is the update_ndn.
*/
if ( op->o_bd->be_delete ) {
urls = ch_strdup( optarg );
break;
- case 'c': /* provide sync cookie, override if exist in replica */
+ case 'c': /* provide sync cookie, override if exist in consumer */
scp = (struct sync_cookie *) ch_calloc( 1,
sizeof( struct sync_cookie ));
ber_str2bv( optarg, 0, 1, &scp->octet_str );
/*
* do the modify if 1 && (2 || 3)
* 1) there is a modify function implemented in this backend;
- * 2) this backend is master for what it holds;
+ * 2) this backend is the provider for what it holds;
* 3) it's a replica and the dn supplied is the update_ndn.
*/
if ( op->o_bd->be_modify ) {
/*
* do the modrdn if 1 && (2 || 3)
* 1) there is a modrdn function implemented in this backend;
- * 2) this backend is master for what it holds;
+ * 2) this backend is the provider for what it holds;
* 3) it's a replica and the dn supplied is the update_ndn.
*/
if ( op->o_bd->be_modrdn ) {
ttl = di->di_min_ttl;
}
- /* This does not apply to multi-master case */
+ /* This does not apply to multi-provider case */
if ( !( !SLAP_SINGLE_SHADOW( op->o_bd ) || be_isupdate( op ) ) ) {
/* we SHOULD return a referral in this case */
BerVarray defref = op->o_bd->be_update_refs
if ( ppolicy_restrict( op, rs ) != SLAP_CB_CONTINUE )
return rs->sr_err;
- /* If this is a replica, assume the master checked everything */
+ /* If this is a replica, assume the provider checked everything */
if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) )
return SLAP_CB_CONTINUE;
if ( rc != LDAP_SUCCESS ) return SLAP_CB_CONTINUE;
/* If this is a replica, we may need to tweak some of the
- * master's modifications. Otherwise, just pass it through.
+ * provider's modifications. Otherwise, just pass it through.
*/
if ( SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) {
Modifications **prev;
goto error_return;
}
- /* This does not apply to multi-master case */
+ /* This does not apply to multi-provider case */
if(!( !SLAP_SINGLE_SHADOW( op->o_bd ) || be_isupdate( op ))) {
/* we SHOULD return a referral in this case */
BerVarray defref = op->o_bd->be_update_refs
#define SLAP_DBFLAG_DYNAMIC 0x0400U /* this db allows dynamicObjects */
#define SLAP_DBFLAG_MONITORING 0x0800U /* custom monitoring enabled */
#define SLAP_DBFLAG_SHADOW 0x8000U /* a shadow */
-#define SLAP_DBFLAG_SINGLE_SHADOW 0x4000U /* a single-master shadow */
+#define SLAP_DBFLAG_SINGLE_SHADOW 0x4000U /* a single-provider shadow */
#define SLAP_DBFLAG_SYNC_SHADOW 0x1000U /* a sync shadow */
#define SLAP_DBFLAG_SLURP_SHADOW 0x2000U /* a slurp shadow */
#define SLAP_DBFLAG_SHADOW_MASK (SLAP_DBFLAG_SHADOW|SLAP_DBFLAG_SINGLE_SHADOW|SLAP_DBFLAG_SYNC_SHADOW|SLAP_DBFLAG_SLURP_SHADOW)
#define SLAP_DBFLAG_CLEAN 0x10000U /* was cleanly shutdown */
#define SLAP_DBFLAG_ACL_ADD 0x20000U /* check attr ACLs on adds */
#define SLAP_DBFLAG_SYNC_SUBENTRY 0x40000U /* use subentry for context */
-#define SLAP_DBFLAG_MULTI_SHADOW 0x80000U /* uses mirrorMode/multi-master */
+#define SLAP_DBFLAG_MULTI_SHADOW 0x80000U /* uses multi-provider */
slap_mask_t be_flags;
#define SLAP_DBFLAGS(be) ((be)->be_flags)
#define SLAP_NOLASTMOD(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_NOLASTMOD)
slap_access_t be_dfltaccess; /* access given if no acl matches */
AttributeName *be_extra_anlist; /* attributes that need to be added to search requests (ITS#6513) */
- /* Replica Information */
+ /* Consumer Information */
struct berval be_update_ndn; /* allowed to make changes (in replicas) */
BerVarray be_update_refs; /* where to refer modifying clients to */
struct be_pcl *be_pending_csn_list;
break;
}
- /* If the named base is a glue master, operate on the
+ /* If the named base is a glue primary, operate on the
* entire context
*/
if ( SLAP_GLUE_INSTANCE( be ) ) {
continue;
/* If just doing the first by default and it is a
- * glue subordinate, find the master.
+ * glue subordinate, find the primary.
*/
if ( SLAP_GLUE_SUBORDINATE(be) ) {
nosubordinates = 1;
static int syncrepl_add_glue_ancestors(
Operation* op, Entry *e );
-/* delta-mmr overlay handler */
+/* delta-mpr overlay handler */
static int syncrepl_op_modify( Operation *op, SlapReply *rs );
/* callback functions */
static AttributeDescription *sync_descs[4];
-/* delta-mmr */
+/* delta-mpr */
static AttributeDescription *ad_reqMod, *ad_reqDN;
typedef struct logschema {
overlay_register( &syncrepl_ov );
}
- /* delta-MMR needs the overlay, nothing else does.
+ /* delta-MPR needs the overlay, nothing else does.
* This must happen before accesslog overlay is configured.
*/
if ( si->si_syncdata &&
* in use. This may be complicated by the use of the glue
* overlay.
*
- * Typically there is a single syncprov mastering the entire
+ * Typically there is a single syncprov controlling the entire
* glued tree. In that case, our contextCSN updates should
- * go to the master DB. But if there is no syncprov on the
- * master DB, then nothing special is needed here.
+ * go to the primary DB. But if there is no syncprov on the
+ * primary DB, then nothing special is needed here.
*
* Alternatively, there may be individual syncprov overlays
* on each glued branch. In that case, each syncprov only
OpExtraSync oes;
op->orm_modlist = modlist;
op->o_bd = si->si_wbe;
- /* delta-mmr needs additional checks in syncrepl_op_modify */
+ /* delta-mpr needs additional checks in syncrepl_op_modify */
if ( SLAP_MULTIMASTER( op->o_bd )) {
oes.oe.oe_key = (void *)syncrepl_message_to_op;
oes.oe_si = si;
op->ors_limit = NULL;
op->ors_attrsonly = 0;
op->ors_filter = filter_dup( si->si_filter, op->o_tmpmemctx );
- /* In multimaster, updates can continue to arrive while
+ /* In multi-provider, updates can continue to arrive while
* we're searching. Limit the search result to entries
* older than our newest cookie CSN.
*/
uidNumber: 5387
homeDirectory: /home/user3
loginShell: /bin/false
-gecos: Slave
+gecos: Consumer
gidNumber: 100
userPassword: abc
-cn: Slave
-sn: Slave
+cn: Consumer
+sn: Consumer
dn: uid=user2,ou=people,dc=example,dc=com
objectClass: person
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
echo "This test tracks a case where changes are incorrectly skipped"
echo "See http://www.openldap.org/its/index.cgi/?findid=8444 for more information."
-MMR=4
+MPR=4
XDIR=$TESTDIR/srv
mkdir -p $TESTDIR
echo "Initializing server configurations..."
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
DBDIR=${XDIR}$n/db
CFDIR=${XDIR}$n/slapd.d
KILLPIDS=
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
MYURI=`eval echo '$URI'$n`
MYLOG=`eval echo '$LOG'$n`
CFDIR=${XDIR}$n/slapd.d
TOON4="cn=Bugs_Bunny,ou=People,$BASEDN"
for member in $TOON1 $TOON2 $TOON3 $TOON4; do
n=1
- while [ $n -le $MMR ]; do
+ while [ $n -le $MPR ]; do
>$SEARCHOUT
echo "# Searching member $member after removal from Cartoonia group, provider $n" >> $SEARCHOUT
MYURI=`eval echo '$URI'$n`
echo "Searching entire database on each provider after deleting Cartoonia group"
n=1
- while [ $n -le $MMR ]; do
+ while [ $n -le $MPR ]; do
echo "# Searching the entire database after deleting Cartoonia, provider $n" >> $SEARCHOUT
MYURI=`eval echo '$URI'$n`
$LDAPSEARCH -S "" -b "$BASEDN" -H $MYURI -D "cn=manager,$BASEDN" -w $PASSWD \
echo "Searching entire database on each provider after re-adding Cartoonia group"
n=1
- while [ $n -le $MMR ]; do
+ while [ $n -le $MPR ]; do
>$SEARCHOUT
echo "# Searching the entire database after re-adding Cartoonia, provider $n" >> $SEARCHOUT
MYURI=`eval echo '$URI'$n`
fi
# This mimics the scenario where a single server has been used until now (no
-# syncprov either, so no contextCSN) and we convert it to a delta-MMR setup:
+# syncprov either, so no contextCSN) and we convert it to a delta-MPR setup:
# 1. stop the server (note that there is likely no contextCSN in the DB at this point)
# 2. configure all servers to delta-replicate from each other and start them up
# - empty servers will start with a refresh of the main DB
echo "This test tracks a case where slapd deadlocks during a significant write load"
echo "See http://www.openldap.org/its/index.cgi/?findid=8752 for more information."
-MMR=4
+MPR=4
iterations=20000
check_sync_every=100
MAPSIZE=`expr 100 \* 1024 \* 1024`
ITSDIR=$DATADIR/regressions/its$ITS
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
DBDIR=${XDIR}$n/db
mkdir -p ${XDIR}$n $DBDIR.1 $DBDIR.2
n=`expr $n + 1`
exit $RC
fi
-echo "Stopping slapd and reworking configuration for MMR..."
+echo "Stopping slapd and reworking configuration for MPR..."
kill -HUP $KILLPIDS
wait $KILLPIDS
KILLPIDS=
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
MYURI=`eval echo '$URI'$n`
MYLOG=`eval echo '$LOG'$n`
MYCONF=`eval echo '$CONF'$n`
echo "Starting provider slapd on TCP/IP URI $MYURI"
- . $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf.mmr > $TESTDIR/slapd.conf
- sed -e "s/MMR/$n/g" -e "s/wronglog/log/" -e "s/@MAPSIZE@/$MAPSIZE/" $TESTDIR/slapd.conf > $MYCONF
+ . $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf.mpr > $TESTDIR/slapd.conf
+ sed -e "s/MPR/$n/g" -e "s/wronglog/log/" -e "s/@MAPSIZE@/$MAPSIZE/" $TESTDIR/slapd.conf > $MYCONF
j=1
- while [ $j -le $MMR ]; do
+ while [ $j -le $MPR ]; do
MMCURI=`eval echo '$URI'$j`
sed -e "s|MMC${j}|${MMCURI}|" $MYCONF > $TESTDIR/slapd.conf
mv $TESTDIR/slapd.conf $MYCONF
n=`expr $n + 1`
done
-echo "Setting up accesslog on each master..."
+echo "Setting up accesslog on each provider..."
n=1
-while [ $n -le $MMR ]; do
- echo "Modifying dn: cn=Elmer_Fudd,ou=People,$BASEDN on master $n"
+while [ $n -le $MPR ]; do
+ echo "Modifying dn: cn=Elmer_Fudd,ou=People,$BASEDN on provider $n"
MYURI=`eval echo '$URI'$n`
$LDAPMODIFY -v -D "$MANAGERDN" -H $MYURI -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
for i in 0 1 2 3 4 5; do
j=1
- while [ $j -le $MMR ]; do
+ while [ $j -le $MPR ]; do
MYURI=`eval echo '$URI'$j`
$LDAPSEARCH -b "$BASEDN" -H "$MYURI" \
'*' '+' >"$TESTDIR/server$j.out" 2>&1
in_sync=1
j=1
- while [ $j -lt $MMR ]; do
+ while [ $j -lt $MPR ]; do
k=$j
j=`expr $j + 1`
$CMP "$TESTDIR/server$k.flt" "$TESTDIR/server$j.flt" > $CMPOUT
echo "The next step of the test will perform $iterations random write operations and may take some time."
echo "As this test is for a deadlock, it will take manual intervention to exit the test if one occurs."
-echo "Starting random master/entry modifications..."
+echo "Starting random provider/entry modifications..."
DN1="cn=Elmer_Fudd,ou=People,$BASEDN"
VAL1="Fudd"
while [ $n -le $iterations ]; do
seed=`date +%N|sed s/...$//`
rvalue=`echo|awk "BEGIN {srand($seed)
-{print int(1+rand()*$MMR)}}"`
+{print int(1+rand()*$MPR)}}"`
MYURI=`eval echo '$URI'$rvalue`
seed=`date +%N|sed s/...$//`
rvalue=`echo|awk "BEGIN {srand($seed)
echo "Checking replication status before we start iteration $n..."
for i in 0 1 2 3 4 5; do
j=1
- while [ $j -le $MMR ]; do
+ while [ $j -le $MPR ]; do
MYURI=`eval echo '$URI'$j`
echo "Reading database from server $j..."
$LDAPSEARCH -b "$BASEDN" -H "$MYURI" \
in_sync=1
j=1
- while [ $j -lt $MMR ]; do
+ while [ $j -lt $MPR ]; do
k=`expr $j + 1`
$CMP "$TESTDIR/server$j.flt" "$TESTDIR/server$k.flt" > $CMPOUT
if test $? != 0 ; then
echo "Starting servers again, this time with the wrong logbase setting..."
KILLPIDS=
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
MYURI=`eval echo '$URI'$n`
MYLOG=`eval echo '$LOG'$n`
MYCONF=`eval echo '$CONF'$n`
echo "Starting provider slapd on TCP/IP URI $MYURI"
- . $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf.mmr > $TESTDIR/slapd.conf
- sed -e "s/MMR/$n/g" -e "s/@MAPSIZE@/$MAPSIZE/" $TESTDIR/slapd.conf > $MYCONF
+ . $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf.mpr > $TESTDIR/slapd.conf
+ sed -e "s/MPR/$n/g" -e "s/@MAPSIZE@/$MAPSIZE/" $TESTDIR/slapd.conf > $MYCONF
j=1
- while [ $j -le $MMR ]; do
+ while [ $j -le $MPR ]; do
MMCURI=`eval echo '$URI'$j`
sed -e "s|MMC${j}|${MMCURI}|" $MYCONF > $TESTDIR/slapd.conf
mv $TESTDIR/slapd.conf $MYCONF
n=`expr $n + 1`
done
- echo "Starting random master/entry modifications..."
+ echo "Starting random provider/entry modifications..."
n=1
while [ $n -le $iterations ]; do
seed=`date +%N|sed s/...$//`
rvalue=`echo|awk "BEGIN {srand($seed)
- {print int(1+rand()*$MMR)}}"`
+ {print int(1+rand()*$MPR)}}"`
MYURI=`eval echo '$URI'$rvalue`
seed=`date +%N|sed s/...$//`
rvalue=`echo|awk "BEGIN {srand($seed)
echo "Checking replication status before we start iteration $n..."
for i in 0 1 2 3 4 5; do
j=1
- while [ $j -le $MMR ]; do
+ while [ $j -le $MPR ]; do
MYURI=`eval echo '$URI'$j`
echo "Reading database from server $j..."
$LDAPSEARCH -b "$BASEDN" -H "$MYURI" \
in_sync=1
j=1
- while [ $j -lt $MMR ]; do
+ while [ $j -lt $MPR ]; do
k=`expr $j + 1`
$CMP "$TESTDIR/server$j.flt" "$TESTDIR/server$k.flt" > $CMPOUT
if test $? != 0 ; then
include @DATADIR@/test.schema
#
-pidfile @TESTDIR@/slapd.MMR.pid
-argsfile @TESTDIR@/slapd.MMR.args
+pidfile @TESTDIR@/slapd.MPR.pid
+argsfile @TESTDIR@/slapd.MPR.args
-serverid MMR
+serverid MPR
#mod#modulepath ../servers/slapd/back-@BACKEND@/:../servers/slapd/overlays
#mod#moduleload back_@BACKEND@.la
#monitormod#modulepath ../servers/slapd/back-monitor/
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw secret
-#~null~#directory @TESTDIR@/srvMMR/db.1
+#~null~#directory @TESTDIR@/srvMPR/db.1
#indexdb#index objectClass eq
#indexdb#index cn,sn,uid pres,eq,sub
database @BACKEND@
suffix "cn=log"
rootdn "cn=Manager,dc=example,dc=com"
-#~null~#directory @TESTDIR@/srvMMR/db.2
+#~null~#directory @TESTDIR@/srvMPR/db.2
#indexdb#index objectClass eq
#indexdb#index entryCSN,entryUUID,reqEnd,reqResult,reqStart eq
#mdb#maxsize @MAPSIZE@
echo "This test tracks a case where changes are not refreshed when an old db is reloaded"
echo "See http://www.openldap.org/its/index.cgi/?findid=8800 for more information."
-MMR=4
+MPR=4
XDIR=$TESTDIR/srv
mkdir -p $TESTDIR
n=1
-while [ $n -le $MMR ]; do
- echo "Initializing server configuration for MMR$n..."
+while [ $n -le $MPR ]; do
+ echo "Initializing server configuration for MPR$n..."
DBDIR=${XDIR}$n/db
CFDIR=${XDIR}$n/slapd.d
KILLPIDS=
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
MYURI=`eval echo '$URI'$n`
MYLOG=`eval echo '$LOG'$n`
CFDIR=${XDIR}$n/slapd.d
sleep 60
echo "done"
-echo -n "Stopping MMR1 slapd..."
+echo -n "Stopping MPR1 slapd..."
kill -HUP $MPID
wait $MPID
KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $MPID / /"`;
sleep $SLEEP2
echo "done"
-echo -n "Wiping primary and accesslog databases for MMR1..."
+echo -n "Wiping primary and accesslog databases for MPR1..."
DBDIR="$TESTDIR/srv1/db"
CFDIR="$TESTDIR/srv1/slapd.d"
mv $DBDIR.1 $DBDIR.1.orig
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for proxy cache testing
+# provider slapd config -- for proxy cache testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for proxy cache testing
+# provider slapd config -- for proxy cache testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# slave slapd config -- for testing of Delta SYNC replication
+# consumer slapd config -- for testing of Delta SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
#null#bind on
#~null~#directory @TESTDIR@/db.2.a
-# master slapd config -- for testing of Delta SYNC replication
+# provider slapd config -- for testing of Delta SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
#accesslogmod#moduleload accesslog.la
#######################################################################
-# master database definitions
+# provider database definitions
#######################################################################
database @BACKEND@
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing (needs updating)
+# provider slapd config -- for testing (needs updating)
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# slave slapd config -- for default referral testing
+# consumer slapd config -- for default referral testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# slave slapd config -- for testing of replication
+# consumer slapd config -- for testing of replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
# HACK: use the RootDN of the monitor database as UpdateDN so ACLs apply
# without the need to write the UpdateDN before starting replication
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# slave slapd config -- for testing of SYNC replication with intermediate proxy
+# consumer slapd config -- for testing of SYNC replication with intermediate proxy
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# slave slapd config -- for testing of SYNC replication
+# consumer slapd config -- for testing of SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
#null#bind on
#~null~#directory @TESTDIR@/db.4.a
-# slave slapd config -- for testing of SYNC replication
+# consumer slapd config -- for testing of SYNC replication
# $OpenLDAP$
include @SCHEMADIR@/core.schema
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
#~null~#directory @TESTDIR@/db.5.a
#indexdb#index objectClass eq
# Don't change syncrepl spec yet
syncrepl rid=1
provider=@URI4@
- binddn="cn=Replica,dc=example,dc=com"
+ binddn="cn=consumer,dc=example,dc=com"
bindmethod=simple
credentials=secret
searchbase="dc=example,dc=com"
-# slave slapd config -- for testing of SYNC replication
+# consumer slapd config -- for testing of SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
#~null~#directory @TESTDIR@/db.6.a
#indexdb#index objectClass eq
-# slave slapd config -- for testing of SYNC replication
+# consumer slapd config -- for testing of SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
#null#bind on
#~null~#directory @TESTDIR@/db.2.a
-# slave slapd config -- for testing of SYNC replication
+# consumer slapd config -- for testing of SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
database @BACKEND@
suffix "dc=example,dc=com"
-rootdn "cn=Replica,dc=example,dc=com"
+rootdn "cn=consumer,dc=example,dc=com"
rootpw secret
#~null~#directory @TESTDIR@/db.3.a
#indexdb#index objectClass eq
# Don't change syncrepl spec yet
syncrepl rid=1
provider=@URI2@
- binddn="cn=Replica,dc=example,dc=com"
+ binddn="cn=consumer,dc=example,dc=com"
bindmethod=simple
credentials=secret
searchbase="dc=example,dc=com"
-# slave slapd config -- for testing of SYNC replication with intermediate proxy
+# consumer slapd config -- for testing of SYNC replication with intermediate proxy
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
#ldapmod#moduleload back_ldap.la
#######################################################################
-# master database definitions
+# provider database definitions
#######################################################################
database @BACKEND@
-# master slapd config -- for testing of SYNC replication
+# provider slapd config -- for testing of SYNC replication
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
#syncprovmod#moduleload syncprov.la
#######################################################################
-# master database definitions
+# provider database definitions
#######################################################################
database @BACKEND@
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
-# master slapd config -- for testing
+# provider slapd config -- for testing
# $OpenLDAP$
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
CONF=$DATADIR/slapd.conf
CONFTWO=$DATADIR/slapd2.conf
CONF2DB=$DATADIR/slapd-2db.conf
-MCONF=$DATADIR/slapd-master.conf
+MCONF=$DATADIR/slapd-provider.conf
COMPCONF=$DATADIR/slapd-component.conf
PWCONF=$DATADIR/slapd-pw.conf
WHOAMICONF=$DATADIR/slapd-whoami.conf
ACLCONF=$DATADIR/slapd-acl.conf
RCONF=$DATADIR/slapd-referrals.conf
-SRMASTERCONF=$DATADIR/slapd-syncrepl-master.conf
-DSRMASTERCONF=$DATADIR/slapd-deltasync-master.conf
-DSRSLAVECONF=$DATADIR/slapd-deltasync-slave.conf
+SRPROVIDERCONF=$DATADIR/slapd-syncrepl-provider.conf
+DSRPROVIDERCONF=$DATADIR/slapd-deltasync-provider.conf
+DSRCONSUMERCONF=$DATADIR/slapd-deltasync-consumer.conf
PPOLICYCONF=$DATADIR/slapd-ppolicy.conf
PROXYCACHECONF=$DATADIR/slapd-proxycache.conf
PROXYAUTHZCONF=$DATADIR/slapd-proxyauthz.conf
-CACHEMASTERCONF=$DATADIR/slapd-cache-master.conf
-PROXYAUTHZMASTERCONF=$DATADIR/slapd-cache-master-proxyauthz.conf
-R1SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh1.conf
-R2SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-refresh2.conf
-P1SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist1.conf
-P2SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist2.conf
-P3SRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist3.conf
-REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
+CACHEPROVIDERCONF=$DATADIR/slapd-cache-provider.conf
+PROXYAUTHZPROVIDERCONF=$DATADIR/slapd-cache-provider-proxyauthz.conf
+R1SRCONSUMERCONF=$DATADIR/slapd-syncrepl-consumer-refresh1.conf
+R2SRCONSUMERCONF=$DATADIR/slapd-syncrepl-consumer-refresh2.conf
+P1SRCONSUMERCONF=$DATADIR/slapd-syncrepl-consumer-persist1.conf
+P2SRCONSUMERCONF=$DATADIR/slapd-syncrepl-consumer-persist2.conf
+P3SRCONSUMERCONF=$DATADIR/slapd-syncrepl-consumer-persist3.conf
+REFCONSUMERCONF=$DATADIR/slapd-ref-consumer.conf
SCHEMACONF=$DATADIR/slapd-schema.conf
GLUECONF=$DATADIR/slapd-glue.conf
REFINTCONF=$DATADIR/slapd-refint.conf
GLUESYNCCONF1=$DATADIR/slapd-glue-syncrepl1.conf
GLUESYNCCONF2=$DATADIR/slapd-glue-syncrepl2.conf
SQLCONF=$DATADIR/slapd-sql.conf
-SQLSRMASTERCONF=$DATADIR/slapd-sql-syncrepl-master.conf
+SQLSRPROVIDERCONF=$DATADIR/slapd-sql-syncrepl-provider.conf
TRANSLUCENTLOCALCONF=$DATADIR/slapd-translucent-local.conf
TRANSLUCENTREMOTECONF=$DATADIR/slapd-translucent-remote.conf
METACONF=$DATADIR/slapd-meta.conf
ACICONF=$DATADIR/slapd-aci.conf
VALSORTCONF=$DATADIR/slapd-valsort.conf
DYNLISTCONF=$DATADIR/slapd-dynlist.conf
-RSLAVECONF=$DATADIR/slapd-repl-slave-remote.conf
-PLSRSLAVECONF=$DATADIR/slapd-syncrepl-slave-persist-ldap.conf
-PLSRMASTERCONF=$DATADIR/slapd-syncrepl-multiproxy.conf
+RCONSUMERCONF=$DATADIR/slapd-repl-consumer-remote.conf
+PLSRCONSUMERCONF=$DATADIR/slapd-syncrepl-consumer-persist-ldap.conf
+PLSRPROVIDERCONF=$DATADIR/slapd-syncrepl-multiproxy.conf
DDSCONF=$DATADIR/slapd-dds.conf
PASSWDCONF=$DATADIR/slapd-passwd.conf
UNDOCONF=$DATADIR/slapd-config-undo.conf
REFDN="c=US"
BASEDN="dc=example,dc=com"
MANAGERDN="cn=Manager,$BASEDN"
-UPDATEDN="cn=Replica,$BASEDN"
+UPDATEDN="cn=consumer,$BASEDN"
PASSWD=secret
BABSDN="cn=Barbara Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN"
BJORNSDN="cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN"
SERVER6OUT=$TESTDIR/server6.out
SERVER6FLT=$TESTDIR/server6.flt
-MASTEROUT=$SERVER1OUT
-MASTERFLT=$SERVER1FLT
-SLAVEOUT=$SERVER2OUT
-SLAVE2OUT=$SERVER3OUT
-SLAVEFLT=$SERVER2FLT
-SLAVE2FLT=$SERVER3FLT
+PROVIDEROUT=$SERVER1OUT
+PROVIDERFLT=$SERVER1FLT
+CONSUMEROUT=$SERVER2OUT
+CONSUMER2OUT=$SERVER3OUT
+CONSUMERFLT=$SERVER2FLT
+CONSUMER2FLT=$SERVER3FLT
MTREADOUT=$TESTDIR/mtread.out
# original outputs for cmp
PROXYCACHEOUT=$DATADIR/proxycache.out
REFERRALOUT=$DATADIR/referrals.out
-SEARCHOUTMASTER=$DATADIR/search.out.master
+SEARCHOUTPROVIDER=$DATADIR/search.out.provider
SEARCHOUTX=$DATADIR/search.out.xsearch
COMPSEARCHOUT=$DATADIR/compsearch.out
-MODIFYOUTMASTER=$DATADIR/modify.out.master
-ADDDELOUTMASTER=$DATADIR/adddel.out.master
-MODRDNOUTMASTER0=$DATADIR/modrdn.out.master.0
-MODRDNOUTMASTER1=$DATADIR/modrdn.out.master.1
-MODRDNOUTMASTER2=$DATADIR/modrdn.out.master.2
-MODRDNOUTMASTER3=$DATADIR/modrdn.out.master.3
-ACLOUTMASTER=$DATADIR/acl.out.master
-REPLOUTMASTER=$DATADIR/repl.out.master
+MODIFYOUTPROVIDER=$DATADIR/modify.out.provider
+ADDDELOUTPROVIDER=$DATADIR/adddel.out.provider
+MODRDNOUTPROVIDER0=$DATADIR/modrdn.out.provider.0
+MODRDNOUTPROVIDER1=$DATADIR/modrdn.out.provider.1
+MODRDNOUTPROVIDER2=$DATADIR/modrdn.out.provider.2
+MODRDNOUTPROVIDER3=$DATADIR/modrdn.out.provider.3
+ACLOUTPROVIDER=$DATADIR/acl.out.provider
+REPLOUTPROVIDER=$DATADIR/repl.out.provider
MODSRCHFILTERS=$DATADIR/modify.search.filters
CERTIFICATETLS=$DATADIR/certificate.tls
CERTIFICATEOUT=$DATADIR/certificate.out
echo "Assuming everything is fine."
#echo "Comparing results"
-#$CMP $TESTOUT $SEARCHOUTMASTER
+#$CMP $TESTOUT $SEARCHOUTPROVIDER
#if test $? != 0 ; then
# echo "Comparison failed"
# exit 1
mkdir -p $TESTDIR $DBDIR2A
echo "Starting slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $SQLSRMASTERCONF > $CONF1
+. $CONFFILTER $BACKEND $MONITORDB < $SQLSRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
exit $RC
fi
-echo "Starting slave slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $CONF2
+echo "Starting consumer slapd on TCP/IP port $PORT2..."
+. $CONFFILTER $BACKEND $MONITORDB < $R1SRCONSUMERCONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
-echo "Using ldapsearch to check that slave slapd is running..."
+echo "Using ldapsearch to check that consumer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
'objectclass=*' > /dev/null 2>&1
cat /dev/null > $SEARCHOUT
-echo "Using ldapsearch to retrieve all the entries from the master..."
-echo "# Using ldapsearch to retrieve all the entries from the master..." \
+echo "Using ldapsearch to retrieve all the entries from the provider..."
+echo "# Using ldapsearch to retrieve all the entries from the provider..." \
>> $SEARCHOUT
$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
-D "$MANAGERDN" -w $PASSWD \
cat /dev/null > $SEARCHOUT2
-echo "Using ldapsearch to retrieve all the entries from the slave..."
-echo "# Using ldapsearch to retrieve all the entries from the slave..." \
+echo "Using ldapsearch to retrieve all the entries from the consumer..."
+echo "# Using ldapsearch to retrieve all the entries from the consumer..." \
>> $SEARCHOUT2
$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT2 -b "$BASEDN" \
-D "$UPDATEDN" -w $PASSWD \
exit $RC
fi
-echo "Filtering ldapsearch results from master..."
+echo "Filtering ldapsearch results from provider..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
-echo "Filtering ldapsearch results from slave..."
+echo "Filtering ldapsearch results from consumer..."
$LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2
echo "Comparing filter output..."
$CMP $SEARCHFLT $SEARCHFLT2 > $CMPOUT
exit 1
fi
- echo "Waiting 25 seconds for master to send changes..."
+ echo "Waiting 25 seconds for provider to send changes..."
sleep 25
cat /dev/null > $SEARCHOUT
- echo "Using ldapsearch to retrieve all the entries from the master..."
- echo "# Using ldapsearch to retrieve all the entries from the master..." \
+ echo "Using ldapsearch to retrieve all the entries from the provider..."
+ echo "# Using ldapsearch to retrieve all the entries from the provider..." \
>> $SEARCHOUT
$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
-D "$MANAGERDN" -w $PASSWD \
cat /dev/null > $SEARCHOUT2
- echo "Using ldapsearch to retrieve all the entries from the slave..."
- echo "# Using ldapsearch to retrieve all the entries from the slave..." \
+ echo "Using ldapsearch to retrieve all the entries from the consumer..."
+ echo "# Using ldapsearch to retrieve all the entries from the consumer..." \
>> $SEARCHOUT2
$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT2 -b "$BASEDN" \
-D "$UPDATEDN" -w $PASSWD \
exit $RC
fi
- echo "Filtering ldapsearch results from master..."
+ echo "Filtering ldapsearch results from provider..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
- echo "Filtering ldapsearch results from slave..."
+ echo "Filtering ldapsearch results from consumer..."
$LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2
echo "Comparing filter output..."
$CMP $SEARCHFLT $SEARCHFLT2 > $CMPOUT
# Sample configuration file for your LDAP server
if test "$BACKEND" = "bdb2" ; then
- NIS_CONF=$DATADIR/slapd-bdb2-nis-master.conf
+ NIS_CONF=$DATADIR/slapd-bdb2-nis-provider.conf
else
- NIS_CONF=$DATADIR/slapd-nis-master.conf
+ NIS_CONF=$DATADIR/slapd-nis-provider.conf
fi
echo "Cleaning up in $DBDIR..."
fi
echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $NIS_CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $NIS_CONF -p $PORT -d $LVL $TIMING > $PROVIDERLOG 2>&1 &
PID=$!
echo ">>>>> LDAP server with NIS schema is up! PID=$PID"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIF=$SEARCHOUTMASTER
+LDIF=$SEARCHOUTPROVIDER
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
exit $RC
fi
-LDIF=$MODIFYOUTMASTER
+LDIF=$MODIFYOUTPROVIDER
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
fi
-LDIF=$MODRDNOUTMASTER1
+LDIF=$MODRDNOUTPROVIDER1
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
fi
-LDIF=$MODRDNOUTMASTER2
+LDIF=$MODRDNOUTPROVIDER2
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
exit $RC
fi
-LDIF=$MODRDNOUTMASTER0
+LDIF=$MODRDNOUTPROVIDER0
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
exit $RC
fi
-LDIF=$MODRDNOUTMASTER3
+LDIF=$MODRDNOUTPROVIDER3
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
exit $RC
fi
-LDIF=$ACLOUTMASTER
+LDIF=$ACLOUTPROVIDER
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
exit $RC
fi
-echo "Starting master slapd on TCP/IP port $PORT1..."
-$SLAPD -n master -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
+echo "Starting provider slapd on TCP/IP port $PORT1..."
+$SLAPD -n provider -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
echo PID $PID
read foo
fi
-echo "Starting slave slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $REFSLAVECONF > $CONF2
-$SLAPD -n slave -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+echo "Starting consumer slapd on TCP/IP port $PORT2..."
+. $CONFFILTER $BACKEND $MONITORDB < $REFCONSUMERCONF > $CONF2
+$SLAPD -n consumer -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
sleep 1
-echo "Testing for master slapd..."
+echo "Testing for provider slapd..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'objectclass=*' > /dev/null 2>&1
if test $RC = 0 ; then
break
fi
- echo "Waiting 5 seconds for master slapd to start..."
+ echo "Waiting 5 seconds for provider slapd to start..."
sleep 5
done
exit $RC
fi
-echo "Testing for slave slapd..."
+echo "Testing for consumer slapd..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
'objectclass=*' > /dev/null 2>&1
if test $RC = 0 ; then
break
fi
- echo "Waiting 5 seconds for slave slapd to start..."
+ echo "Waiting 5 seconds for consumer slapd to start..."
sleep 5
done
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIF=$SEARCHOUTMASTER
+LDIF=$SEARCHOUTPROVIDER
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIF=$SEARCHOUTMASTER
+LDIF=$SEARCHOUTPROVIDER
LDIF2=$SEARCHOUTX
echo "Filtering ldapsearch results..."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-LDIF=$SEARCHOUTMASTER
+LDIF=$SEARCHOUTPROVIDER
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering expected LDIF for comparison..."
#
echo "Starting provider slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
+. $CONFFILTER $BACKEND $MONITORDB < $SRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
fi
echo "Starting consumer slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $CONF2
+. $CONFFILTER $BACKEND $MONITORDB < $R1SRCONSUMERCONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
#
echo "Starting provider slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
+. $CONFFILTER $BACKEND $MONITORDB < $SRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
fi
echo "Starting consumer slapd on TCP/IP port $PORT4..."
-. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $CONF4
+. $CONFFILTER $BACKEND $MONITORDB < $P1SRCONSUMERCONF > $CONF4
$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING > $LOG4 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
- '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
echo PID $PID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
sleep 1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
- '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
fi
echo "Stopping consumer to test recovery..."
-kill -HUP $SLAVEPID
-wait $SLAVEPID
+kill -HUP $CONSUMERPID
+wait $CONSUMERPID
echo "Modifying more entries on the provider..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
echo "Restarting consumer..."
echo "RESTART" >> $LOG4
$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING >> $LOG4 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
- '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
- '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
#
# Test replication:
-# - start master
-# - start slave
+# - start provider
+# - start consumer
# - populate over ldap
# - perform some modifies and deleted
# - retrieve database over ldap and compare against expected results
#
-echo "Starting master slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
+echo "Starting provider slapd on TCP/IP port $PORT1..."
+. $CONFFILTER $BACKEND $MONITORDB < $SRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
sleep 1
-echo "Using ldapsearch to check that master slapd (pid=$PID) is running..."
+echo "Using ldapsearch to check that provider slapd (pid=$PID) is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to create the context prefix entry in the master..."
+echo "Using ldapadd to create the context prefix entry in the provider..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDCP > /dev/null 2>&1
RC=$?
exit $RC
fi
-echo "Starting R1 slave slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $CONF2
+echo "Starting R1 consumer slapd on TCP/IP port $PORT2..."
+. $CONFFILTER $BACKEND $MONITORDB < $R1SRCONSUMERCONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVE R1 PID $SLAVEPID
+ echo CONSUMER R1 PID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that R1 slave slapd (pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that R1 consumer slapd (pid=$CONSUMERPID) is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Starting R2 slave slapd on TCP/IP port $PORT3..."
-. $CONFFILTER $BACKEND $MONITORDB < $R2SRSLAVECONF > $CONF3
+echo "Starting R2 consumer slapd on TCP/IP port $PORT3..."
+. $CONFFILTER $BACKEND $MONITORDB < $R2SRCONSUMERCONF > $CONF3
$SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING > $LOG3 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVE R2 PID $SLAVEPID
+ echo CONSUMER R2 PID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that R2 slave slapd (pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that R2 consumer slapd (pid=$CONSUMERPID) is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \
'objectclass=*' > /dev/null 2>&1
if test $RC = 0 ; then
break
fi
- echo "Waiting 5 seconds for R2 slave slapd to start..."
+ echo "Waiting 5 seconds for R2 consumer slapd to start..."
sleep 5
done
exit $RC
fi
-echo "Starting P1 slave slapd on TCP/IP port $PORT4..."
-. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $CONF4
+echo "Starting P1 consumer slapd on TCP/IP port $PORT4..."
+. $CONFFILTER $BACKEND $MONITORDB < $P1SRCONSUMERCONF > $CONF4
$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING > $LOG4 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVE P1 PID $SLAVEPID
+ echo CONSUMER P1 PID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that P1 slave slapd (pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that P1 consumer slapd (pid=$CONSUMERPID) is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT4 \
'objectclass=*' > /dev/null 2>&1
if test $RC = 0 ; then
break
fi
- echo "Waiting 5 seconds for P1 slave slapd to start..."
+ echo "Waiting 5 seconds for P1 consumer slapd to start..."
sleep 5
done
exit $RC
fi
-echo "Starting P2 slave slapd on TCP/IP port $PORT5..."
-. $CONFFILTER $BACKEND $MONITORDB < $P2SRSLAVECONF > $CONF5
+echo "Starting P2 consumer slapd on TCP/IP port $PORT5..."
+. $CONFFILTER $BACKEND $MONITORDB < $P2SRCONSUMERCONF > $CONF5
$SLAPD -f $CONF5 -h $URI5 -d $LVL $TIMING > $LOG5 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVE P2 PID $SLAVEPID
+ echo CONSUMER P2 PID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that P2 slave slapd (pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that P2 consumer slapd (pid=$CONSUMERPID) is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT5 \
'objectclass=*' > /dev/null 2>&1
if test $RC = 0 ; then
break
fi
- echo "Waiting 5 seconds for P2 slave slapd to start..."
+ echo "Waiting 5 seconds for P2 consumer slapd to start..."
sleep 5
done
exit $RC
fi
-echo "Starting P3 slave slapd on TCP/IP port $PORT6..."
-. $CONFFILTER $BACKEND $MONITORDB < $P3SRSLAVECONF > $CONF6
+echo "Starting P3 consumer slapd on TCP/IP port $PORT6..."
+. $CONFFILTER $BACKEND $MONITORDB < $P3SRCONSUMERCONF > $CONF6
$SLAPD -f $CONF6 -h $URI6 -d $LVL $TIMING > $LOG6 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVE P3 PID $SLAVEPID
+ echo CONSUMER P3 PID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that P3 slave slapd (pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that P3 consumer slapd (pid=$CONSUMERPID) is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT6 \
'objectclass=*' > /dev/null 2>&1
if test $RC = 0 ; then
break
fi
- echo "Waiting 5 seconds for P3 slave slapd to start..."
+ echo "Waiting 5 seconds for P3 consumer slapd to start..."
sleep 5
done
exit $RC
fi
-echo "Using ldapadd to populate the master directory..."
+echo "Using ldapadd to populate the provider directory..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDNOCP > /dev/null 2>&1
RC=$?
echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
sleep $SLEEP2
-echo "Using ldapmodify to modify master directory..."
+echo "Using ldapmodify to modify provider directory..."
#
# Do some modifications
echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
sleep $SLEEP2
-echo "Using ldapsearch to read all the entries from the master..."
+echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' '*' entryCSN > $MASTEROUT 2>&1
+ '(objectClass=*)' '*' entryCSN > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the R1 slave..."
+echo "Using ldapsearch to read all the entries from the R1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
'(objectClass=*)' '*' entryCSN > $SERVER2OUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at R1 slave ($RC)!"
+ echo "ldapsearch failed at R1 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the R2 slave..."
+echo "Using ldapsearch to read all the entries from the R2 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
'(objectClass=*)' '*' entryCSN > $SERVER3OUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at R2 slave ($RC)!"
+ echo "ldapsearch failed at R2 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the P1 slave..."
+echo "Using ldapsearch to read all the entries from the P1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
'(objectClass=*)' '*' entryCSN > $SERVER4OUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at P1 slave ($RC)!"
+ echo "ldapsearch failed at P1 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the P2 slave..."
+echo "Using ldapsearch to read all the entries from the P2 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT5 \
'(objectClass=*)' '*' entryCSN > $SERVER5OUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at P2 slave ($RC)!"
+ echo "ldapsearch failed at P2 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-echo "Using ldapsearch to read all the entries from the P3 slave..."
+echo "Using ldapsearch to read all the entries from the P3 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT6 \
'(objectClass=*)' '*' entryCSN > $SERVER6OUT 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at P3 slave ($RC)!"
+ echo "ldapsearch failed at P3 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
-echo "Filtering master ldapsearch results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
-echo "Filtering R1 slave ldapsearch results..."
+echo "Filtering provider ldapsearch results..."
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
+echo "Filtering R1 consumer ldapsearch results..."
$LDIFFILTER < $SERVER2OUT > $SERVER2FLT
-echo "Filtering R2 slave ldapsearch results..."
+echo "Filtering R2 consumer ldapsearch results..."
$LDIFFILTER < $SERVER3OUT > $SERVER3FLT
-echo "Filtering P1 slave ldapsearch results..."
+echo "Filtering P1 consumer ldapsearch results..."
$LDIFFILTER < $SERVER4OUT > $SERVER4FLT
-echo "Filtering P2 slave ldapsearch results..."
+echo "Filtering P2 consumer ldapsearch results..."
$LDIFFILTER < $SERVER5OUT > $SERVER5FLT
-echo "Filtering P3 slave ldapsearch results..."
+echo "Filtering P3 consumer ldapsearch results..."
$LDIFFILTER < $SERVER6OUT > $SERVER6FLT
-echo "Comparing retrieved entries from master and R1 slave..."
-$CMP $MASTERFLT $SERVER2FLT > $CMPOUT
+echo "Comparing retrieved entries from provider and R1 consumer..."
+$CMP $PROVIDERFLT $SERVER2FLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and R1 slave databases differ"
+ echo "test failed - provider and R1 consumer databases differ"
exit 1
fi
-echo "Comparing retrieved entries from master and R2 slave..."
-$CMP $MASTERFLT $SERVER3FLT > $CMPOUT
+echo "Comparing retrieved entries from provider and R2 consumer..."
+$CMP $PROVIDERFLT $SERVER3FLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and R2 slave databases differ"
+ echo "test failed - provider and R2 consumer databases differ"
exit 1
fi
-echo "Comparing retrieved entries from master and P1 slave..."
-$CMP $MASTERFLT $SERVER4FLT > $CMPOUT
+echo "Comparing retrieved entries from provider and P1 consumer..."
+$CMP $PROVIDERFLT $SERVER4FLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and P1 slave databases differ"
+ echo "test failed - provider and P1 consumer databases differ"
exit 1
fi
-echo "Comparing retrieved entries from master and P2 slave..."
-$CMP $MASTERFLT $SERVER5FLT > $CMPOUT
+echo "Comparing retrieved entries from provider and P2 consumer..."
+$CMP $PROVIDERFLT $SERVER5FLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and P2 slave databases differ"
+ echo "test failed - provider and P2 consumer databases differ"
exit 1
fi
-echo "Comparing retrieved entries from master and P3 slave..."
-$CMP $MASTERFLT $SERVER6FLT > $CMPOUT
+echo "Comparing retrieved entries from provider and P3 consumer..."
+$CMP $PROVIDERFLT $SERVER6FLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and P3 slave databases differ"
+ echo "test failed - provider and P3 consumer databases differ"
exit 1
fi
mkdir -p $TESTDIR $DBDIR1 $DBDIR2
# Test proxy caching:
-# - start master
+# - start provider
# - start proxy cache
-# - populate master
+# - populate provider
# - perform first set of searches at the proxy
# - verify cacheability
# - perform second set of searches at the proxy
# - verify answerability
-echo "Starting master slapd on TCP/IP port $PORT1..."
-. $CONFFILTER < $CACHEMASTERCONF > $CONF1
+echo "Starting provider slapd on TCP/IP port $PORT1..."
+. $CONFFILTER < $CACHEPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that provider slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to populate the master directory..."
+echo "Using ldapadd to populate the provider directory..."
$LDAPADD -x -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?
#
echo "Starting provider slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $DSRMASTERCONF > $CONF1
+. $CONFFILTER $BACKEND $MONITORDB < $DSRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
fi
echo "Starting consumer slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $DSRSLAVECONF > $CONF2
+. $CONFFILTER $BACKEND $MONITORDB < $DSRCONSUMERCONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
echo PID $PID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
sleep 1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- 'objectclass=*' \* + > $MASTEROUT 2>&1
+ 'objectclass=*' \* + > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- 'objectclass=*' \* + > $SLAVEOUT 2>&1
+ 'objectclass=*' \* + > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Filtering provider results..."
-$LDIFFILTER -b $BACKEND -s $SPEC < $MASTEROUT | grep -iv "^auditcontext:" > $MASTERFLT
+$LDIFFILTER -b $BACKEND -s $SPEC < $PROVIDEROUT | grep -iv "^auditcontext:" > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER -b $BACKEND -s $SPEC < $SLAVEOUT | grep -iv "^auditcontext:" > $SLAVEFLT
+$LDIFFILTER -b $BACKEND -s $SPEC < $CONSUMEROUT | grep -iv "^auditcontext:" > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
fi
echo "Stopping consumer to test recovery..."
-kill -HUP $SLAVEPID
+kill -HUP $CONSUMERPID
sleep 10
echo "Modifying more entries on the provider..."
echo "Restarting consumer..."
echo "RESTART" >> $LOG2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- 'objectclass=*' \* + > $MASTEROUT 2>&1
+ 'objectclass=*' \* + > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- 'objectclass=*' \* + > $SLAVEOUT 2>&1
+ 'objectclass=*' \* + > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo "Filtering provider results..."
-$LDIFFILTER -b $BACKEND -s $SPEC < $MASTEROUT | grep -iv "^auditcontext:" > $MASTERFLT
+$LDIFFILTER -b $BACKEND -s $SPEC < $PROVIDEROUT | grep -iv "^auditcontext:" > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER -b $BACKEND -s $SPEC < $SLAVEOUT | grep -iv "^auditcontext:" > $SLAVEFLT
+$LDIFFILTER -b $BACKEND -s $SPEC < $CONSUMEROUT | grep -iv "^auditcontext:" > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
#
# Test replication:
-# - start master
-# - start slave
+# - start provider
+# - start consumer
# - populate over ldap
# - perform some modifies and deleted
-# - attempt to modify the slave (referral or chain)
+# - attempt to modify the consumer (referral or chain)
# - retrieve database over ldap and compare against expected results
#
-echo "Starting master slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
+echo "Starting provider slapd on TCP/IP port $PORT1..."
+. $CONFFILTER $BACKEND $MONITORDB < $SRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
-MASTERPID=$!
+PROVIDERPID=$!
if test $WAIT != 0 ; then
- echo MASTERPID $MASTERPID
+ echo PROVIDERPID $PROVIDERPID
read foo
fi
-KILLPIDS="$MASTERPID"
+KILLPIDS="$PROVIDERPID"
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that provider slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'(objectClass=*)' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to create the context prefix entry in the master..."
+echo "Using ldapadd to create the context prefix entry in the provider..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDCP > /dev/null 2>&1
RC=$?
exit $RC
fi
-echo "Starting slave slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $RSLAVECONF > $CONF2
+echo "Starting consumer slapd on TCP/IP port $PORT2..."
+. $CONFFILTER $BACKEND $MONITORDB < $RCONSUMERCONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$MASTERPID $SLAVEPID"
+KILLPIDS="$PROVIDERPID $CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that slave slapd is running..."
+echo "Using ldapsearch to check that consumer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
'(objectClass=*)' > /dev/null 2>&1
fi
echo "Starting proxy slapd on TCP/IP port $PORT3..."
-. $CONFFILTER $BACKEND $MONITORDB < $PLSRSLAVECONF > $CONF3
+. $CONFFILTER $BACKEND $MONITORDB < $PLSRCONSUMERCONF > $CONF3
$SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING > $LOG3 2>&1 &
PROXYPID=$!
if test $WAIT != 0 ; then
echo PROXYPID $PROXYPID
read foo
fi
-KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
+KILLPIDS="$PROVIDERPID $CONSUMERPID $PROXYPID"
sleep 1
esac
CHECK=1
-echo "$CHECK > Using ldapadd to populate the master directory..."
+echo "$CHECK > Using ldapadd to populate the provider directory..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDNOCP > /dev/null 2>&1
RC=$?
exit $RC
fi
-# get master contextCSN
+# get provider contextCSN
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- -s base '(objectClass=*)' contextCSN > "${MASTEROUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-# check slave contextCSN
+# check consumer contextCSN
sleep 1
for i in 1 2 3; do
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- -s base '(objectClass=*)' contextCSN > "${SLAVEOUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- $CMP ${MASTEROUT}.$CHECK ${SLAVEOUT}.$CHECK > $CMPOUT
+ $CMP ${PROVIDEROUT}.$CHECK ${CONSUMEROUT}.$CHECK > $CMPOUT
if test $? = 0 ; then
break
sleep $SLEEP1
done
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the slave..."
+#echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
CHECK=`expr $CHECK + 1`
echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..."
-kill -HUP "$MASTERPID"
-wait $MASTERPID
+kill -HUP "$PROVIDERPID"
+wait $PROVIDERPID
sleep $SLEEP2
echo "======================= RESTART =======================" >> $LOG1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
-MASTERPID=$!
+PROVIDERPID=$!
if test $WAIT != 0 ; then
- echo MASTERPID $MASTERPID
+ echo PROVIDERPID $PROVIDERPID
read foo
fi
-KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
+KILLPIDS="$PROVIDERPID $CONSUMERPID $PROXYPID"
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that provider slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'(objectClass=*)' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapmodify to modify master directory..."
+echo "Using ldapmodify to modify provider directory..."
#
# Do some modifications
exit $RC
fi
-# get master contextCSN
+# get provider contextCSN
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- -s base '(objectClass=*)' contextCSN > "${MASTEROUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-# check slave contextCSN
+# check consumer contextCSN
for i in 1 2 3; do
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- -s base '(objectClass=*)' contextCSN > "${SLAVEOUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- $CMP ${MASTEROUT}.$CHECK ${SLAVEOUT}.$CHECK > $CMPOUT
+ $CMP ${PROVIDEROUT}.$CHECK ${CONSUMEROUT}.$CHECK > $CMPOUT
if test $? = 0 ; then
break
fi
done
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the slave..."
+#echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
kill -HUP $PROXYPID
wait $PROXYPID
-echo "Modifying more entries on the master..."
+echo "Modifying more entries on the provider..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
$TESTOUT 2>&1 << EOMODS
dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
echo PROXYPID $PROXYPID
read foo
fi
-KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
+KILLPIDS="$PROVIDERPID $CONSUMERPID $PROXYPID"
-# get master contextCSN
+# get provider contextCSN
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- -s base '(objectClass=*)' contextCSN > "${MASTEROUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-# check slave contextCSN
+# check consumer contextCSN
for i in 1 2 3 4 5; do
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- -s base '(objectClass=*)' contextCSN > "${SLAVEOUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- $CMP ${MASTEROUT}.$CHECK ${SLAVEOUT}.$CHECK > $CMPOUT
+ $CMP ${PROVIDEROUT}.$CHECK ${CONSUMEROUT}.$CHECK > $CMPOUT
if test $? = 0 ; then
break
fi
done
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the slave..."
+#echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
CHECK=`expr $CHECK + 1`
-echo "$CHECK > Try updating the slave slapd..."
+echo "$CHECK > Try updating the consumer slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
exit $RC
fi
-# get master contextCSN
+# get provider contextCSN
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- -s base '(objectClass=*)' contextCSN > "${MASTEROUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-# check slave contextCSN
+# check consumer contextCSN
sleep 1
for i in 1 2 3; do
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- -s base '(objectClass=*)' contextCSN > "${SLAVEOUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- $CMP ${MASTEROUT}.$CHECK ${SLAVEOUT}.$CHECK > $CMPOUT
+ $CMP ${PROVIDEROUT}.$CHECK ${CONSUMEROUT}.$CHECK > $CMPOUT
if test $? = 0 ; then
break
sleep $SLEEP1
done
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the slave..."
+#echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
-'(objectClass=*)' > "${SLAVEOUT}.$CHECK" 2>&1
+'(objectClass=*)' > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
CHECK=`expr $CHECK + 1`
echo "$CHECK > Stopping consumer to test recovery..."
-kill -HUP $SLAVEPID
-wait $SLAVEPID
+kill -HUP $CONSUMERPID
+wait $CONSUMERPID
-echo "Modifying more entries on the master..."
+echo "Modifying more entries on the provider..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
$TESTOUT 2>&1 << EOMODS
dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
echo "Restarting consumer..."
echo "======================= RESTART =======================" >> $LOG2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
+KILLPIDS="$PROVIDERPID $CONSUMERPID $PROXYPID"
-# get master contextCSN
+# get provider contextCSN
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- -s base '(objectClass=*)' contextCSN > "${MASTEROUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-# check slave contextCSN
+# check consumer contextCSN
for i in 1 2 3 4 5; do
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- -s base '(objectClass=*)' contextCSN > "${SLAVEOUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- $CMP ${MASTEROUT}.$CHECK ${SLAVEOUT}.$CHECK > $CMPOUT
+ $CMP ${PROVIDEROUT}.$CHECK ${CONSUMEROUT}.$CHECK > $CMPOUT
if test $? = 0 ; then
break
fi
done
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the slave..."
+#echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
# FIXME: keep the original workaround in place, in case we needed again
if test 1 = 1 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
- echo " test failed - master and slave databases differ (ignored by now)"
+ echo " test failed - provider and consumer databases differ (ignored by now)"
echo " Stopping proxy to see if it auto-recovers..."
kill -HUP $PROXYPID
wait $PROXYPID
echo PROXYPID $PROXYPID
read foo
fi
- KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
+ KILLPIDS="$PROVIDERPID $CONSUMERPID $PROXYPID"
echo " Waiting $SLEEP2 seconds for syncrepl to receive changes..."
sleep $SLEEP2
- #echo "Using ldapsearch to read all the entries from the slave..."
+ #echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.5.1" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.5.1" 2>&1
RC=$?
if test $RC != 0 ; then
- echo " ldapsearch failed at slave ($RC)!"
+ echo " ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- #echo "Filtering slave results..."
- $LDIFFILTER < "${SLAVEOUT}.5.1" > $SLAVEFLT
+ #echo "Filtering consumer results..."
+ $LDIFFILTER < "${CONSUMEROUT}.5.1" > $CONSUMERFLT
- echo " ${CHECK}.1 < Comparing retrieved entries from master and slave..."
- $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+ echo " ${CHECK}.1 < Comparing retrieved entries from provider and consumer..."
+ $CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo " test failed - master and slave databases differ"
+ echo " test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
exit $RC
fi
-# get master contextCSN
+# get provider contextCSN
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- -s base '(objectClass=*)' contextCSN > "${MASTEROUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-# check slave contextCSN
+# check consumer contextCSN
sleep 1
for i in 1 2 3; do
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- -s base '(objectClass=*)' contextCSN > "${SLAVEOUT}.$CHECK" 2>&1
+ -s base '(objectClass=*)' contextCSN > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
- $CMP ${MASTEROUT}.$CHECK ${SLAVEOUT}.$CHECK > $CMPOUT
+ $CMP ${PROVIDEROUT}.$CHECK ${CONSUMEROUT}.$CHECK > $CMPOUT
if test $? = 0 ; then
break
sleep $SLEEP1
done
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the slave..."
+#echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.$CHECK" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.$CHECK" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.$CHECK" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.$CHECK" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ (ignored by now)"
- #echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ (ignored by now)"
+ #echo "test failed - provider and consumer databases differ"
#test $KILLSERVERS != no && kill -HUP $KILLPIDS
#exit 1
fi
#
# Test replication:
-# - start master
-# - start slave
+# - start provider
+# - start consumer
# - populate over ldap
# - perform some modifies and deleted
-# - attempt to modify the slave (referral or chain)
+# - attempt to modify the consumer (referral or chain)
# - retrieve database over ldap and compare against expected results
#
-echo "Starting master slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $PLSRMASTERCONF > $CONF1
+echo "Starting provider slapd on TCP/IP port $PORT1..."
+. $CONFFILTER $BACKEND $MONITORDB < $PLSRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
-MASTERPID=$!
+PROVIDERPID=$!
if test $WAIT != 0 ; then
- echo MASTERPID $MASTERPID
+ echo PROVIDERPID $PROVIDERPID
read foo
fi
-KILLPIDS="$MASTERPID"
+KILLPIDS="$PROVIDERPID"
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that provider slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'(objectClass=*)' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to create the context prefix entry in the master..."
+echo "Using ldapadd to create the context prefix entry in the provider..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDCP > /dev/null 2>&1
RC=$?
exit $RC
fi
-echo "Starting P1 slave slapd on TCP/IP port $PORT2..."
-. $CONFFILTER $BACKEND $MONITORDB < $RSLAVECONF > $CONF2
+echo "Starting P1 consumer slapd on TCP/IP port $PORT2..."
+. $CONFFILTER $BACKEND $MONITORDB < $RCONSUMERCONF > $CONF2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-P1SLAVEPID=$!
+P1CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo P1SLAVEPID $P1SLAVEPID
+ echo P1CONSUMERPID $P1CONSUMERPID
read foo
fi
-KILLPIDS="$MASTERPID $P1SLAVEPID"
+KILLPIDS="$PROVIDERPID $P1CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that P1 slave slapd is running..."
+echo "Using ldapsearch to check that P1 consumer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
'(objectClass=*)' > /dev/null 2>&1
exit $RC
fi
-echo "Starting R1 slave slapd on TCP/IP port $PORT3..."
-. $CONFFILTER $BACKEND $MONITORDB < $RSLAVECONF | sed -e 's;\.2\.\([^/]*\)$;.3.\1;' > $CONF3
+echo "Starting R1 consumer slapd on TCP/IP port $PORT3..."
+. $CONFFILTER $BACKEND $MONITORDB < $RCONSUMERCONF | sed -e 's;\.2\.\([^/]*\)$;.3.\1;' > $CONF3
$SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING > $LOG3 2>&1 &
-R1SLAVEPID=$!
+R1CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo R1SLAVEPID $R1SLAVEPID
+ echo R1CONSUMERPID $R1CONSUMERPID
read foo
fi
-KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID"
+KILLPIDS="$PROVIDERPID $P1CONSUMERPID $R1CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that R1 slave slapd is running..."
+echo "Using ldapsearch to check that R1 consumer slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \
'(objectClass=*)' > /dev/null 2>&1
fi
CHECK=1
-echo "$CHECK > Using ldapadd to populate the master directory..."
+echo "$CHECK > Using ldapadd to populate the provider directory..."
$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDEREDNOCP > /dev/null 2>&1
RC=$?
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.1" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.1" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the P1 slave..."
+#echo "Using ldapsearch to read all the entries from the P1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.1" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.1" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at P1 slave ($RC)!"
+ echo "ldapsearch failed at P1 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.1" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.1" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.1" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and P1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and P1 slave databases differ"
+ echo "test failed - provider and P1 consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
-#echo "Using ldapsearch to read all the entries from the R1 slave..."
+#echo "Using ldapsearch to read all the entries from the R1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
- '(objectClass=*)' > "${SLAVEOUT}.1" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.1" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at R1 slave ($RC)!"
+ echo "ldapsearch failed at R1 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.1" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and R1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and R1 slave databases differ"
+ echo "test failed - provider and R1 consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
CHECK=`expr $CHECK + 1`
echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..."
-kill -HUP "$MASTERPID"
-wait $MASTERPID
+kill -HUP "$PROVIDERPID"
+wait $PROVIDERPID
sleep $SLEEP2
echo "======================= RESTART =======================" >> $LOG1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
-MASTERPID=$!
+PROVIDERPID=$!
if test $WAIT != 0 ; then
- echo MASTERPID $MASTERPID
+ echo PROVIDERPID $PROVIDERPID
read foo
fi
-KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID"
+KILLPIDS="$PROVIDERPID $P1CONSUMERPID $R1CONSUMERPID"
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that provider slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
'(objectClass=*)' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapmodify to modify master directory..."
+echo "Using ldapmodify to modify provider directory..."
#
# Do some modifications
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.2" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.2" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the P1 slave..."
+#echo "Using ldapsearch to read all the entries from the P1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.2" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.2" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at P1 slave ($RC)!"
+ echo "ldapsearch failed at P1 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.2" > $MASTERFLT
-#echo "Filtering P1 slave results..."
-$LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.2" > $PROVIDERFLT
+#echo "Filtering P1 consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.2" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and P1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and P1 slave databases differ"
+ echo "test failed - provider and P1 consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
-#echo "Using ldapsearch to read all the entries from the R1 slave..."
+#echo "Using ldapsearch to read all the entries from the R1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
- '(objectClass=*)' > "${SLAVEOUT}.2" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.2" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at R1 slave ($RC)!"
+ echo "ldapsearch failed at R1 consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.2" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and R1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and R1 slave databases differ"
+ echo "test failed - provider and R1 consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
CHECK=`expr $CHECK + 1`
-echo "$CHECK > Stopping slaves to test recovery..."
-kill -HUP $P1SLAVEPID $R1SLAVEPID
-wait $P1SLAVEPID
-wait $R1SLAVEPID
+echo "$CHECK > Stopping consumer to test recovery..."
+kill -HUP $P1CONSUMERPID $R1CONSUMERPID
+wait $P1CONSUMERPID
+wait $R1CONSUMERPID
-echo "Modifying more entries on the master..."
+echo "Modifying more entries on the provider..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
$TESTOUT 2>&1 << EOMODS
dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
changetype: modify
add: description
-description: r1 slave is down...
+description: r1 consumer is down...
dn: cn=James T. Kirk, ou=Retired, ou=People, dc=example,dc=com
changetype: add
EOMODS
-echo "Restarting P1 slave..."
+echo "Restarting P1 consumer..."
echo "======================= RESTART =======================" >> $LOG3
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
-P1SLAVEPID=$!
+P1CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo P1SLAVEPID $P1SLAVEPID
+ echo P1CONSUMERPID $P1CONSUMERPID
read foo
fi
-echo "Restarting R1 slave..."
+echo "Restarting R1 consumer..."
echo "======================= RESTART =======================" >> $LOG3
$SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING >> $LOG3 2>&1 &
-R1SLAVEPID=$!
+R1CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo R1SLAVEPID $R1SLAVEPID
+ echo R1CONSUMERPID $R1CONSUMERPID
read foo
fi
-KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID"
+KILLPIDS="$PROVIDERPID $P1CONSUMERPID $R1CONSUMERPID"
echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
sleep $SLEEP2
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.3" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.3" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the P1 slave..."
+#echo "Using ldapsearch to read all the entries from the P1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
- '(objectClass=*)' > "${SLAVEOUT}.3" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.3" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.3" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.3" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.3" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and P1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
-#echo "Using ldapsearch to read all the entries from the R1 slave..."
+#echo "Using ldapsearch to read all the entries from the R1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
- '(objectClass=*)' > "${SLAVEOUT}.3" 2>&1
+ '(objectClass=*)' > "${CONSUMEROUT}.3" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.3" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and R1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and slave databases differ"
+ echo "test failed - provider and consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
CHECK=`expr $CHECK + 1`
-echo "$CHECK > Try updating the P1 slave slapd..."
+echo "$CHECK > Try updating the P1 consumer slapd..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
-#echo "Using ldapsearch to read all the entries from the master..."
+#echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectClass=*)' > "${MASTEROUT}.4" 2>&1
+ '(objectClass=*)' > "${PROVIDEROUT}.4" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at master ($RC)!"
+ echo "ldapsearch failed at provider ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Using ldapsearch to read all the entries from the P1 slave..."
+#echo "Using ldapsearch to read all the entries from the P1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
-'(objectClass=*)' > "${SLAVEOUT}.4" 2>&1
+'(objectClass=*)' > "${CONSUMEROUT}.4" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering master results..."
-$LDIFFILTER < "${MASTEROUT}.4" > $MASTERFLT
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT
+#echo "Filtering provider results..."
+$LDIFFILTER < "${PROVIDEROUT}.4" > $PROVIDERFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.4" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and P1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and P1 slave databases differ"
+ echo "test failed - provider and P1 consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
-#echo "Using ldapsearch to read all the entries from the R1 slave..."
+#echo "Using ldapsearch to read all the entries from the R1 consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
-'(objectClass=*)' > "${SLAVEOUT}.4" 2>&1
+'(objectClass=*)' > "${CONSUMEROUT}.4" 2>&1
RC=$?
if test $RC != 0 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
-#echo "Filtering slave results..."
-$LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT
+#echo "Filtering consumer results..."
+$LDIFFILTER < "${CONSUMEROUT}.4" > $CONSUMERFLT
-echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+echo "$CHECK < Comparing retrieved entries from provider and R1 consumer..."
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
- echo "test failed - master and R1 slave databases differ"
+ echo "test failed - provider and R1 consumer databases differ"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit 1
fi
$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
cd $CONDIR
$SLAPD -F ./slapd.d -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
cd $TESTWD
sleep 1
echo "Using ldapsearch to read config from the provider..."
$LDAPSEARCH -b cn=config -D cn=config -H $URI1 -y $CONFIGPWF \
- 'objectclass=*' > $MASTEROUT 2>&1
+ 'objectclass=*' > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read config from the consumer..."
$LDAPSEARCH -b cn=config -D cn=config -H $URI2 -y $CONFIGPWF \
- 'objectclass=*' > $SLAVEOUT 2>&1
+ 'objectclass=*' > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved configs from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer configs differ"
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI1 -w $PASSWD \
- 'objectclass=*' > $MASTEROUT 2>&1
+ 'objectclass=*' > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI2 -w $PASSWD \
- 'objectclass=*' > $SLAVEOUT 2>&1
+ 'objectclass=*' > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
exit 0
fi
-MMR=${MMR-4}
+MPR=${MPR-4}
-if [ $MMR -gt 9 ]; then
-MMR=9
+if [ $MPR -gt 9 ]; then
+MPR=9
fi
XDIR=$TESTDIR/srv
echo "Initializing server configurations..."
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
DBDIR=${XDIR}$n/db
CFDIR=${XDIR}$n/slapd.d
echo "changetype: modify" >> $TMP
echo "replace: olcServerID" >> $TMP
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
echo "olcServerID: $n $URI" >> $TMP
EOF
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
echo "olcSyncRepl: rid=00$n provider=$URI binddn=\"cn=config\" bindmethod=simple" >> $TMP
fi
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
LOG=$TESTDIR/slapd.$n.log
echo "Starting server $n on TCP/IP port $PORT..."
cd ${XDIR}$n
$SLAPD -F ./slapd.d -h $URI -d $LVL $TIMING > $LOG 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
cd $TESTWD
sleep 1
add: olcSyncRepl
EOF
j=1
-while [ $j -le $MMR ]; do
+while [ $j -le $MPR ]; do
P2=`expr $BASEPORT + $j`
U2="ldap://${LOCALHOST}:$P2/"
echo "olcSyncRepl: rid=00$j provider=$U2 binddn=\"cn=config\" bindmethod=simple" >> $TMP
EOF
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
sleep $SLEEP2
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved configs from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n configs differ"
done
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
fi
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
LOG=$TESTDIR/slapd.$n.log
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
echo "Using ldapsearch to check that server $n is running..."
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
#
echo "Starting provider slapd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $CONF1
+. $CONFFILTER $BACKEND $MONITORDB < $SRPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
fi
echo "Starting consumer slapd on TCP/IP port $PORT4..."
-. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $CONF4
+. $CONFFILTER $BACKEND $MONITORDB < $P1SRCONSUMERCONF > $CONF4
$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING > $LOG4 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
echo PID $PID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
sleep 1
sleep $SLEEP1
echo "Stopping consumer to test recovery..."
-kill -HUP $SLAVEPID
-wait $SLAVEPID
+kill -HUP $CONSUMERPID
+wait $CONSUMERPID
echo "Modifying more entries on the provider..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
echo "Restarting consumer..."
echo "RESTART" >> $LOG4
$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING >> $LOG4 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$PID $SLAVEPID"
+KILLPIDS="$PID $CONSUMERPID"
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
sleep $SLEEP1
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
- '(objectclass=*)' '*' $OPATTRS > $MASTEROUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \
- '(objectclass=*)' '*' $OPATTRS > $SLAVEOUT 2>&1
+ '(objectclass=*)' '*' $OPATTRS > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
esac
#
-# Test replication of dynamic config with alternate slave config:
+# Test replication of dynamic config with alternate consumer config:
# - start provider
# - start consumer
# - configure over ldap
exit $RC
fi
-# Slaves will not replicate the master's actual cn=config.
+# Consumers will not replicate the provider's actual cn=config.
# Instead, they will use an alternate DB so that they may be
-# configured differently from the master. This alternate DB
+# configured differently from the provider. This alternate DB
# will also be a consumer for the real cn=schema,cn=config tree.
# It has MirrorMode enabled so that it can be written directly
-# while being a slave of the main schema.
-echo "Configuring slave config DB on provider..."
+# while being a consumer of the main schema.
+echo "Configuring consumer config DB on provider..."
$LDAPMODIFY -D cn=config -H $URI1 -y $CONFIGPWF <<EOF >> $TESTOUT 2>&1
dn: cn=config
changetype: modify
objectClass: olcLdifConfig
olcDatabase: {1}ldif
olcDbDirectory: $DBDIR1A
-olcSuffix: cn=config,cn=slave
-olcRootDN: cn=config,cn=slave
+olcSuffix: cn=config,cn=consumer
+olcRootDN: cn=config,cn=consumer
olcRootPW: repsecret
olcAccess: to * by dn.base="cn=config" write
objectClass: olcSyncProvConfig
olcOverlay: syncprov
-dn: cn=config,cn=slave
+dn: cn=config,cn=consumer
changetype: add
objectClass: olcGlobal
-cn: slaveconfig
+cn: consumerconfig
-dn: cn=schema,cn=config,cn=slave
+dn: cn=schema,cn=config,cn=consumer
changetype: add
objectClass: olcSchemaConfig
cn: schema
-dn: olcDatabase={0}config,cn=config,cn=slave
+dn: olcDatabase={0}config,cn=config,cn=consumer
changetype: add
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcRootPW: topsecret
-olcSyncrepl: {0}rid=001 provider=$URI1 binddn="cn=config,cn=slave"
- bindmethod=simple credentials=repsecret searchbase="cn=config,cn=slave"
+olcSyncrepl: {0}rid=001 provider=$URI1 binddn="cn=config,cn=consumer"
+ bindmethod=simple credentials=repsecret searchbase="cn=config,cn=consumer"
$SYNCTYPE retry="3 5 300 5" timeout=3 suffixmassage="cn=config"
olcUpdateRef: $URI1
olcSyncrepl: {0}rid=001 provider=$URI1 binddn="cn=config"
bindmethod=simple credentials=$CONFIGPW searchbase="cn=schema,cn=config"
$SYNCTYPE retry="3 5 300 5" timeout=3
- suffixmassage="cn=schema,cn=config,cn=slave"
+ suffixmassage="cn=schema,cn=config,cn=consumer"
-
add: olcMirrorMode
olcMirrorMode: TRUE
EOF
RC=$?
if test $RC != 0 ; then
- echo "ldapmodify failed for slave DB config ($RC)!"
+ echo "ldapmodify failed for consumer DB config ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
echo "Starting consumer slapd on TCP/IP port $PORT2..."
$SLAPADD -F $CFCON -n 0 -l $CONFLDIF
$SLAPD -F $CFCON -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
-SLAVEPID=$!
+CONSUMERPID=$!
if test $WAIT != 0 ; then
- echo SLAVEPID $SLAVEPID
+ echo CONSUMERPID $CONSUMERPID
read foo
fi
-KILLPIDS="$KILLPIDS $SLAVEPID"
+KILLPIDS="$KILLPIDS $CONSUMERPID"
sleep 1
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcSyncRepl
-olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config,cn=slave"
- bindmethod=simple credentials=repsecret searchbase="cn=config,cn=slave"
+olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config,cn=consumer"
+ bindmethod=simple credentials=repsecret searchbase="cn=config,cn=consumer"
$SYNCTYPE retry="3 5 300 5" timeout=3
suffixmassage="cn=config"
-
olcModulePath: ../servers/slapd/back-$BACKEND
olcModuleLoad: back_$BACKEND.la
-dn: cn=module,cn=config,cn=slave
+dn: cn=module,cn=config,cn=consumer
objectClass: olcModuleList
cn: module
olcModulePath: ../servers/slapd/back-$BACKEND
objectClass: olcSyncProvConfig
olcOverlay: syncprov
-dn: olcDatabase={1}$BACKEND,cn=config,cn=slave
+dn: olcDatabase={1}$BACKEND,cn=config,cn=consumer
objectClass: olcDatabaseConfig
${nullExclude}objectClass: olc${BACKEND}Config
olcDatabase: {1}$BACKEND
echo "Using ldapsearch to read all the entries from the provider..."
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI1 -w $PASSWD \
- 'objectclass=*' > $MASTEROUT 2>&1
+ 'objectclass=*' > $PROVIDEROUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to read all the entries from the consumer..."
$LDAPSEARCH -S "" -b "$BASEDN" -D "$MANAGERDN" -H $URI2 -w $PASSWD \
- 'objectclass=*' > $SLAVEOUT 2>&1
+ 'objectclass=*' > $CONSUMEROUT 2>&1
RC=$?
if test $RC != 0 ; then
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo "Filtering provider results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $PROVIDEROUT > $PROVIDERFLT
echo "Filtering consumer results..."
-$LDIFFILTER < $SLAVEOUT > $SLAVEFLT
+$LDIFFILTER < $CONSUMEROUT > $CONSUMERFLT
echo "Comparing retrieved entries from provider and consumer..."
-$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
+$CMP $PROVIDERFLT $CONSUMERFLT > $CMPOUT
if test $? != 0 ; then
echo "test failed - provider and consumer databases differ"
exit 0
fi
-MMR=2
+MPR=2
XDIR=$TESTDIR/srv
TMP=$TESTDIR/tmp
esac
#
-# Test delta-sync mmr
+# Test delta-sync mpr
# - start servers
# - configure over ldap
# - populate over ldap
echo "Initializing server configurations..."
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
DBDIR=${XDIR}$n/db
CFDIR=${XDIR}$n/slapd.d
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
sleep 1
for i in 1 2 3; do
$LDAPSEARCH -S "" -b "$THEDN" -H $URI1 \
- -s base '(objectClass=*)' entryCSN > "${MASTEROUT}.$i" 2>&1
+ -s base '(objectClass=*)' entryCSN > "${PROVIDEROUT}.$i" 2>&1
RC=$?
if test $RC = 0 ; then
fi
if test $RC != 32 ; then
- echo "ldapsearch failed at slave ($RC)!"
+ echo "ldapsearch failed at consumer ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
done
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
echo "Breaking replication between server 1 and 2..."
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
o=`expr 3 - $n`
MYURI=`eval echo '$URI'$n`
PROVIDERURI=`eval echo '$URI'$o`
echo "Restoring replication between server 1 and 2..."
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
o=`expr 3 - $n`
MYURI=`eval echo '$URI'$n`
PROVIDERURI=`eval echo '$URI'$o`
sleep $SLEEP1
n=1
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
PORT=`expr $BASEPORT + $n`
URI="ldap://${LOCALHOST}:$PORT/"
done
n=2
-while [ $n -le $MMR ]; do
+while [ $n -le $MPR ]; do
echo "Comparing retrieved entries from server 1 and server $n..."
-$CMP $MASTERFLT $TESTDIR/server$n.flt > $CMPOUT
+$CMP $PROVIDERFLT $TESTDIR/server$n.flt > $CMPOUT
if test $? != 0 ; then
echo "test failed - server 1 and server $n databases differ"
mkdir -p $TESTDIR $DBDIR1 $DBDIR2
# Test proxy caching:
-# - start master
+# - start provider
# - start proxy cache
-# - populate master
+# - populate provider
# - perform a first search
# - verify cacheability
# - perform a second search with the same filter and same user
# - perform a third search with the same user but a different filter
# - verify cacheability of the bind and the non-answerability of the result
-echo "Starting master slapd on TCP/IP port $PORT1..."
-. $CONFFILTER < $PROXYAUTHZMASTERCONF > $CONF1
+echo "Starting provider slapd on TCP/IP port $PORT1..."
+. $CONFFILTER < $PROXYAUTHZPROVIDERCONF > $CONF1
$SLAPD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
PID=$!
if test $WAIT != 0 ; then
sleep 1
-echo "Using ldapsearch to check that master slapd is running..."
+echo "Using ldapsearch to check that provider slapd is running..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
-D "cn=Manager,dc=example,dc=com" -w secret 'objectclass=*' > /dev/null 2>&1
exit $RC
fi
-echo "Using ldapadd to populate the master directory..."
+echo "Using ldapadd to populate the provider directory..."
$LDAPADD -x -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?