Repository navigation
engine: resolve a missing live mount path without an error; live add timing - #401
Merged
Merged
Conversation
Every live mount checks its target before mkdir, so realpath failed on the not-yet-created path and logged a warning per attach (11 per hardware round). realpath -m resolves missing components lexically and still follows existing symlinks, so the occupied-path check behind a symlink is unchanged.
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.
Two follow-ups from the #398 hardware round.
1. No warning on every live mount.
MountLiveVolumechecks the target beforemkdir, sorealpathfailed on the not-yet-created path and logged aresolve volume mountwarning per attach (11 per round on main).realpath -mresolves missing components lexically and still follows existing symlinks, so the check for an occupied path behind a symlink is unchanged (TestLiveMountRefusesAnOccupiedPathBehindASymlink,TestLiveAttachRejectsForeignMountspass). The guest call itself stays: skipping it when the device is not mounted lets a live mount land on another device behind a symlink, which those two tests catch.2. Live volume add timing (test). Instrumented build (not committed) on cocoon-test2, cocoon v0.7.4, rt:24.04, 15 runs each, p50:
cocoon vm disk attachThe live path adds about 14 ms over the claim-time mount (the mountinfo check that makes a retried PUT idempotent). Read-only and writable live adds cost the same. Device appearance (about 70 ms after the attach returns) and
mkdir+mount(about 70 ms) dominate on both paths, and that is where any further work belongs; it is the same area as #400. Zeroresolve volume mountwarnings with this change.Gates: golangci-lint
0 issues.(sandboxd, linux and darwin), fmt clean,go test -race ./engine/ ./pool/.