Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1887415

Summary: Sync repl - if a serie of updates target the same entry then the cookie get wrong changenumber
Product: Red Hat Enterprise Linux 8 Reporter: thierry bordaz <tbordaz>
Component: 389-ds-baseAssignee: thierry bordaz <tbordaz>
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.3CC: bsmejkal, jachapma, mreynolds, nhosoi, nkinder, pasik, rmeggins, sgouvern, spichugi, tbordaz, vashirov
Target Milestone: rcKeywords: TestCaseProvided, Triaged
Target Release: 8.4Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard: sync-to-jira
Fixed In Version: 389-ds-1.4-8040020201112160023.866effaa Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:45:26 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:

Description thierry bordaz 2020-10-12 12:04:47 UTC
Description of problem:
If several updates target the same returned entry, then cookie keeps the changenumber of the first update.



Version-Release number of selected component (if applicable):
regression introduced pagure ticket 51190

How reproducible:
create a user with mep plugin creating a managed group

Steps to Reproduce:
Reproduced with testcase attached to the PR

Actual results:
The state control, along each sent entries, contains a cookie with the same changenumber 

Expected results:
The changenumber of the cookie should change at each notified updates

Additional info:

Comment 2 thierry bordaz 2020-10-15 11:36:57 UTC
Fix pushed upstream => POST

Comment 3 Viktor Ashirov 2020-11-10 13:47:48 UTC
Build tested: 389-ds-base-1.4.3.14-1.module+el8.4.0+8664+a8ec484f.x86_64.rpm

Test dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep fails:

        # checking that the cookie are in increasing and in an acceptable range (0..1000)
        assert len(cookies) > 0
        prev = 0
        for cookie in cookies:
            log.info('Check cookie %s' % cookie)
    
            assert int(cookie) > 0
            assert int(cookie) < 1000
>           assert int(cookie) > prev
E           AssertionError: assert 6 > 6
E            +  where 6 = int('6')

dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py:231: AssertionError

Comment 4 thierry bordaz 2020-11-12 14:24:28 UTC
The failure is due to a missing backport of #4329 in 1.4.3
After the backport in 1.4.3 branch of all sync_repl related fixes

5ea53ebd7 Issue 4391 - DSE config modify does not call be_postop (#4394)
d2dcf85c3 Issue 4329 - Sync repl - if a serie of updates target the same entry then the cookie get wrong changenumber (#4356)
90b2b037b Issue 4363 - Sync repl: per thread structure was incorrectly initialized (#4395)
353358978 Ticket 51190 - SyncRepl plugin provides a wrong cookie

Then the test 389-ds-base/dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep PASSED
Moving back to POST

Comment 13 bsmejkal 2020-12-08 07:00:17 UTC
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.6.8, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-257.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '6.1.2', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '3.1.0', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.16-4.module+el8.4.0+8992+caadce03
nss: 3.53.1-11.el8_2
nspr: 4.25.0-2.el8_2
openldap: 2.4.46-16.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.11.0, html-3.1.0, libfaketime-0.1.2
collected 1 item                                                                                                                                                                             

dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep PASSED                                                                                                      [100%]

===================================================================================== 1 passed in 38.18s =====================================================================================


Marking as Verified:Tested.

Comment 14 sgouvern 2020-12-14 14:54:39 UTC
Missed the ITM 6 milestone -> moving to ITM 7

Comment 17 sgouvern 2020-12-21 13:49:58 UTC
With build 389-ds-base-1.4.3.16-6.module+el8.4.0+9207+729bbaca.x86_64

# PYTHONPATH=src/lib389/ py.test -s -v  dirsrvtests/tests/suites/syncrepl_plugin/basic_test.py::test_sync_repl_mep
re-exec with libfaketime dependencies
================================================== test session starts ==================================================
platform linux -- Python 3.6.8, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-260.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '6.2.1', 'py': '1.10.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '3.1.1', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.16-6.module+el8.4.0+9207+729bbaca
nss: 3.53.1-13.el8_3
nspr: 4.25.0-2.el8_2
openldap: 2.4.46-16.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.11.0, html-3.1.1, libfaketime-0.1.2
collected 1 item                                                                                                        

INFO:dirsrvtests.tests.suites.syncrepl_plugin.basic_test:test_sync_repl_map: PASS

PASSEDInstance slapd-standalone1 removed.


================================================ 1 passed in 35.57s =================================================

marking VERIFIED

Comment 19 errata-xmlrpc 2021-05-18 15:45:26 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 (389-ds:1.4 bug fix and enhancement update), 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-2021:1835