Red Hat Bugzilla – Bug 1559945
adjustment of csn_generator can fail so next generated csn can be equal to the most recent one received
Last modified: 2018-10-30 06:14:09 EDT
This bug is created as a clone of upstream ticket: https://pagure.io/389-ds-base/issue/49619 #### Issue Description On consumer side csn_generator ajustment occurs (let CSN = highest known csn) * when a replication session starts * when a csn is generated locally and than csn is <= CSN During adjustment, in the case * there is no remote/local offset (time change) * the current_time on the consumer is identical to CSN Then next locally generated csn will only differ with **seqnum** The **seqnum** of the csn_generator is increased only if CSN.seqnum is larger than the csn_generator one. In case of egality, it remains unchanged. The consequence is that the next locally generated csn will be identical to CSN (except for the RID). So even after csn_generator adjustment, csn_generator may create csn that are not larger than the CSN #### Package Version and Platform All versions #### Steps to reproduce 1. see FREEIPA-921 This is a timing issue, so it is not systematic. Now on the test systems it happens one time out of two. #### Actual results The generated csn can be lower than the highest known csn and urp can order operations in the opposite way. #### Expected results generated csn should strictly be larger than the most recent one received
Fix pushed upstream
Impact of the bug This bug can have a large range of impacts as constantly increasing CSN is a key requirement of replication. Impact are most likely silent, replication resolve the conflict of CSN but in an invalid order. At the end of the day an attribute of an entry can have a different value that it should have. The probability of hitting that bug is quite low (fast replication and replicated update triggering an other update). In IDM, Topology plugin was victim with a noticeable impact because this plugin triggers internal update and invalid result had a noticeable impact. When topology plugin was merging two unidirectional segments into a bidirectionnal segment the invalid result of the segment status can lead to the deletion of one of the replication agreement.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:3127