Bug 12115 - Endless loop on drsuapi pull replication after schema changes
Summary: Endless loop on drsuapi pull replication after schema changes
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.5.0rc1
Hardware: All All
: P5 regression (vote)
Target Milestone: 4.5
Assignee: Stefan Metzmacher
QA Contact: Samba QA Contact
Depends on:
Blocks: 12108 12114 12128
  Show dependency treegraph
Reported: 2016-08-05 08:18 UTC by Stefan Metzmacher
Modified: 2016-08-17 14:34 UTC (History)
5 users (show)

See Also:

Patches for v4-5-test (bugs #12108, #12114, #12115, #12128), based on the patches on bug #12108 (78.92 KB, patch)
2016-08-11 02:57 UTC, Stefan Metzmacher
jra: review+
metze: review? (abartlet)
metze: review? (garming)
slow: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2016-08-05 08:18:01 UTC
We now do a retry when we notice a schema mismatch while doing a pull

However our checks are to strict, we expect the schema
to be completely in sync before we replicate with a partner.

If we're for example the schema master and our partner didn't
replicate from us yet, he has an older schema revision.

This results in an endless loop until the partner is in sync again.
Comment 1 Stefan Metzmacher 2016-08-11 02:57:20 UTC
Created attachment 12361 [details]
Patches for v4-5-test (bugs #12108, #12114, #12115, #12128), based on the patches on bug #12108
Comment 2 Ralph Böhme 2016-08-11 04:24:41 UTC
Comment on attachment 12361 [details]
Patches for v4-5-test (bugs #12108, #12114, #12115, #12128), based on the patches on bug #12108

Something looks fishy:

[slow@kazak v45]$ git fo
remote: Counting objects: 746, done.
remote: Compressing objects: 100% (321/321), done.
remote: Total 746 (delta 663), reused 473 (delta 422)
Receiving objects: 100% (746/746), 99.71 KiB | 0 bytes/s, done.
Resolving deltas: 100% (663/663), completed with 235 local objects.
From /home/slow/git/samba/origin
   de4eaf9..3e25b21  v4-5-test  -> origin/v4-5-test
   25df582..c064357  master     -> origin/master
   358c3a0..68d13b1  v4-3-test  -> origin/v4-3-test
   f557672..8620c56  v4-4-test  -> origin/v4-4-test
   955dec2..30d823e  v4-5-stable -> origin/v4-5-stable
 * [new tag]         samba-4.5.0rc2 -> samba-4.5.0rc2
[slow@kazak v45]$ git rbi origin/v4-5-test
Successfully rebased and updated refs/heads/v4-5-test.
[slow@kazak v45]$ git am attachment.cgi\?id\=12361
Applying: s4: repl: Ensure all error paths in dreplsrv_op_pull_source_get_changes_trigger() are protected with tevent returns.
Applying: s4:dsdb/schema: don't change schema->schema_info on originating schema changes.
Applying: s4:dsdb/repl: avoid recursion after fetching schema changes.
Applying: s4:dsdb/schema: store struct dsdb_schema_info instead of a hexstring
Applying: s4:dsdb/schema: don't treat an older remote schema as SCHEMA_MISMATCH
Applying: s4:dsdb/repl: Improve memory handling in replicated schema code
Applying: s4:dsdb/schema: Remove unused old schema from memory
Applying: s4:dsdb/schema: make dsdb_schema_pfm_add_entry() public and more useful
Applying: s4:dsdb/repl: make sure the working_schema prefix map is populated with the remote prefix map
Applying: s4:dsdb/objectclass_attrs: call dsdb_attribute_from_ldb() without a prefixmap
Applying: s4:dsdb/schema: avoid an implicit prefix map creation in lookup functions
Applying: s4:dsdb/schema: don't update the in memory schema->prefixmap without reloading the schema!
Applying: s4:dsdb/schema: split out a dsdb_attribute_drsuapi_remote_to_local() function
Applying: s4:dsdb/schema: move messages for unknown attids to higher debug levels during resolving
Applying: s4:dsdb/repl: set working_schema->resolving_in_progress during schema creation
Applying: s4:dsdb/repl: let dsdb_replicated_objects_convert() change remote to local attid for linked attributes
Applying: s4:dsdb/repl_meta_data: Add more info on which DN we failed to find an attid on
Applying: selftest: Move repl_schema test to a distinct OID prefix
Applying: Revert "s4: tests: Skip drs tests."
error: patch failed: selftest/skip:138
error: selftest/skip: patch does not apply
Patch failed at 0019 Revert "s4: tests: Skip drs tests."
Comment 3 Stefan Metzmacher 2016-08-11 05:11:47 UTC
Pushed to autobuild-v4-5-test.
Comment 4 Stefan Metzmacher 2016-08-17 14:34:27 UTC
Pushed to v4-5-test