Skip to content

Commit

Permalink
Issue 51233 - ds-replcheck crashes in offline mode
Browse files Browse the repository at this point in the history
Bug Description:  When processing all the DN's found in the Master LDIF
                  it is possible that the LDIF is not in the expected
                  order and ldifsearch fails (crashing the tool).

Fix Description:  If ldifsearch does not find an entry, start from the
                  beginning of the LDIF and try again.

relates: https://pagure.io/389-ds-base/issue/51233

Reviewed by: spichugi(Thanks!)
  • Loading branch information
mreynolds389 committed Aug 10, 2020
1 parent 49cbd94 commit 22d6739
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ldap/admin/src/scripts/ds-replcheck
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,10 @@ def do_offline_report(opts, output_file=None):
missing = False
for dn in master_dns:
mresult = ldif_search(MLDIF, dn)
if mresult['entry'] is None and mresult['conflict'] is None and not mresult['tombstone']:
# Try from the beginning
MLDIF.seek(0)
mresult = ldif_search(MLDIF, dn)
rresult = ldif_search(RLDIF, dn)

if dn in replica_dns:
Expand Down

0 comments on commit 22d6739

Please sign in to comment.