mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 12:52:04 +00:00
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/LXC2Docker#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/LXC2Docker/pull/59
Author: @JBailes
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @JBailes
Base:
main← Head:fix/wolf-pulse-runtimedir-hostbacked📝 Commits (1)
4976822fix(mounts): host-back XDG_RUNTIME_DIR; stop tmpfs tripping disk guardrail📊 Changes
4 files changed (+161 additions, -1 deletions)
View changed files
📝
internal/api/containers.go(+65 -0)📝
internal/api/sibling_mount_test.go(+54 -0)📝
internal/lxc/diskspace.go(+20 -1)📝
internal/lxc/diskspace_test.go(+22 -0)📄 Description
Follow-up to #54 / #55 for the remaining Wolf PulseAudio failures on Proxmox reported in #53. Two distinct issues blocked the
wolfpulseaudiosibling from starting.1. Sibling runtime-dir bind failed with
EINVALWolf passes its own
XDG_RUNTIME_DIR(/run/user/wolf) as a bind source to its PulseAudio/app siblings so they can reach its audio socket. Wolf creates that directory at runtime inside its own mount namespace, so nothing on the host backs it. After #55,translateSiblingBindSourcecould only resolve it through the owner's live namespace as/proc/<pid>/root/run/user/wolf:Bind-mounting a path that lives in another container's mount namespace is refused by the kernel with
EINVAL. (This is why the symptom changed from the earlierENOENT: once Pass 2 resolved the path via/proc/<pid>/root,os.Statpassed butmount(2)will always reject it.) Reaching into a live namespace is also fragile: the PID is captured at create time and the tmpfs only exists while the owner runs.Fix: host-back the runtime dir. When a container declares an absolute
XDG_RUNTIME_DIRthat no user mount already covers, create a real host directory (<state-dir>/runtime/<id>) and bind it there. Wolf's/run/user/wolfthen becomes an ordinary host bind, so when the PulseAudio sibling is created sharing that path,translateViaBindDest(the stable host-path case) maps it to the same host directory. Both containers bind the same real directory, exactly as sharing through a Docker volume would, and it survives the owner restarting. Guarded so explicit user binds are never overridden.2. Disk-pressure guardrail false positive
The create pre-flight added in #57 statfs'd the shared runtime dir, a small tmpfs, and refused the create:
(The reporter worked around it with
--storage-opt size=8G.) tmpfs free space reflects available RAM, not the host filesystem the guardrail protects: a container filling a tmpfs hitsENOSPCon the tmpfs itself, it cannot eat the host disk. Fix: skip tmpfs (and ramfs) bind sources in both the create pre-flight and the background watcher.Tests
TestEnsureRuntimeDirMount— host-backing produces the bind, creates the dir, lets a sibling resolve to the host path, and never overrides a user mount or fires on a missing/relative value.TestCheckCreateDiskPressureSkipsTmpfs— a tmpfs bind source (/dev/shm) does not trip the guardrail even with an impossibly high threshold.go build ./...,go vet, fullgo test ./..., andgofmtall clean.Validation caveat
I could not reproduce the live Wolf-on-Proxmox audio path here, so this needs validation on the reporter's box. Two things to watch:
/runat runtime, it could shadow the host-backed/run/user/wolfbind.0777so both the owner (root) and the app-uid siblings can create their sockets; PulseAudio's own runtime-dir permission expectations on/tmp/pulsemay need a follow-up.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.