Bug 1708094
| Summary: | ds-replcheck reports data inconsistency if attribute has matching entries but in different order | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | rmitra |
| Component: | 389-ds-base | Assignee: | mreynolds |
| Status: | CLOSED ERRATA | QA Contact: | RHDS QE <ds-qe-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.5 | CC: | aadhikar, lkrispen, nkinder, pasik, rmeggins, spichugi, tbordaz, vashirov |
| Target Milestone: | rc | ||
| Target Release: | 7.7 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 389-ds-base-1.3.9.1-7.el7 | Doc Type: | Bug Fix |
| Doc Text: |
Cause: The same entry on two different replicas has its attributes in a different order.
Consequence: The tool incorrectly reports this as an inconsistency between the two replcias
Fix: Sort the entry attributes before comparing them
Result: The tool does not report false positives if an entry's attributes are not in the same order on both replicas.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-08-06 12:59:17 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Can we could get two LDIF files (master and replica) so I can reproduce it? Upstream ticket: https://pagure.io/389-ds-base/issue/50363 I was able to reproduce the problem, and I have a fix out for review... [root@rhel7-aadhikar-new1 ds]# py.test -v dirsrvtests/tests/suites/ds_tools/replcheck_test.py
============================================================================ test session starts ============================================================================
platform linux -- Python 3.6.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 -- /opt/rh/rh-python36/root/usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.3', 'Platform': 'Linux-3.10.0-1053.el7.x86_64-x86_64-with-redhat-7.7-Maipo', 'Packages': {'pytest': '4.6.3', 'py': '1.8.0', 'pluggy': '0.12.0'}, 'Plugins': {'metadata': '1.8.0', 'html': '1.20.0'}}
389-ds-base: 1.3.9.1-10.el7
nss: 3.44.0-4.el7
nspr: 4.21.0-1.el7
openldap: 2.4.44-21.el7_6
cyrus-sasl: 2.1.26-23.el7
FIPS: disabled
rootdir: /workspace/ds/dirsrvtests, inifile: pytest.ini
plugins: metadata-1.8.0, html-1.20.0
collected 6 items
dirsrvtests/tests/suites/ds_tools/replcheck_test.py::test_state SKIPPED [ 16%]
dirsrvtests/tests/suites/ds_tools/replcheck_test.py::test_check_ruv PASSED [ 33%]
dirsrvtests/tests/suites/ds_tools/replcheck_test.py::test_missing_entries PASSED [ 50%]
dirsrvtests/tests/suites/ds_tools/replcheck_test.py::test_tombstones PASSED [ 66%]
dirsrvtests/tests/suites/ds_tools/replcheck_test.py::test_conflict_entries PASSED [ 83%]
dirsrvtests/tests/suites/ds_tools/replcheck_test.py::test_inconsistencies PASSED [100%]
=================================================================== 5 passed, 1 skipped in 277.28 seconds ===================================================================
Marking it as VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2152 |
Description of problem: /usr/bin/ds-replcheck reports "Entry Inconsistencies" in attribute data between IPA master and replica, even though entries for the attribute match. This happens when the entries of an attribute appear in a different order in the LDAP database on the master and the replica. ======== Version-Release number of selected component (if applicable): 389-ds-base-1.3.8.4-22 ======== How reproducible: TBD Steps to Reproduce: 1. 2. 3. ======== Actual results: ds-replcheck reports "Entry Inconsistencies" when IPA master and replica have correctly matching data for an attribute, however only the ordering is different for those entries within the LDAP database. For example: ==> If IPA master has: .... memberUid: u1000xx.com memberUid: u1000yy.com .... ==> and IPA replica has: .... memberUid: u1000yy.com memberUid: u1000xx.com .... ==> Both have identical entries but differing in order. ==> ds-replcheck reports the below error: Entry Inconsistencies ===================================================== cn=test_group,cn=groups,cn=compat,dc=linux,dc=test,dc=domain,dc=com ------------------------------------------------------------------- - Attribute 'memberuid' is different: Master: .... - Origin value: u1000xx.com - Origin value: u1000yy.com .... Replica: .... - Origin value: u1000yy.com - Origin value: u1000xx.com .... ======== Expected results: Ideally, as long as all the entries in an attribute match on the IPA master and replica, it should be considered as a successful comparison. Difference in ordering doesn't cause any functional issues in LDAP and therefore shouldn't be generating errors. This causes fall positives for customers using the script to check replication data sync. Additional info: