fix(podman): prevent VirtioFS→NFS data loss and boot-order race#137
Merged
Merged
Conversation
Cross-directory renames (incomplete/ → pending-move/) through VirtioFS over a soft NFS mount can silently lose data: the source is unlinked from the VirtioFS cache while the NFS rename fails, leaving files in neither directory. Disable Transmission's incomplete-dir so downloads go directly to pending-move/ (same-directory .part rename only). Also add wait_for_nfs() before starting the Podman VM, closing a boot-order race where the VM could start before the NFS mount was ready (observed 7-second gap on 2026-05-14 reboot). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Two changes: Both changes are consistent between the heredoc path (line 595) and the direct-invocation path (line 807). The No blocking issues found. VERDICT: PASS |
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
incomplete-dirto eliminate cross-directory renames over VirtioFS→NFS (soft mount), which silently lost data for 3 torrents on 2026-05-08/10wait_for_nfs()guard before starting the Podman VM, closing a boot-order race where the VM could start before the NFS mount was ready (observed 7s gap on 2026-05-14 reboot)Root cause
With
incomplete-dir-enabled: true, Transmission renames completed files fromincomplete/→pending-move/(cross-directory). This rename traverses Container → VirtioFS → Host NFS (soft, timeo=10) → NAS. When the soft mount returns EIO, VirtioFS may already have unlinked the source entry from its cache, leaving files in neither directory — data lost.Changes
podman-transmission-setup.sh: replacedTRANSMISSION_INCOMPLETE_DIR=…withTRANSMISSION_INCOMPLETE_DIR_ENABLED=falsein both the heredoc wrapper template and the Section 11 setup-timepodman runwait_for_nfs()function (120s timeout, 5s poll) called with|| exit 1beforeensure_machine()Test plan
incomplete-dir-enabled: Falseconfirmed via Transmission settings.jsonpending-move/directly🤖 Generated with Claude Code