Closed
Description
Issue Description
freeipa test case fails because replicationis broken (missing csn in changelog), and error logs shows that changelog get recreated after a reindex task.
Freeipa ipatests.test_integration.test_simple_replication.TestSimpleReplication test fails in freeipa-pr-ci2/freeipa#3326
The replica error logs shows:
[23/Jan/2024:08:16:27.387781400 +0000] - DEBUG - NSMMReplicationPlugin - replay_update - agmt="cn=meTomaster.ipa.test" (master:389): Sending modify operation (dn="cn=master.ipa.test-to-replica0.ipa.test,cn=domain,cn=topology,cn=ipa,cn=etc,dc=ipa,dc=test" csn=65af75da000200030000)
...
[23/Jan/2024:08:16:28.261824676 +0000] - INFO - dbmdb_db2index - userRoot: Indexing attribute: ipaidpconfiglink
...
[23/Jan/2024:08:16:28.572130451 +0000] - INFO - dbmdb_public_dbmdb_import_main - reindex userRoot: Reindexing complete. Processed 554 entries in 1 seconds. (554.00 entries/sec)
...
[23/Jan/2024:08:16:28.579981020 +0000] - DEBUG - NSMMReplicationPlugin - replica_reload_ruv - changelog contains changes that are not in the databae.
[23/Jan/2024:08:16:28.580384608 +0000] - WARN - NSMMReplicationPlugin - replica_reload_ruv - New data for replica dc=ipa,dc=test does not match the data in the changelog.
Recreating the changelog file. This could affect replication with replica's consumers in which case the consumers should be reinitialized.
...
[23/Jan/2024:08:16:29.776478091 +0000] - ERR - agmt="cn=meTomaster.ipa.test" (master:389) - clcache_load_buffer - Can't locate CSN 65af75da000200030000 in the changelog (DB rc=-12797). If replication stops, the consumer may need to be reinitialized.
==> Looks like the RUV was not properly written in the db when the backend got disabled by the reindex task so the changelog get discarded when backend is reenabled after the reindex
Package Version and Platform:
- Platform: Fedora
- Package and version: 389-ds-base-3.0.0
Steps to Reproduce
Steps to reproduce the behavior:
- run freeipa tests.
- See test result: 389ds-fedora/simple_replication fails
- freeipa test_simple_replication
Expected results
- freeipa **389ds-fedora/simple_replication ** should pass
- changelog should never be recreated after a reindex.
Additional context
Add any other context about the problem here.