blackbox/dbcheck-links.sh: reproduce lost deleted object problem
authorStefan Metzmacher <metze@samba.org>
Mon, 11 Mar 2019 13:52:57 +0000 (14:52 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 28 Mar 2019 12:19:12 +0000 (12:19 +0000)
commitf91050ee547ff645933da1a3ceeecf3d1052045e
tree819299efeaa01415dcee92f280144315d3d86808
parent833d543717ca7f59270a384397dd5a15d3ab79ae
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