andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0022-Issue-4656-remove-problematic-language-from-ds-replc.patch

5d81fc
From d2ac7e98d53cfe6c74c99ddf3504b1072418f05a Mon Sep 17 00:00:00 2001
5d81fc
From: Mark Reynolds <mreynolds@redhat.com>
5d81fc
Date: Thu, 11 Mar 2021 10:12:46 -0500
5d81fc
Subject: [PATCH] Issue 4656 - remove problematic language from ds-replcheck
5d81fc
5d81fc
Description: remove master from ds-replcheck and replace it with supplier
5d81fc
5d81fc
relates: https://github.com/389ds/389-ds-base/issues/4656
5d81fc
5d81fc
Reviewed by: mreynolds
5d81fc
5d81fc
e with '#' will be ignored, and an empty message aborts the commit.
5d81fc
---
5d81fc
 ldap/admin/src/scripts/ds-replcheck | 202 ++++++++++++++--------------
5d81fc
 1 file changed, 101 insertions(+), 101 deletions(-)
5d81fc
5d81fc
diff --git a/ldap/admin/src/scripts/ds-replcheck b/ldap/admin/src/scripts/ds-replcheck
5d81fc
index 169496e8f..f411f357a 100755
5d81fc
--- a/ldap/admin/src/scripts/ds-replcheck
5d81fc
+++ b/ldap/admin/src/scripts/ds-replcheck
5d81fc
@@ -1,7 +1,7 @@
5d81fc
 #!/usr/bin/python3
5d81fc
 
5d81fc
 # --- BEGIN COPYRIGHT BLOCK ---
5d81fc
-# Copyright (C) 2020 Red Hat, Inc.
5d81fc
+# Copyright (C) 2021 Red Hat, Inc.
5d81fc
 # All rights reserved.
5d81fc
 #
5d81fc
 # License: GPL (version 3 or any later version).
5d81fc
@@ -63,7 +63,7 @@ def remove_entry(rentries, dn):
5d81fc
 def get_ruv_time(ruv, rid):
5d81fc
     """Take a RUV element (nsds50ruv attribute) and extract the timestamp from maxcsn
5d81fc
     :param ruv - A lsit of RUV elements
5d81fc
-    :param rid - The rid of the master to extractthe maxcsn time from
5d81fc
+    :param rid - The rid of the supplier to extract the maxcsn time from
5d81fc
     :return: The time in seconds of the maxcsn, or 0 if there is no maxcsn, or -1 if
5d81fc
              the rid was not found
5d81fc
     """
5d81fc
@@ -213,22 +213,22 @@ def get_ruv_state(opts):
5d81fc
     :param opts - all the script options
5d81fc
     :return - A text description of the replicaton state
5d81fc
     """
5d81fc
-    mtime = get_ruv_time(opts['master_ruv'], opts['rid'])
5d81fc
+    mtime = get_ruv_time(opts['supplier_ruv'], opts['rid'])
5d81fc
     rtime = get_ruv_time(opts['replica_ruv'], opts['rid'])
5d81fc
     if mtime == -1:
5d81fc
-        repl_state = "Replication State: Replica ID ({}) not found in Master's RUV".format(opts['rid'])
5d81fc
+        repl_state = "Replication State: Replica ID ({}) not found in Supplier's RUV".format(opts['rid'])
5d81fc
     elif rtime == -1:
5d81fc
         repl_state = "Replication State: Replica ID ({}) not found in Replica's RUV (not initialized?)".format(opts['rid'])
5d81fc
     elif mtime == 0:
5d81fc
-        repl_state = "Replication State: Master has not seen any updates"
5d81fc
+        repl_state = "Replication State: Supplier has not seen any updates"
5d81fc
     elif rtime == 0:
5d81fc
-        repl_state = "Replication State: Replica has not seen any changes from the Master"
5d81fc
+        repl_state = "Replication State: Replica has not seen any changes from the Supplier"
5d81fc
     elif mtime > rtime:
5d81fc
-        repl_state = "Replication State: Replica is behind Master by: {} seconds".format(mtime - rtime)
5d81fc
+        repl_state = "Replication State: Replica is behind Supplier by: {} seconds".format(mtime - rtime)
5d81fc
     elif mtime < rtime:
5d81fc
-        repl_state = "Replication State: Replica is ahead of Master by: {} seconds".format(rtime - mtime)
5d81fc
+        repl_state = "Replication State: Replica is ahead of Supplier by: {} seconds".format(rtime - mtime)
5d81fc
     else:
5d81fc
-        repl_state = "Replication State: Master and Replica are in perfect synchronization"
5d81fc
+        repl_state = "Replication State: Supplier and Replica are in perfect synchronization"
5d81fc
 
5d81fc
     return repl_state
5d81fc
 
5d81fc
@@ -238,11 +238,11 @@ def get_ruv_report(opts):
5d81fc
     :param opts - all the script options
5d81fc
     :return - A text blob to display in the report
5d81fc
     """
5d81fc
-    opts['master_ruv'].sort()
5d81fc
+    opts['supplier_ruv'].sort()
5d81fc
     opts['replica_ruv'].sort()
5d81fc
 
5d81fc
-    report = "Master RUV:\n"
5d81fc
-    for element in opts['master_ruv']:
5d81fc
+    report = "Supplier RUV:\n"
5d81fc
+    for element in opts['supplier_ruv']:
5d81fc
         report += "  %s\n" % (element)
5d81fc
     report += "\nReplica RUV:\n"
5d81fc
     for element in opts['replica_ruv']:
5d81fc
@@ -521,7 +521,7 @@ def get_ldif_ruv(LDIF, opts):
5d81fc
 
5d81fc
 def cmp_entry(mentry, rentry, opts):
5d81fc
     """Compare the two entries, and return a "diff map"
5d81fc
-    :param mentry - A Master entry
5d81fc
+    :param mentry - A Supplier entry
5d81fc
     :param rentry - A Replica entry
5d81fc
     :param opts - A Dict of the scripts options
5d81fc
     :return - A Dict of the differences in the entry, or None
5d81fc
@@ -536,7 +536,7 @@ def cmp_entry(mentry, rentry, opts):
5d81fc
     mlist = list(mentry.data.keys())
5d81fc
 
5d81fc
     #
5d81fc
-    # Check master
5d81fc
+    # Check Supplier
5d81fc
     #
5d81fc
     for mattr in mlist:
5d81fc
         if mattr in opts['ignore']:
5d81fc
@@ -555,7 +555,7 @@ def cmp_entry(mentry, rentry, opts):
5d81fc
                             if not found:
5d81fc
                                 diff['missing'].append("")
5d81fc
                             found = True
5d81fc
-                            diff['missing'].append(" - Master's State Info: %s" % (val))
5d81fc
+                            diff['missing'].append(" - Supplier's State Info: %s" % (val))
5d81fc
                             diff['missing'].append(" - Date: %s\n" % (time.ctime(extract_time(val))))
5d81fc
                 else:
5d81fc
                     # No state info, just move on
5d81fc
@@ -566,18 +566,18 @@ def cmp_entry(mentry, rentry, opts):
5d81fc
             if report_conflict(rentry, mattr, opts) and report_conflict(mentry, mattr, opts):
5d81fc
                 diff['diff'].append(" - Attribute '%s' is different:" % mattr)
5d81fc
                 if 'nscpentrywsi' in mentry.data:
5d81fc
-                    # Process Master
5d81fc
+                    # Process Supplier
5d81fc
                     found = False
5d81fc
                     for val in mentry.data['nscpentrywsi']:
5d81fc
                         if val.lower().startswith(mattr + ';'):
5d81fc
                             if not found:
5d81fc
-                                diff['diff'].append("      Master:")
5d81fc
+                                diff['diff'].append("      Supplier:")
5d81fc
                             diff['diff'].append("        - Value:      %s" % (val.split(':')[1].lstrip()))
5d81fc
                             diff['diff'].append("        - State Info: %s" % (val))
5d81fc
                             diff['diff'].append("        - Date:       %s\n" % (time.ctime(extract_time(val))))
5d81fc
                             found = True
5d81fc
                     if not found:
5d81fc
-                        diff['diff'].append("      Master: ")
5d81fc
+                        diff['diff'].append("      Supplier: ")
5d81fc
                         for val in mentry.data[mattr]:
5d81fc
                             # This is an "origin" value which means it's never been
5d81fc
                             # updated since replication was set up.  So its the
5d81fc
@@ -605,7 +605,7 @@ def cmp_entry(mentry, rentry, opts):
5d81fc
                         diff['diff'].append("")
5d81fc
                 else:
5d81fc
                     # no state info, report what we got
5d81fc
-                    diff['diff'].append("      Master: ")
5d81fc
+                    diff['diff'].append("      Supplier: ")
5d81fc
                     for val in mentry.data[mattr]:
5d81fc
                         diff['diff'].append("        - %s: %s" % (mattr, val))
5d81fc
                     diff['diff'].append("      Replica: ")
5d81fc
@@ -622,9 +622,9 @@ def cmp_entry(mentry, rentry, opts):
5d81fc
             continue
5d81fc
 
5d81fc
         if rattr not in mlist:
5d81fc
-            # Master is missing the attribute
5d81fc
+            # Supplier is missing the attribute
5d81fc
             if report_conflict(rentry, rattr, opts):
5d81fc
-                diff['missing'].append(" - Master missing attribute: \"%s\"" % (rattr))
5d81fc
+                diff['missing'].append(" - Supplier missing attribute: \"%s\"" % (rattr))
5d81fc
                 diff_count += 1
5d81fc
                 if 'nscpentrywsi' in rentry.data:
5d81fc
                     found = False
5d81fc
@@ -663,7 +663,7 @@ def do_offline_report(opts, output_file=None):
5d81fc
     try:
5d81fc
         MLDIF = open(opts['mldif'], "r")
5d81fc
     except Exception as e:
5d81fc
-        print('Failed to open Master LDIF: ' + str(e))
5d81fc
+        print('Failed to open Supplier LDIF: ' + str(e))
5d81fc
         return
5d81fc
 
5d81fc
     try:
5d81fc
@@ -676,10 +676,10 @@ def do_offline_report(opts, output_file=None):
5d81fc
     # Verify LDIF Files
5d81fc
     try:
5d81fc
         if opts['verbose']:
5d81fc
-            print("Validating Master ldif file ({})...".format(opts['mldif']))
5d81fc
+            print("Validating Supplier ldif file ({})...".format(opts['mldif']))
5d81fc
         LDIFRecordList(MLDIF).parse()
5d81fc
     except ValueError:
5d81fc
-        print('Master LDIF file in invalid, aborting...')
5d81fc
+        print('Supplier LDIF file in invalid, aborting...')
5d81fc
         MLDIF.close()
5d81fc
         RLDIF.close()
5d81fc
         return
5d81fc
@@ -696,34 +696,34 @@ def do_offline_report(opts, output_file=None):
5d81fc
     # Get all the dn's, and entry counts
5d81fc
     if opts['verbose']:
5d81fc
         print ("Gathering all the DN's...")
5d81fc
-    master_dns = get_dns(MLDIF, opts['mldif'], opts)
5d81fc
+    supplier_dns = get_dns(MLDIF, opts['mldif'], opts)
5d81fc
     replica_dns = get_dns(RLDIF, opts['rldif'], opts)
5d81fc
-    if master_dns is None or replica_dns is None:
5d81fc
+    if supplier_dns is None or replica_dns is None:
5d81fc
         print("Aborting scan...")
5d81fc
         MLDIF.close()
5d81fc
         RLDIF.close()
5d81fc
         sys.exit(1)
5d81fc
-    m_count = len(master_dns)
5d81fc
+    m_count = len(supplier_dns)
5d81fc
     r_count = len(replica_dns)
5d81fc
 
5d81fc
     # Get DB RUV
5d81fc
     if opts['verbose']:
5d81fc
         print ("Gathering the database RUV's...")
5d81fc
-    opts['master_ruv'] = get_ldif_ruv(MLDIF, opts)
5d81fc
+    opts['supplier_ruv'] = get_ldif_ruv(MLDIF, opts)
5d81fc
     opts['replica_ruv'] = get_ldif_ruv(RLDIF, opts)
5d81fc
 
5d81fc
-    """ Compare the master entries with the replica's.  Take our list of dn's from
5d81fc
-    the master ldif and get that entry( dn) from the master and replica ldif.  In
5d81fc
+    """ Compare the Supplier entries with the replica's.  Take our list of dn's from
5d81fc
+    the Supplier ldif and get that entry( dn) from the Supplier and replica ldif.  In
5d81fc
     this phase we keep keep track of conflict/tombstone counts, and we check for
5d81fc
     missing entries and entry differences.   We only need to do the entry diff
5d81fc
     checking in this phase - we do not need to do it when process the replica dn's
5d81fc
     because if the entry exists in both LDIF's then we already checked or diffs
5d81fc
-    while processing the master dn's.
5d81fc
+    while processing the Supplier dn's.
5d81fc
     """
5d81fc
     if opts['verbose']:
5d81fc
-        print ("Comparing Master to Replica...")
5d81fc
+        print ("Comparing Supplier to Replica...")
5d81fc
     missing = False
5d81fc
-    for dn in master_dns:
5d81fc
+    for dn in supplier_dns:
5d81fc
         mresult = ldif_search(MLDIF, dn)
5d81fc
         if mresult['entry'] is None and mresult['conflict'] is None and not mresult['tombstone']:
5d81fc
             # Try from the beginning
5d81fc
@@ -736,7 +736,7 @@ def do_offline_report(opts, output_file=None):
5d81fc
                 rresult['conflict'] is not None or rresult['tombstone']):
5d81fc
                 """ We can safely remove this DN from the replica dn list as it
5d81fc
                 does not need to be checked again.  This also speeds things up
5d81fc
-                when doing the replica vs master phase.
5d81fc
+                when doing the replica vs Supplier phase.
5d81fc
                 """
5d81fc
                 replica_dns.remove(dn)
5d81fc
 
5d81fc
@@ -766,7 +766,7 @@ def do_offline_report(opts, output_file=None):
5d81fc
                         missing_report += ('  Entries missing on Replica:\n')
5d81fc
                         missing = True
5d81fc
                     if mresult['entry'] and 'createtimestamp' in mresult['entry'].data:
5d81fc
-                        missing_report += ('   - %s  (Created on Master at: %s)\n' %
5d81fc
+                        missing_report += ('   - %s  (Created on Supplier at: %s)\n' %
5d81fc
                                            (dn, convert_timestamp(mresult['entry'].data['createtimestamp'][0])))
5d81fc
                     else:
5d81fc
                         missing_report += ('  - %s\n' % dn)
5d81fc
@@ -791,7 +791,7 @@ def do_offline_report(opts, output_file=None):
5d81fc
     remaining conflict & tombstone entries as well.
5d81fc
     """
5d81fc
     if opts['verbose']:
5d81fc
-        print ("Comparing Replica to Master...")
5d81fc
+        print ("Comparing Replica to Supplier...")
5d81fc
     MLDIF.seek(0)
5d81fc
     RLDIF.seek(0)
5d81fc
     missing = False
5d81fc
@@ -811,7 +811,7 @@ def do_offline_report(opts, output_file=None):
5d81fc
             if mresult['entry'] is None and mresult['glue'] is None:
5d81fc
                 MLDIF.seek(rresult['idx'])  # Set the LDIF cursor/index to the last good line
5d81fc
                 if not missing:
5d81fc
-                    missing_report += ('  Entries missing on Master:\n')
5d81fc
+                    missing_report += ('  Entries missing on Supplier:\n')
5d81fc
                     missing = True
5d81fc
                 if rresult['entry'] and 'createtimestamp' in rresult['entry'].data:
5d81fc
                     missing_report += ('   - %s  (Created on Replica at: %s)\n' %
5d81fc
@@ -837,12 +837,12 @@ def do_offline_report(opts, output_file=None):
5d81fc
     final_report += get_ruv_report(opts)
5d81fc
     final_report += ('Entry Counts\n')
5d81fc
     final_report += ('=====================================================\n\n')
5d81fc
-    final_report += ('Master:  %d\n' % (m_count))
5d81fc
+    final_report += ('Supplier:  %d\n' % (m_count))
5d81fc
     final_report += ('Replica: %d\n\n' % (r_count))
5d81fc
 
5d81fc
     final_report += ('\nTombstones\n')
5d81fc
     final_report += ('=====================================================\n\n')
5d81fc
-    final_report += ('Master:  %d\n' % (mtombstones))
5d81fc
+    final_report += ('Supplier:  %d\n' % (mtombstones))
5d81fc
     final_report += ('Replica: %d\n' % (rtombstones))
5d81fc
 
5d81fc
     final_report += get_conflict_report(mconflicts, rconflicts, opts['conflicts'])
5d81fc
@@ -859,9 +859,9 @@ def do_offline_report(opts, output_file=None):
5d81fc
     final_report += ('\nResult\n')
5d81fc
     final_report += ('=====================================================\n\n')
5d81fc
     if missing_report == "" and len(diff_report) == 0:
5d81fc
-        final_report += ('No replication differences between Master and Replica\n')
5d81fc
+        final_report += ('No replication differences between Supplier and Replica\n')
5d81fc
     else:
5d81fc
-        final_report += ('There are replication differences between Master and Replica\n')
5d81fc
+        final_report += ('There are replication differences between Supplier and Replica\n')
5d81fc
 
5d81fc
     if output_file:
5d81fc
         output_file.write(final_report)
5d81fc
@@ -871,8 +871,8 @@ def do_offline_report(opts, output_file=None):
5d81fc
 
5d81fc
 def check_for_diffs(mentries, mglue, rentries, rglue, report, opts):
5d81fc
     """Online mode only - Check for diffs, return the updated report
5d81fc
-    :param mentries - Master entries
5d81fc
-    :param mglue - Master glue entries
5d81fc
+    :param mentries - Supplier entries
5d81fc
+    :param mglue - Supplier glue entries
5d81fc
     :param rentries - Replica entries
5d81fc
     :param rglue - Replica glue entries
5d81fc
     :param report - A Dict of the entire report
5d81fc
@@ -947,8 +947,8 @@ def validate_suffix(ldapnode, suffix, hostname):
5d81fc
     # Check suffix is replicated
5d81fc
     try:
5d81fc
         replica_filter = "(&(objectclass=nsds5replica)(nsDS5ReplicaRoot=%s))" % suffix
5d81fc
-        master_replica = ldapnode.search_s("cn=config",ldap.SCOPE_SUBTREE,replica_filter)
5d81fc
-        if (len(master_replica) != 1):
5d81fc
+        supplier_replica = ldapnode.search_s("cn=config",ldap.SCOPE_SUBTREE,replica_filter)
5d81fc
+        if (len(supplier_replica) != 1):
5d81fc
             print("Error: Failed to validate suffix in {}. {} is not replicated.".format(hostname, suffix))
5d81fc
             return False
5d81fc
     except ldap.LDAPError as e:
5d81fc
@@ -969,7 +969,7 @@ def connect_to_replicas(opts):
5d81fc
         muri = "%s://%s" % (opts['mprotocol'], opts['mhost'].replace("/", "%2f"))
5d81fc
     else:
5d81fc
         muri = "%s://%s:%s/" % (opts['mprotocol'], opts['mhost'], opts['mport'])
5d81fc
-    master = SimpleLDAPObject(muri)
5d81fc
+    supplier = SimpleLDAPObject(muri)
5d81fc
 
5d81fc
     if opts['rprotocol'].lower() == 'ldapi':
5d81fc
         ruri = "%s://%s" % (opts['rprotocol'], opts['rhost'].replace("/", "%2f"))
5d81fc
@@ -978,23 +978,23 @@ def connect_to_replicas(opts):
5d81fc
     replica = SimpleLDAPObject(ruri)
5d81fc
 
5d81fc
     # Set timeouts
5d81fc
-    master.set_option(ldap.OPT_NETWORK_TIMEOUT, opts['timeout'])
5d81fc
-    master.set_option(ldap.OPT_TIMEOUT, opts['timeout'])
5d81fc
+    supplier.set_option(ldap.OPT_NETWORK_TIMEOUT, opts['timeout'])
5d81fc
+    supplier.set_option(ldap.OPT_TIMEOUT, opts['timeout'])
5d81fc
     replica.set_option(ldap.OPT_NETWORK_TIMEOUT, opts['timeout'])
5d81fc
     replica.set_option(ldap.OPT_TIMEOUT, opts['timeout'])
5d81fc
 
5d81fc
     # Setup Secure Connection
5d81fc
     if opts['certdir'] is not None:
5d81fc
-        # Setup Master
5d81fc
+        # Setup Supplier
5d81fc
         if opts['mprotocol'] != LDAPI:
5d81fc
-            master.set_option(ldap.OPT_X_TLS_CACERTDIR, opts['certdir'])
5d81fc
-            master.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_HARD)
5d81fc
+            supplier.set_option(ldap.OPT_X_TLS_CACERTDIR, opts['certdir'])
5d81fc
+            supplier.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_HARD)
5d81fc
             if opts['mprotocol'] == LDAP:
5d81fc
                 # Do StartTLS
5d81fc
                 try:
5d81fc
-                    master.start_tls_s()
5d81fc
+                    supplier.start_tls_s()
5d81fc
                 except ldap.LDAPError as e:
5d81fc
-                    print('TLS negotiation failed on Master: {}'.format(str(e)))
5d81fc
+                    print('TLS negotiation failed on Supplier: {}'.format(str(e)))
5d81fc
                     exit(1)
5d81fc
 
5d81fc
         # Setup Replica
5d81fc
@@ -1006,17 +1006,17 @@ def connect_to_replicas(opts):
5d81fc
                 try:
5d81fc
                     replica.start_tls_s()
5d81fc
                 except ldap.LDAPError as e:
5d81fc
-                    print('TLS negotiation failed on Master: {}'.format(str(e)))
5d81fc
+                    print('TLS negotiation failed on Supplier: {}'.format(str(e)))
5d81fc
                     exit(1)
5d81fc
 
5d81fc
-    # Open connection to master
5d81fc
+    # Open connection to Supplier
5d81fc
     try:
5d81fc
-        master.simple_bind_s(opts['binddn'], opts['bindpw'])
5d81fc
+        supplier.simple_bind_s(opts['binddn'], opts['bindpw'])
5d81fc
     except ldap.SERVER_DOWN as e:
5d81fc
         print(f"Cannot connect to {muri} ({str(e)})")
5d81fc
         sys.exit(1)
5d81fc
     except ldap.LDAPError as e:
5d81fc
-        print("Error: Failed to authenticate to Master: ({}).  "
5d81fc
+        print("Error: Failed to authenticate to Supplier: ({}).  "
5d81fc
               "Please check your credentials and LDAP urls are correct.".format(str(e)))
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
@@ -1034,7 +1034,7 @@ def connect_to_replicas(opts):
5d81fc
     # Validate suffix
5d81fc
     if opts['verbose']:
5d81fc
         print ("Validating suffix ...")
5d81fc
-    if not validate_suffix(master, opts['suffix'], opts['mhost']):
5d81fc
+    if not validate_suffix(supplier, opts['suffix'], opts['mhost']):
5d81fc
       sys.exit(1)
5d81fc
 
5d81fc
     if not validate_suffix(replica,opts['suffix'], opts['rhost']):
5d81fc
@@ -1042,16 +1042,16 @@ def connect_to_replicas(opts):
5d81fc
 
5d81fc
     # Get the RUVs
5d81fc
     if opts['verbose']:
5d81fc
-        print ("Gathering Master's RUV...")
5d81fc
+        print ("Gathering Supplier's RUV...")
5d81fc
     try:
5d81fc
-        master_ruv = master.search_s(opts['suffix'], ldap.SCOPE_SUBTREE, RUV_FILTER, ['nsds50ruv'])
5d81fc
-        if len(master_ruv) > 0:
5d81fc
-            opts['master_ruv'] = ensure_list_str(master_ruv[0][1]['nsds50ruv'])
5d81fc
+        supplier_ruv = supplier.search_s(opts['suffix'], ldap.SCOPE_SUBTREE, RUV_FILTER, ['nsds50ruv'])
5d81fc
+        if len(supplier_ruv) > 0:
5d81fc
+            opts['supplier_ruv'] = ensure_list_str(supplier_ruv[0][1]['nsds50ruv'])
5d81fc
         else:
5d81fc
-            print("Error: Master does not have an RUV entry")
5d81fc
+            print("Error: Supplier does not have an RUV entry")
5d81fc
             sys.exit(1)
5d81fc
     except ldap.LDAPError as e:
5d81fc
-        print("Error: Failed to get Master RUV entry: {}".format(str(e)))
5d81fc
+        print("Error: Failed to get Supplier RUV entry: {}".format(str(e)))
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
     if opts['verbose']:
5d81fc
@@ -1067,12 +1067,12 @@ def connect_to_replicas(opts):
5d81fc
         print("Error: Failed to get Replica RUV entry: {}".format(str(e)))
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
-    # Get the master RID
5d81fc
+    # Get the Supplier RID
5d81fc
     if opts['verbose']:
5d81fc
-        print("Getting Master's replica ID")
5d81fc
+        print("Getting Supplier's replica ID")
5d81fc
     try:
5d81fc
         search_filter = "(&(objectclass=nsds5Replica)(nsDS5ReplicaRoot={})(nsDS5ReplicaId=*))".format(opts['suffix'])
5d81fc
-        replica_entry = master.search_s("cn=config", ldap.SCOPE_SUBTREE, search_filter)
5d81fc
+        replica_entry = supplier.search_s("cn=config", ldap.SCOPE_SUBTREE, search_filter)
5d81fc
         if len(replica_entry) > 0:
5d81fc
             opts['rid'] = ensure_int(replica_entry[0][1]['nsDS5ReplicaId'][0])
5d81fc
         else:
5d81fc
@@ -1081,7 +1081,7 @@ def connect_to_replicas(opts):
5d81fc
         print("Error: Failed to get Replica entry: {}".format(str(e)))
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
-    return (master, replica, opts)
5d81fc
+    return (supplier, replica, opts)
5d81fc
 
5d81fc
 
5d81fc
 def print_online_report(report, opts, output_file):
5d81fc
@@ -1104,11 +1104,11 @@ def print_online_report(report, opts, output_file):
5d81fc
     final_report += get_ruv_report(opts)
5d81fc
     final_report += ('Entry Counts\n')
5d81fc
     final_report += ('=====================================================\n\n')
5d81fc
-    final_report += ('Master:  %d\n' % (report['m_count']))
5d81fc
+    final_report += ('Supplier:  %d\n' % (report['m_count']))
5d81fc
     final_report += ('Replica: %d\n\n' % (report['r_count']))
5d81fc
     final_report += ('\nTombstones\n')
5d81fc
     final_report += ('=====================================================\n\n')
5d81fc
-    final_report += ('Master:  %d\n' % (report['mtombstones']))
5d81fc
+    final_report += ('Supplier:  %d\n' % (report['mtombstones']))
5d81fc
     final_report += ('Replica: %d\n' % (report['rtombstones']))
5d81fc
     final_report += report['conflict']
5d81fc
     missing = False
5d81fc
@@ -1121,7 +1121,7 @@ def print_online_report(report, opts, output_file):
5d81fc
             final_report += ('  Entries missing on Replica:\n')
5d81fc
             for entry in report['r_missing']:
5d81fc
                 if 'createtimestamp' in entry.data:
5d81fc
-                    final_report += ('   - %s  (Created on Master at: %s)\n' %
5d81fc
+                    final_report += ('   - %s  (Created on Supplier at: %s)\n' %
5d81fc
                                      (entry.dn, convert_timestamp(entry.data['createtimestamp'][0])))
5d81fc
                 else:
5d81fc
                     final_report += ('   - %s\n' % (entry.dn))
5d81fc
@@ -1129,7 +1129,7 @@ def print_online_report(report, opts, output_file):
5d81fc
         if m_missing > 0:
5d81fc
             if r_missing > 0:
5d81fc
                 final_report += ('\n')
5d81fc
-            final_report += ('  Entries missing on Master:\n')
5d81fc
+            final_report += ('  Entries missing on Supplier:\n')
5d81fc
             for entry in report['m_missing']:
5d81fc
                 if 'createtimestamp' in entry.data:
5d81fc
                     final_report += ('   - %s  (Created on Replica at: %s)\n' %
5d81fc
@@ -1146,9 +1146,9 @@ def print_online_report(report, opts, output_file):
5d81fc
     final_report += ('\nResult\n')
5d81fc
     final_report += ('=====================================================\n\n')
5d81fc
     if not missing and len(report['diff']) == 0:
5d81fc
-        final_report += ('No replication differences between Master and Replica\n')
5d81fc
+        final_report += ('No replication differences between Supplier and Replica\n')
5d81fc
     else:
5d81fc
-        final_report += ('There are replication differences between Master and Replica\n')
5d81fc
+        final_report += ('There are replication differences between Supplier and Replica\n')
5d81fc
 
5d81fc
     if output_file:
5d81fc
         output_file.write(final_report)
5d81fc
@@ -1170,7 +1170,7 @@ def remove_state_info(entry):
5d81fc
 
5d81fc
 def get_conflict_report(mentries, rentries, verbose):
5d81fc
     """Gather the conflict entry dn's for each replica
5d81fc
-    :param mentries - Master entries
5d81fc
+    :param mentries - Supplier entries
5d81fc
     :param rentries - Replica entries
5d81fc
     :param verbose - verbose logging
5d81fc
     :return - A text blob to dispaly in the report
5d81fc
@@ -1197,7 +1197,7 @@ def get_conflict_report(mentries, rentries, verbose):
5d81fc
         report = "\n\nConflict Entries\n"
5d81fc
         report += "=====================================================\n\n"
5d81fc
         if len(m_conflicts) > 0:
5d81fc
-            report += ('Master Conflict Entries:  %d\n' % (len(m_conflicts)))
5d81fc
+            report += ('Supplier Conflict Entries:  %d\n' % (len(m_conflicts)))
5d81fc
             if verbose:
5d81fc
                 for entry in m_conflicts:
5d81fc
                     report += ('\n - %s\n' % (entry['dn']))
5d81fc
@@ -1239,8 +1239,8 @@ def do_online_report(opts, output_file=None):
5d81fc
     rconflicts = []
5d81fc
     mconflicts = []
5d81fc
 
5d81fc
-    # Fire off paged searches on Master and Replica
5d81fc
-    master, replica, opts = connect_to_replicas(opts)
5d81fc
+    # Fire off paged searches on Supplier and Replica
5d81fc
+    supplier, replica, opts = connect_to_replicas(opts)
5d81fc
 
5d81fc
     if opts['verbose']:
5d81fc
         print('Start searching and comparing...')
5d81fc
@@ -1248,12 +1248,12 @@ def do_online_report(opts, output_file=None):
5d81fc
     controls = [paged_ctrl]
5d81fc
     req_pr_ctrl = controls[0]
5d81fc
     try:
5d81fc
-        master_msgid = master.search_ext(opts['suffix'], ldap.SCOPE_SUBTREE,
5d81fc
-                                         "(|(objectclass=*)(objectclass=ldapsubentry)(objectclass=nstombstone))",
5d81fc
-                                         ['*', 'createtimestamp', 'nscpentrywsi', 'nsds5replconflict'],
5d81fc
-                                         serverctrls=controls)
5d81fc
+        supplier_msgid = supplier.search_ext(opts['suffix'], ldap.SCOPE_SUBTREE,
5d81fc
+                                             "(|(objectclass=*)(objectclass=ldapsubentry)(objectclass=nstombstone))",
5d81fc
+                                             ['*', 'createtimestamp', 'nscpentrywsi', 'nsds5replconflict'],
5d81fc
+                                             serverctrls=controls)
5d81fc
     except ldap.LDAPError as e:
5d81fc
-        print("Error: Failed to get Master entries: %s", str(e))
5d81fc
+        print("Error: Failed to get Supplier entries: %s", str(e))
5d81fc
         sys.exit(1)
5d81fc
     try:
5d81fc
         replica_msgid = replica.search_ext(opts['suffix'], ldap.SCOPE_SUBTREE,
5d81fc
@@ -1268,11 +1268,11 @@ def do_online_report(opts, output_file=None):
5d81fc
     while not m_done or not r_done:
5d81fc
         try:
5d81fc
             if not m_done:
5d81fc
-                m_rtype, m_rdata, m_rmsgid, m_rctrls = master.result3(master_msgid)
5d81fc
+                m_rtype, m_rdata, m_rmsgid, m_rctrls = supplier.result3(supplier_msgid)
5d81fc
             elif not r_done:
5d81fc
                 m_rdata = []
5d81fc
         except ldap.LDAPError as e:
5d81fc
-            print("Error: Problem getting the results from the master: %s", str(e))
5d81fc
+            print("Error: Problem getting the results from the Supplier: %s", str(e))
5d81fc
             sys.exit(1)
5d81fc
         try:
5d81fc
             if not r_done:
5d81fc
@@ -1299,7 +1299,7 @@ def do_online_report(opts, output_file=None):
5d81fc
                                  report, opts)
5d81fc
 
5d81fc
         if not m_done:
5d81fc
-            # Master
5d81fc
+            # Supplier
5d81fc
             m_pctrls = [
5d81fc
                 c
5d81fc
                 for c in m_rctrls
5d81fc
@@ -1310,11 +1310,11 @@ def do_online_report(opts, output_file=None):
5d81fc
                     try:
5d81fc
                         # Copy cookie from response control to request control
5d81fc
                         req_pr_ctrl.cookie = m_pctrls[0].cookie
5d81fc
-                        master_msgid = master.search_ext(opts['suffix'], ldap.SCOPE_SUBTREE,
5d81fc
+                        supplier_msgid = supplier.search_ext(opts['suffix'], ldap.SCOPE_SUBTREE,
5d81fc
                             "(|(objectclass=*)(objectclass=ldapsubentry))",
5d81fc
                             ['*', 'createtimestamp', 'nscpentrywsi', 'conflictcsn', 'nsds5replconflict'], serverctrls=controls)
5d81fc
                     except ldap.LDAPError as e:
5d81fc
-                        print("Error: Problem searching the master: %s", str(e))
5d81fc
+                        print("Error: Problem searching the Supplier: %s", str(e))
5d81fc
                         sys.exit(1)
5d81fc
                 else:
5d81fc
                     m_done = True  # No more pages available
5d81fc
@@ -1354,7 +1354,7 @@ def do_online_report(opts, output_file=None):
5d81fc
     print_online_report(report, opts, output_file)
5d81fc
 
5d81fc
     # unbind
5d81fc
-    master.unbind_s()
5d81fc
+    supplier.unbind_s()
5d81fc
     replica.unbind_s()
5d81fc
 
5d81fc
 
5d81fc
@@ -1367,18 +1367,18 @@ def init_online_params(args):
5d81fc
 
5d81fc
     # Make sure the URLs are different
5d81fc
     if args.murl == args.rurl:
5d81fc
-        print("Master and Replica LDAP URLs are the same, they must be different")
5d81fc
+        print("Supplier and Replica LDAP URLs are the same, they must be different")
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
-    # Parse Master url
5d81fc
+    # Parse Supplier url
5d81fc
     if not ldapurl.isLDAPUrl(args.murl):
5d81fc
-        print("Master LDAP URL is invalid")
5d81fc
+        print("Supplier LDAP URL is invalid")
5d81fc
         sys.exit(1)
5d81fc
     murl = ldapurl.LDAPUrl(args.murl)
5d81fc
     if murl.urlscheme in VALID_PROTOCOLS:
5d81fc
         opts['mprotocol'] = murl.urlscheme
5d81fc
     else:
5d81fc
-        print('Unsupported ldap url protocol (%s) for Master, please use "ldaps" or "ldap"' %
5d81fc
+        print('Unsupported ldap url protocol (%s) for Supplier, please use "ldaps" or "ldap"' %
5d81fc
               murl.urlscheme)
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
@@ -1520,7 +1520,7 @@ def offline_report(args):
5d81fc
             print ("LDIF file ({}) is empty".format(ldif_dir))
5d81fc
             sys.exit(1)
5d81fc
     if opts['mldif'] == opts['rldif']:
5d81fc
-        print("The Master and Replica LDIF files must be different")
5d81fc
+        print("The Supplier and Replica LDIF files must be different")
5d81fc
         sys.exit(1)
5d81fc
 
5d81fc
     OUTPUT_FILE = None
5d81fc
@@ -1547,7 +1547,7 @@ def get_state(args):
5d81fc
     """Just do the RUV comparision
5d81fc
     """
5d81fc
     opts = init_online_params(args)
5d81fc
-    master, replica, opts = connect_to_replicas(opts)
5d81fc
+    supplier, replica, opts = connect_to_replicas(opts)
5d81fc
     print(get_ruv_state(opts))
5d81fc
 
5d81fc
 
5d81fc
@@ -1569,10 +1569,10 @@ def main():
5d81fc
     # Get state
5d81fc
     state_parser = subparsers.add_parser('state', help="Get the current replicaton state between two replicas")
5d81fc
     state_parser.set_defaults(func=get_state)
5d81fc
-    state_parser.add_argument('-m', '--master-url', help='The LDAP URL for the Master server',
5d81fc
-                               dest='murl', default=None, required=True)
5d81fc
+    state_parser.add_argument('-m', '--supplier-url', help='The LDAP URL for the Supplier server',
5d81fc
+                              dest='murl', default=None, required=True)
5d81fc
     state_parser.add_argument('-r', '--replica-url', help='The LDAP URL for the Replica server',
5d81fc
-                               dest='rurl', required=True, default=None)
5d81fc
+                              dest='rurl', required=True, default=None)
5d81fc
     state_parser.add_argument('-b', '--suffix', help='Replicated suffix', dest='suffix', required=True)
5d81fc
     state_parser.add_argument('-D', '--bind-dn', help='The Bind DN', required=True, dest='binddn', default=None)
5d81fc
     state_parser.add_argument('-w', '--bind-pw', help='The Bind password', dest='bindpw', default=None)
5d81fc
@@ -1586,7 +1586,7 @@ def main():
5d81fc
     # Online mode
5d81fc
     online_parser = subparsers.add_parser('online', help="Compare two online replicas for differences")
5d81fc
     online_parser.set_defaults(func=online_report)
5d81fc
-    online_parser.add_argument('-m', '--master-url', help='The LDAP URL for the Master server (REQUIRED)',
5d81fc
+    online_parser.add_argument('-m', '--supplier-url', help='The LDAP URL for the Supplier server (REQUIRED)',
5d81fc
                                dest='murl', default=None, required=True)
5d81fc
     online_parser.add_argument('-r', '--replica-url', help='The LDAP URL for the Replica server (REQUIRED)',
5d81fc
                                dest='rurl', required=True, default=None)
5d81fc
@@ -1612,12 +1612,12 @@ def main():
5d81fc
     # Offline LDIF mode
5d81fc
     offline_parser = subparsers.add_parser('offline', help="Compare two replication LDIF files for differences (LDIF file generated by 'db2ldif -r')")
5d81fc
     offline_parser.set_defaults(func=offline_report)
5d81fc
-    offline_parser.add_argument('-m', '--master-ldif', help='Master LDIF file',
5d81fc
+    offline_parser.add_argument('-m', '--supplier-ldif', help='Supplier LDIF file',
5d81fc
                                 dest='mldif', default=None, required=True)
5d81fc
     offline_parser.add_argument('-r', '--replica-ldif', help='Replica LDIF file',
5d81fc
                                 dest='rldif', default=None, required=True)
5d81fc
     offline_parser.add_argument('--rid', dest='rid', default=None, required=True,
5d81fc
-                                help='The Replica Identifer (rid) for the "Master" server')
5d81fc
+                                help='The Replica Identifier (rid) for the "Supplier" server')
5d81fc
     offline_parser.add_argument('-b', '--suffix', help='Replicated suffix', dest='suffix', required=True)
5d81fc
     offline_parser.add_argument('-c', '--conflicts', help='Display verbose conflict information', action='store_true',
5d81fc
                                 dest='conflicts', default=False)
5d81fc
-- 
5d81fc
2.31.1
5d81fc