Repository navigation
CH-298 fix nfs server regression after a failed volume - #884
Merged
filippomc merged 2 commits intoOct 22, 2026
Merged
Conversation
| if err != nil { | ||
| return "", fmt.Errorf("open backing file %s: %w", backingFile, err) | ||
| } | ||
| defer bf.Close() |
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.
Closes CH-298
Implemented solution
Create:discardPartial, which never deletes data it can't vouch for: it refuses a mounted volume that isn't empty, and moves a file at the mountpoint aside to<mp>.discarded-<ts>./var/lib/nfs/etab, even ifexportfs -rexits 1 because of another entry. nfs-utils only warns about a bad entry, then still writes etab and flushes the cache.mountOneno longer creates missing mountpoints, and the watchdog skips volumes that don't have one.Delete: unmounts until nothing is mounted (or fails), and keeps a regular file at the mountpoint.loop.Attach: serialized within the process, and retries on EBUSY/ENXIO.volumeExistsalso checks for<mp>.quotabefore skipping a delete.How to test this PR
nfsvol/internal/mount/lifecycle_test.go,loop/loop_test.goandprovisioner_test.go. Each fix was checked by undoing it: all 10 are caught by at least one test.test/failover-test.sh:nfsvol delete..quotaleft after PVC delete; image archived when the storage class says so.Sanity checks:
Breaking changes (select one):
breaking-changeand the migration procedure is well described abovePossible deployment updates issues (select one):
alert:deploymentTest coverage (select one):
Documentation (select one):
Nice to have (if relevant):