Bug 830343 - managed entry sometimes doesn't delete the managed entry
managed entry sometimes doesn't delete the managed entry
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
6.4
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rich Megginson
Sankar Ramalingam
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-08 17:37 EDT by Nathan Kinder
Modified: 2013-02-21 03:17 EST (History)
2 users (show)

See Also:
Fixed In Version: 389-ds-base-1.2.11.12-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Using the Managed Entry feature in conjunction with other plugins such as DNA, Member Of, and Auto Member, then performing an delete operation on an entry that is being managed by the Managed Entry plugin. Consequence: The "manager" managed entry is deleted, but the "managed" entry is not. Fix: Improve deadlock retry handling so that both the "manager" and the "managed" entry are deleted by the same database operation. Result: Deleting a managed entry will delete both the "manager" and the "managed" entry.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:17:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nathan Kinder 2012-06-08 17:37:08 EDT
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/387

I don't believe this is related to ticket #358

TET managedentry tests pass - IPA server and replica install work

But the http://freeipa.org/page/Testing tests/test_xmlrpc/test_user_plugin.py fails sometimes.  The test may pass, but it will leave the group entry behind.  During test cleanup, it is supposed to remove the user entries, and the group entry should be removed by mep.  But if this fails, the group entry cannot be deleted directly without first removing the mepManagedEntry objectclass.  Subsequent tests runs will fail due to the presence of this group entry.

I've been able to reproduce this very seldom.  Martin saw this:
 find_entry_internal_uniqueid retry count exceeded; uniqueid = (%s)
which suggests either a mishandled deadlock or a cache problem.

At the very least we need some error reporting from mep_del_post_op - there is currently no error checking or logging for the delete.
Comment 1 Jenny Galipeau 2012-06-19 13:19:53 EDT
please add steps to reproduce/verify this bug
Comment 2 Rich Megginson 2012-07-07 10:31:24 EDT
Covered by the new test multi_plugin - the stress test
testcases/DS/6.0/multi_plugin
------------------------------------------------------------------------
r6706 | rmeggins@REDHAT.COM | 2012-07-07 08:24:23 -0600 (Sat, 07 Jul 2012) | 16 lines

Add multi_plugin test suite
This test enables and configures multiple plugins in the style
of ipa.  The stress version of this test will enable the 
TXN_TESTING in the server which will exercise the txn deadlock
and retry code paths in the server.
Tickets covered by this test:
Ticket #345 - db deadlock return should not log error
Ticket #387 - managed entry sometimes doesn't delete the managed entry
Ticket #360 - ldapmodify returns Operations error
Ticket #335 - transaction retries need to be cache aware
Bugs covered by this test:
830336 db deadlock return should not log error
830343 managed entry sometimes doesn't delete the managed entry
833218 ldapmodify returns Operations error
833202 transaction retries need to be cache aware
Comment 4 Jenny Galipeau 2012-11-19 15:05:49 EST
Verified

[2012-11-12 15:49:35] [multi_plugin][mp_01]
dn:
vendorversion: 389-Directory/1.2.11.15 B2012.317.946
[2012-11-12 15:49:35] [multi_plugin][mp_01] finished
TestCase [mp_01] result-> [PASS]
[2012-11-12 15:49:35] [multi_plugin][mp_add] - add 5 users
[2012-11-12 15:49:36] [multi_plugin][mp_add] no txn retries - increase TXN_TEST_HOLD_MSEC and/or decrease TXN_TEST_LOOP_MSEC
[2012-11-12 15:49:39] [multi_plugin][mp_add] group members in cn=mpusers,ou=Groups,dc=example,dc=com differ from current dn list - probable memberof failure due to busy/txn retries - allowing
1a2,5
> uid=testuser1,ou=People,dc=example,dc=com
> uid=testuser1,ou=People,dc=example,dc=com
> uid=testuser1,ou=People,dc=example,dc=com
> uid=testuser2,ou=People,dc=example,dc=com
2a7,10
> uid=testuser2,ou=People,dc=example,dc=com
> uid=testuser2,ou=People,dc=example,dc=com
> uid=testuser3,ou=People,dc=example,dc=com
> uid=testuser3,ou=People,dc=example,dc=com
3a12,15
> uid=testuser3,ou=People,dc=example,dc=com
> uid=testuser4,ou=People,dc=example,dc=com
> uid=testuser4,ou=People,dc=example,dc=com
> uid=testuser4,ou=People,dc=example,dc=com
5a18,20
> uid=testuser5,ou=People,dc=example,dc=com
> uid=testuser5,ou=People,dc=example,dc=com
> uid=testuser5,ou=People,dc=example,dc=com
[2012-11-12 15:49:39] [multi_plugin][mp_add] finished
TestCase [mp_add] result-> [PASS]
[2012-11-12 15:49:39] [multi_plugin][mp_mod] - modify users
[2012-11-12 15:49:39] [multi_plugin][mp_mod] no txn retries - increase TXN_TEST_HOLD_MSEC and/or decrease TXN_TEST_LOOP_MSEC
[2012-11-12 15:49:41] [multi_plugin][mp_mod] finished
TestCase [mp_mod] result-> [PASS]
[2012-11-12 15:49:41] [multi_plugin][mp_rename] - rename users
[2012-11-12 15:49:41] [multi_plugin][mp_rename] no txn retries - increase TXN_TEST_HOLD_MSEC and/or decrease TXN_TEST_LOOP_MSEC
[2012-11-12 15:49:43] [multi_plugin][mp_rename] finished
TestCase [mp_rename] result-> [PASS]
[2012-11-12 15:49:43] [multi_plugin][mp_subtreerename] - rename subtree
[2012-11-12 15:49:45] [multi_plugin][mp_subtreerename] finished
TestCase [mp_subtreerename] result-> [PASS]
[2012-11-12 15:49:45] [multi_plugin][mp_delete] delete users in /home/sramling/RHEL64/testcases/DS/6.0/tet_tmp_dir//multi_plugin/dnlist
[2012-11-12 15:49:46] [multi_plugin][mp_delete] no txn retries - increase TXN_TEST_HOLD_MSEC and/or decrease TXN_TEST_LOOP_MSEC
[2012-11-12 15:49:48] [multi_plugin][mp_delete] finished
TestCase [mp_delete] result-> [PASS]

version 

389-ds-base-1.2.11.15-3.el6
Comment 6 errata-xmlrpc 2013-02-21 03:17:39 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0503.html

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