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)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Mar 2019 02:12:19 +0000 (02:12 +0000)
commit5357f591accffbf8c62335c308b985811b66f0b5
tree3e8261a81ffa1539dab64dcffbddaefff5d43938
parent8ba6f1c895ee9b6b592578f21e7f79ed36236bef
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>
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