Bug 1516309

Summary: After cleanALLruv, replication is looping on keep alive DEL
Product: Red Hat Enterprise Linux 7 Reporter: German Parente <gparente>
Component: 389-ds-baseAssignee: thierry bordaz <tbordaz>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: amsharma, enewland, mreynolds, nkinder, rmeggins, tbordaz, tmihinto, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.7.5-12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 14:22:34 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 German Parente 2017-11-22 12:49:28 UTC
Description of problem:

this is a copy of 

https://pagure.io/389-ds-base/issue/49463

When cleanAllRuv is launched, it spawn cleanAllRuv on all replicas.
Each replica will clean its changelog and database RUV but in addition will DEL the keep alive entry of the target ReplicaID.
So for the same entry (keep alive) there will be as many DEL as there are replicas

Those DEL are replicated. The DEL will attempt to DEL an entry that is already a tombstone.
Locally this update is considered as a NOOP.

The problem is that the NOOP does not update the RUV. So the supplier will loop sending the DEL.
Package Version and Platform

This problem is a side effect of https://fedorahosted.org/389/ticket/48278
It exists since 1.3.6
Steps to reproduce

Run the attached test case
Actual results

DEL of the cleaned RID can be replicated several times
Expected results

Either the DEL should not be replicated, or it should update the RUV

Version-Release number of selected component (if applicable):

Comment 2 thierry bordaz 2018-01-12 14:26:46 UTC
Fix is pushed upstream -> POST

Comment 3 mreynolds 2018-01-12 16:37:07 UTC
This is actually not in POST

Comment 4 thierry bordaz 2018-01-12 16:48:17 UTC
Sorry for the mistake, now the patch is in 1.3.7 -> POST

Comment 6 Amita Sharma 2018-01-31 08:52:23 UTC
[root@qeos-18 tickets]# pytest -s ticket49463.py 
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.5, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
metadata: {'Python': '2.7.5', 'Platform': 'Linux-3.10.0-837.el7.x86_64-x86_64-with-redhat-7.5-Maipo', 'Packages': {'py': '1.5.2', 'pytest': '3.4.0', 'pluggy': '0.6.0'}, 'Plugins': {'html': '1.16.1', 'metadata': '1.5.1'}}
389-ds-base: 1.3.7.5-14.el7
nss: 3.34.0-4.el7
nspr: 4.17.0-1.el7
openldap: 2.4.44-12.el7
svrcore: 4.1.3-2.el7

rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests/tests/tickets, inifile:
plugins: metadata-1.5.1, html-1.16.1
collected 1 item                                                                                                                                     

CRITICAL:dirsrvtests.tests.tickets.ticket49463:Adding user (cn=user11,ou=people,dc=example,dc=com): 
CRITICAL:dirsrvtests.tests.tickets.ticket49463:Adding user (cn=user21,ou=people,dc=example,dc=com): 
CRITICAL:dirsrvtests.tests.tickets.ticket49463:Adding user (cn=user31,ou=people,dc=example,dc=com): 
CRITICAL:dirsrvtests.tests.tickets.ticket49463:Adding user (cn=user41,ou=people,dc=example,dc=com): 
INFO:lib389:Agreement (cn=2,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config) was successfully removed
INFO:lib389:Agreement (cn=2,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config) was successfully removed
INFO:lib389:Agreement (cn=2,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config) was successfully removed
INFO:lib389:cleanAllRUV task (task-01312018_034832) completed successfully
CRITICAL:dirsrvtests.tests.tickets.ticket49463:Adding user (cn=user12,ou=people,dc=example,dc=com): 
CRITICAL:dirsrvtests.tests.tickets.ticket49463:Adding user (cn=user22,ou=people,dc=example,dc=com): 
INFO:lib389:Agreement (cn=4,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config) was successfully removed
INFO:lib389:Agreement (cn=4,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config) was successfully removed
INFO:lib389:cleanAllRUV task (task-01312018_034945) completed successfully
INFO:dirsrvtests.tests.tickets.ticket49463:M1: nsds5ReplicaCleanRUV=4:5a7182cd000300040000:no:1
INFO:dirsrvtests.tests.tickets.ticket49463:M2: nsds5ReplicaCleanRUV=4:5a7182cd000300040000:no:0
.Instance slapd-master1 removed.
Instance slapd-master3 removed.
Instance slapd-master2 removed.
Instance slapd-master4 removed.

============================================================= 1 passed in 263.08 seconds =============================================================

Hence marking as VERIFIED.

Comment 9 errata-xmlrpc 2018-04-10 14:22:34 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-2018:0811