Repository navigation
fix(satellite): keep a resync source's reported disk state - #334
Open
Andrei Kvapil (kvaps) wants to merge 2 commits into
Open
Andrei Kvapil (kvaps) wants to merge 2 commits into
Andrei Kvapil (kvaps) wants to merge 2 commits into
Conversation
DRBD resyncs from an Outdated source to an Inconsistent peer. The observer took every `replication:SyncSource` peer-device frame for proof of an UpToDate local disk and wrote UpToDate over the Outdated the device frame had reported, while status.drbdState kept Outdated. After a volume lost its last UpToDate copy, two of its Outdated replicas went on showing UpToDate in `r l` and stayed out of `r l --faulty` until their satellites restarted. The SyncSource frame now fills in UpToDate only for a volume whose disk state no frame reported yet, the blank diskState the frame was added for. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Andrei Kvapil (kvaps)
requested review from
IvanHunters and
Aleksei Sviridkin (lexfrei)
as code owners
November 25, 2026 18:34
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Keeps mergeVolumeInto under the cyclomatic budget after the SyncSource guess learned to yield to a reported disk state. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Andrei Kvapil (kvaps)
force-pushed
the
fix/observer-syncsource-disk-state
branch
from
November 25, 2026 18:44
c2a1ee3 to
312bab9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a volume lost its last UpToDate copy,
r lkept showing two of its Outdated replicas as UpToDate andr l --faultylisted only the third, for as long as their satellites ran. On those replicasstatus.drbdStatealready readOutdatedwhilestatus.volumes[0].diskStatereadUpToDate; restarting a satellite corrected its row at once.DRBD resyncs from an Outdated source to an Inconsistent peer, and both replicas did exactly that after going
UpToDate -> Outdated. The observer took everyreplication:SyncSourcepeer-device frame for proof of an UpToDate local disk (BUG-045) and wrote UpToDate over the Outdated the device frame had reported.drbdStatecomes from device frames only, so the two fields of the same Resource disagreed. A restart replays the device frames and nothing overwrites them before the next resync.The SyncSource frame now fills in UpToDate only for a volume whose disk state no frame has reported yet. That is the blank
diskStatethe frame was added for, so the last-copy delete guard keeps reading a state for a Secondary SyncSource.Test:
TestObserverSyncSourceKeepsAnOutdatedSourcefeeds an Outdated device frame followed by a SyncSource peer-device frame and checks the status keeps Outdated with the resync count. It fails without the change; the BUG-045 tests still pass.