Repository navigation
docs: document NFSv3 nolock as an unsupported lock deployment (#334) - #335
Merged
Merged
Conversation
The nightly NFS lock suite caught the exact risk flagged as unmitigated in the kernel file-locking design: on an export mounted with -o nolock, Linux's NFS client serves flock/OFD locks from its own local, in-kernel lock table instead of going over NLM to the server, so try_lock() returns Ok(()) and classify() takes the Acquired branch. allow_unlocked is never consulted because the code never learns the mount can't really coordinate locks across hosts. There is no way to detect this from try_lock's result, so this is a documented, permanent limitation rather than a bug to fix in classify(). - tests/nfs_lock_test.rs: replace the false "default open fails closed on nolock" assertion with one that documents the actual behavior (default open succeeds), plus keep the open-unlocked-always-succeeds case as its own test. - src/storage/backend/file.rs: doc-comment on LockOutcome::Unsupported explaining the nolock gap. - docs/ERROR_REFERENCE.md (STG-027) and CHANGELOG.md: operator-facing writeup categorizing nolock NFSv3 exports as unsupported for multi-writer use, alongside mixed-version writers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YMWSutMLJJ7Y5b8hs9ZaCU
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Following up on the previous commit: since NFSv3 `-o nolock` is now a documented-unsupported deployment (#334) rather than something Minigraf detects and gates on, there's nothing for nightly CI to verify by mounting it. Drop the vers=3,nolock mount from the nfs job; the three tests gated on MINIGRAF_NFS_TEST_DIR_V3_NOLOCK now always skip in CI and remain only for local reproduction against a manually mounted nolock export. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YMWSutMLJJ7Y5b8hs9ZaCU
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.
Summary
-o nolock) where the kernel servesflock/OFD locks locally instead of over NLM, sotry_lock()returnsOk(())and Minigraf's lock detection can never tell it apart from a mount where locking genuinely works. There is no way to detect this from the lock call's result, so per discussion on the issue this is documented as an unsupported deployment rather than patched inclassify().tests/nfs_lock_test.rs::test_allow_unlocked_gates_the_unsupported_nfsv3_mountasserted the default open fails closed onnolock, which is false — replaced with two tests that document the actual behavior (default open succeeds onnolock;open-unlockedsucceeds too, as it always does).LockOutcome::Unsupportedinsrc/storage/backend/file.rs, an operator-facing callout indocs/ERROR_REFERENCE.md(STG-027), and a CHANGELOG entry, all cross-referencing Nightly NFS lock-suite failure #334.Test plan
cargo test --test nfs_lock_test— 6/6 pass (mount-dependent assertions verified for logical correctness; actual NFS mount exercise only happens in the nightly CI env)cargo test— full suite, 0 failurescargo clippy --lib,cargo fmt --check— clean🤖 Generated with Claude Code
https://claude.ai/code/session_01YMWSutMLJJ7Y5b8hs9ZaCU