8000 docs: document NFSv3 nolock as an unsupported lock deployment (#334) by adityamukho · Pull Request #335 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

docs: document NFSv3 nolock as an unsupported lock deployment (#334) - #335

Merged
adityamukho merged 2 commits into
mainfrom
nfs-nolock-docs
Aug 23, 2026
Merged

adityamukho merged 2 commits into
mainfrom
nfs-nolock-docs

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Summary

  • Closes the loop on Nightly NFS lock-suite failure #334: the nightly NFS suite caught a mount (NFSv3 -o nolock) where the kernel serves flock/OFD locks locally instead of over NLM, so try_lock() returns Ok(()) 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 in classify().
  • tests/nfs_lock_test.rs::test_allow_unlocked_gates_the_unsupported_nfsv3_mount asserted the default open fails closed on nolock, which is false — replaced with two tests that document the actual behavior (default open succeeds on nolock; open-unlocked succeeds too, as it always does).
  • Added a doc-comment on LockOutcome::Unsupported in src/storage/backend/file.rs, an operator-facing callout in docs/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 failures
  • cargo clippy --lib, cargo fmt --check — clean
  • pre-push hooks (fmt/clippy/full test suite) passed on push

🤖 Generated with Claude Code

https://claude.ai/code/session_01YMWSutMLJJ7Y5b8hs9ZaCU

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
codecov Bot commented Aug 23, 2026
Copy link
Copy Markdown

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
@adityamukho
adityamukho merged commit 47f3e54 into main Aug 23, 2026
17 checks passed
@adityamukho
adityamukho deleted the nfs-nolock-docs branch August 23, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0