blackbox/dbcheck-links.sh: reproduce lost deleted object problem
commit4fc1780408803ca77b4c5544b7e0503a7f4aba6d
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Mar 2019 13:52:57 +0000 (11 14:52 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 2 Apr 2019 09:10:51 +0000 (2 09:10 +0000)
tree58b321b7ce2f45e658b8e0c53369c20e53f6eb45
parent8d1241dac6bdfec953f3778ff006c85add85bd2b
blackbox/dbcheck-links.sh: reproduce lost deleted object problem

When a parent object is removed during the tombstone garbage collection
before a child object and samba-tool dbcheck runs at the same time, the
following can happen:

- If the object child had DISALLOW_MOVE_ON_DELETE in systemFlags,
  samba-tool dbcheck moves the object under the LostAndFound[Config]
  object (as an originating update!)
- The lastKnownParent attribute is removed (as an originating update!)

These originating updates cause the object to have an extended time
as tombstone. And these changes are replicated to other DCs,
which very likely already removed the object completely!

This means the destination DC of replication has no chance to handle
the object it gets from the source DC with just 2 attributes (name, lastKnownParent).

The destination logs something like:

  No objectClass found in replPropertyMetaData

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 5357f591accffbf8c62335c308b985811b66f0b5)
selftest/knownfail.d/dbcheck-list-deleted [new file with mode: 0644]
source4/selftest/provisions/release-4-5-0-pre1/expected-dbcheck-link-output-lost-deleted-user1.txt [new file with mode: 0644]
testprogs/blackbox/dbcheck-links.sh