summaryrefslogtreecommitdiff
path: root/source4/torture/drs
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2017-09-19 11:59:58 +1200
committerAndrew Bartlett <abartlet@samba.org>2017-10-20 04:05:20 +0200
commit70d532a5c79dc386bf55db1d32865044872a6905 (patch)
tree7053fb1d931a8d382694a9bef7680586cc0a6ea9 /source4/torture/drs
parent20c0f3e1e91baac2a359d02ee617c17cbbc32072 (diff)
downloadsamba-70d532a5c79dc386bf55db1d32865044872a6905.tar.gz
replmd: Partial fix for single-valued link conflict
This is the first part of the fix for resolving a single-valued link conflict. When processing the replication data for a linked attribute, if we don't find a match for the link target value, check if the link is a single-valued attribute and it currently has an active link. If so, then use the active link instead. This change means we delete the existing active link (and backlink) before adding the new link. This prevents the failure in the subsequent dsdb_check_single_valued_link() check that was happening previously (because the link would end up with 2 active values). This is only a partial fix. It stops replication from failing completely if we ever hit this situation (which means the test is no longer hitting an assertion when replicating). However, ideally the existing active link should be retained and just marked as deleted (with this change, the existing link is overwritten completely). BUG: https://bugzilla.samba.org/show_bug.cgi?id=13055 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/drs')
-rw-r--r--source4/torture/drs/python/link_conflicts.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/source4/torture/drs/python/link_conflicts.py b/source4/torture/drs/python/link_conflicts.py
index c41d03689d1..036472bb9ea 100644
--- a/source4/torture/drs/python/link_conflicts.py
+++ b/source4/torture/drs/python/link_conflicts.py
@@ -193,11 +193,8 @@ class DrsReplicaLinkConflictTestCase(drs_base.DrsBaseTestCase):
self.ensure_unique_timestamp()
self.add_link_attr(self.ldb_dc2, src_ou, "managedBy", target2_ou)
- # try to sync the 2 DCs (this currently fails)
- try:
- self.sync_DCs(sync_order=sync_order)
- except Exception, e:
- self.fail("Replication could not resolve link conflict: %s" % e)
+ # sync the 2 DCs
+ self.sync_DCs(sync_order=sync_order)
res1 = self.ldb_dc1.search(base="<GUID=%s>" % src_guid,
scope=SCOPE_BASE, attrs=["managedBy"])