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#55
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/54
Author: @JBailes
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @JBailes
Base:
main← Head:fix/dev-mount-propagation-leak📝 Commits (1)
db1a4f5fix(mounts): set bind-mount propagation so containers can't break the host📊 Changes
3 files changed (+96 additions, -0 deletions)
View changed files
📝
internal/api/containers.go(+1 -0)📝
internal/lxc/config.go(+36 -0)📝
internal/lxc/config_test.go(+59 -0)📄 Description
Problem
Issue #53 — running Wolf with
-v /dev/:/dev/:rwbroke the Proxmox web console and SSH on the host (Server refused to allocate pty,termproxy ... exit code 1).Root cause is a mount-propagation leak. Bind mounts were emitted as:
with no propagation mode, so each bind inherited the host's propagation — which on a systemd/Proxmox host is shared. When Wolf bind-mounts the whole host
/devand then mounts its owndevptsover/dev/pts, that new mount propagates back through the shared peer group and replaces the host's/dev/ptsand/dev/ptmx. The host can then no longer allocate PTYs, killing the web console and SSH.Docker avoids this by defaulting every bind to
rprivate; we never emitted any mode.Fix
Propagationtolxc.MountSpecand a validatedmountPropagationOpt()helper (defaults torprivate, Docker's default).buildItems(raw LXC) andbuildPVEItems(Proxmox CT) — now append the propagation option, so-v /dev:/devbecomes... none bind,create=dir,rprivate 0 0. A container's own mounts under a bind can no longer leak to the host.BindOptions.Propagationthrough; legacy-vbinds and volumes fall back to the saferprivatedefault.Propagation governs only mount events, not devtmpfs node creation, so GoW device/gamepad hotplug keeps working.
Tests
Added coverage in
internal/lxc/config_test.gofor the default, an explicit override, the PVE path, and the helper.go build ./...andgo test ./...pass.Out of scope
The reporter's secondary
wolfpulseaudiomount failure (/run/user/wolf→/tmp/pulse) is a separate issue — that path is created inside the running Wolf container, not a recorded mount destination, so sibling-source translation can't resolve it. Left for a follow-up.Fixes #53
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.