Repository navigation
fix(satellite): read a GI through any peer the kernel still has - #335
Open
Andrei Kvapil (kvaps) wants to merge 1 commit into
Open
Andrei Kvapil (kvaps) wants to merge 1 commit into
Andrei Kvapil (kvaps) wants to merge 1 commit into
Conversation
Deleting a replica drops its peer from the kernel before the observer hears of it. The GI read that followed asked the kernel through the lowest peer the observer held, which was the one just dropped, and on that failure fell back to `drbdmeta --force ... get-gi` against the attached backing device of the in-use Primary, once per delete. The kernel owns the metadata of an attached device and what drbdmeta finds on disk can trail it, and --force skips the check that would have refused the read. Ask the kernel through every peer the observer holds. A replica with peers whose reads all failed publishes no GI this time instead of reading the disk; only a replica with no peer, which no drbdsetup get-gi can name, is still read from its backing device. 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 59 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. |
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.
Each time a replica of an in-use volume was deleted, the node of its Primary ran
drbdmeta --force - v09 <backing device> internal get-giagainst its own attached backing device.The sequence is
drbdsetup del-peer <rd> 1, thendrbdsetup get-gi <rd> 1 0(twice), then thedrbdmetaread. The observer asked the kernel for the GI through the lowest peer node-id it held, which was the peer the kernel had just dropped, and on that failure fell back to the backing device. The kernel owns the metadata of an attached device, what drbdmeta reads on disk can trail it, and--forceskips the check that would refuse the read.The observer now asks the kernel through every peer it holds, lowest first. A replica with peers whose reads all fail publishes no GI on that pass instead of reading the disk, which the seed gates already treat as unknown. A replica with no peer at all is still read from its backing device, since no
drbdsetup get-gican name its volume.Tests:
TestObserverReadsTheGIThroughAPeerTheKernelStillHasreplays the delete (the dropped peer fails, the remaining one answers, and with only the dropped peer nothing is read from disk); it fails without the change. The envtest that pinned the disk fallback after a failed kernel read now expects no disk read and no GI.