engine: wait for the device node, not just the sysfs serial - #79
Merged
Conversation
The kernel publishes /sys/block before devtmpfs creates the node, so a serial match could hand mount a path that does not exist yet — measured at 3.5% of four-volume claims on bare metal.
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.
Fixes #78.
The volume bring-up resolved the guest device by matching
/sys/block/<dev>/serialand returned/dev/<dev>immediately — but thekernel publishes the sysfs entry before devtmpfs creates the node, so under
load the guest
mountran against a path that did not exist yet("not a valid block device", exit 32). Measured on bare metal in the
PR #77 round: 5/141 four-volume claims (3.5%), zero single-volume; present
on main, amplified by concurrent bring-up.
findVolumeDevicenow stats the device node over the existing silkdfs_statverb after the serial matches; a NotFound keeps polling under thesame probe budget and interval, any other error fails immediately — no new
wire surface, no new timeouts, no mount-retry semantics. The
wire-NotFound check the serial read already used is extracted into a shared
helper.
Tests: delayed-then-present node succeeds; never-appearing node times out
with the existing error shape; a non-NotFound stat error fails immediately.
Gates: build, engine race suite, dual-GOOS golangci-lint 0 issues, gofmt,
asl dual-GOOS clean. Soak acceptance per the issue (≥100 four-volume claims
zero spurious failures) rides the next hardware round.