RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1708094 - ds-replcheck reports data inconsistency if attribute has matching entries but in different order
Summary: ds-replcheck reports data inconsistency if attribute has matching entries but...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 7.7
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-09 07:05 UTC by rmitra
Modified: 2020-09-13 22:20 UTC (History)
8 users (show)

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.
Clone Of:
Environment:
Last Closed: 2019-08-06 12:59:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 3422 0 None closed ds-replcheck reports data inconsistency if attribute has matching entries but in different order 2021-02-02 15:00:00 UTC
Red Hat Product Errata RHBA-2019:2152 0 None None None 2019-08-06 12:59:29 UTC

Description rmitra 2019-05-09 07:05:08 UTC
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:

Comment 2 mreynolds 2019-05-10 16:05:41 UTC
Can we could get two LDIF files (master and replica) so I can reproduce it?

Comment 3 mreynolds 2019-05-10 20:05:26 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/50363

Comment 4 mreynolds 2019-05-10 21:06:39 UTC
I was able to reproduce the problem, and I have a fix out for review...

Comment 7 Akshay Adhikari 2019-06-17 12:50:26 UTC
[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.

Comment 9 errata-xmlrpc 2019-08-06 12:59:17 UTC
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


Note You need to log in before you can comment on or make changes to this bug.