Bug 1539082

Summary: Child entry cenotaphs should not prevent the deletion of the parent
Product: Red Hat Enterprise Linux 7 Reporter: Simon Pichugin <spichugi>
Component: 389-ds-baseAssignee: Ludwig <lkrispen>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.5CC: enewland, lkrispen, nkinder, rmeggins
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.7.5-17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 14:23:50 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 Simon Pichugin 2018-01-26 15:32:53 UTC
Description of problem:
Newly added object cenotaphs are part of the replication conflict feature bz1274430. They are tombstones and should like normal tombstones not prevent the deletion of a parent.

Version-Release number of selected component (if applicable):
389-ds-base-1.3.7.5-13.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create two master topology replication
2. Add an entry with nsContainer object to store future entries
3. Add user1 and user2 entries on master1 and wait for replication to happen
4. Stop replication
5. Rename user1 on master1 to user3
6. Rename user2 on master2 to user3
7. Start replication
8. Remove all user entries
9. Try to remove nsContainer entry

Actual results:
The operation gives 'Operation not allowed on non-leaf'

Expected results:
Container entry should be deleted

Comment 2 Simon Pichugin 2018-01-26 15:40:35 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49551

Comment 6 Simon Pichugin 2018-02-12 19:39:52 UTC
The test suite from https://pagure.io/389-ds-base/pull-request/49558 reveals an issue. Build tested: 389-ds-base-1.3.7.5-17.el7.x86_64

Test case TestTwoMasters::test_add_modrdn PASSes (before the patch it had failed).

In the rest of the test cases, we still have the error about 'Operation not allowed on non-leaf'.

For example, dirsrvtests/tests/suites/replication/conflict_resolve_test.py::TestTwoMasters::test_complex_add_modify_modrdn_delete

After the test case and _test_base_delete:

[root@qeos-61 ds]# ldapsearch -h localhost -p 39001 -D "cn=Directory manager" -w password -b "cn=test_container,dc=example,dc=com" -s subtree "(|(objectclass=*)(objectclass=ldapsubentry))"

# test_container, example.com
dn: cn=test_container,dc=example,dc=com
objectClass: top
objectClass: nscontainer
cn: test_container

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

[root@qeos-61 ds]# ldapdelete  -h localhost -p 39001 -D "cn=Directory manager" -w password "cn=tes
t_container,dc=example,dc=com"
ldap_delete: Operation not allowed on non-leaf (66)

Comment 7 mreynolds 2018-02-13 13:25:43 UTC
Ludwig can you take a look at this?  This build does have your latest fix (on 1.3.7)

Comment 8 Ludwig 2018-02-13 13:38:44 UTC
the testcase which now passes was the one which triggered this bug and used to investigate. I would say the patch now passes QA. 

There is still an issue with numsubordinate count in the more complex scenarios,
it always remains numsubordinates: 1 although it should be 0. But in the test case it oscillates between 1 and 40.

I am investigating this, but I do not think it will be fixed for the next snapshot.
We should not delay the inclusion of the patch I did, the remaining issue can probably go into a z-stream release. with  a different bug ?

Comment 13 errata-xmlrpc 2018-04-10 14:23:50 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