mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 21:02:07 +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#63
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/63
Author: @JBailes
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @JBailes
Base:
main← Head:fix/device-socket-mount-propagation📝 Commits (1)
8846850fix(mounts): make device & socket binds rprivate so they can't break the host📊 Changes
2 files changed (+85 additions, -10 deletions)
View changed files
📝
internal/lxc/config.go(+25 -7)📝
internal/lxc/config_test.go(+60 -3)📄 Description
Problem
#54 set
rprivatepropagation on user bind mounts so a container that mounts its owndevptsover a bind-mounted/devcould no longer replace the host's/dev/ptsand/dev/ptmx— the failure behind "Wolf breaks Proxmox shell/ssh" (Server refused to allocate pty, broken web console).That fix only covered the user-bind path. The daemon also emits binds without any propagation mode for:
/dev/dri,/dev/uinput,/dev/uhid(bothbuildItemsand the ProxmoxbuildPVEItemspath)/dev/input, derived from wildcard cgroup rules likec 13:* rmwappendSocketMount/appendSocketDirMount(e.g./run/user/wolf)These all inherited the host's (shared) propagation and live under
/devand/run— exactly the subtrees Wolf touches — so the same host-breakage class stayed open on the CT path that actually runs on Proxmox.Fix
Route every daemon-emitted bind through a single
bindMountOpts()helper that appends the defaultrprivate, in bothbuildItemsandbuildPVEItems. Propagation governs only mount events, not devtmpfs node creation, so device access is unaffected.Tests
,rprivate.TestBuildItemsDeviceMountsArePrivate/TestBuildPVEItemsDeviceMountsArePrivateasserting device dir + node binds carryrprivateon both paths.go build ./...,go vet, and fullgo test ./...pass.Fixes #53
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.