Bug 14022 - v4.8: It's still possible for samba to drop cross-partition links during replication
Summary: v4.8: It's still possible for samba to drop cross-partition links during repl...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.8.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Tim Beale
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-01 01:27 UTC by Tim Beale
Modified: 2019-07-03 05:42 UTC (History)
1 user (show)

See Also:


Attachments
Backport for v4.10 (9.17 KB, patch)
2019-07-02 21:45 UTC, Tim Beale
timbeale: review? (abartlet)
Details
Backport for v4.9 (9.24 KB, patch)
2019-07-03 05:42 UTC, Tim Beale
timbeale: review? (abartlet)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Beale 2019-07-01 01:27:18 UTC
The GET_TGT logic in v4.8 (and later) should help to avoid cross-partition links being silently dropped. However, there is still a case where the cross-partition link can be dropped.

Cross-partition links present a problem because the partition containing the link-source can be replicated before the partition containing the link-target. Historically, Samba has silently dropped these links. However, v4.8 improved things so that a hanging forward link was added.

The problem here is that if the GET_TGT flag has already been set, the hanging forward-link doesn't get added and so the link gets silently dropped.

I noticed the logic problem in the replmd_allow_missing_target() code.

If I hack the samba code to always use the GET_TGT flag, the the getncchanges test suite detects this problem.

This problem would be unlikely to affect ongoing/periodic replication, but it's possible you could hit this case when joining a new DC. 

An example of a cross-partition link is the serverReference link that gets created for DCs.
Comment 1 Tim Beale 2019-07-02 21:45:03 UTC
Created attachment 15280 [details]
Backport for v4.10
Comment 2 Tim Beale 2019-07-03 05:42:03 UTC
Created attachment 15281 [details]
Backport for v4.9