mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 12:52:04 +00:00
[PR #146] [MERGED] fix(lxc/api): make --network none containers start + report isolated; worktree/socket mount robustness #146
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#146
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/146
Author: @JBailes
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @JBailes
Base:
main← Head:fix/network-none-sandbox-start-and-isolation📝 Commits (5)
ef2780dfix(lxc): re-resolve stale /proc//root bind sources at start25c0edcfix(api): resolve absent-socket sibling binds to the stable host pathf2fc38ffix(api): disambiguate a shared bind destination by what exists on disk6ac96b8fix(lxc): skip bridge attachment for containers with no veth NIC6abfc71fix(api): report --network none containers as networkless in inspect📊 Changes
6 files changed (+427 additions, -20 deletions)
View changed files
📝
internal/api/containers.go(+83 -19)➕
internal/api/network_none_inspect_test.go(+60 -0)📝
internal/api/sibling_mount_test.go(+81 -0)📝
internal/lxc/manager.go(+146 -1)📝
internal/lxc/manager_test.go(+21 -0)➕
internal/lxc/mount_reresolve_test.go(+36 -0)📄 Description
Follow-on to #145 (--network none isolated netns). With #145 a
--network nonecontainer getslxc.net.0.type = empty(isolated netns, loopback only), but it still could not be used as a sandbox: it failed to start anddocker inspectreported it as networked. These five fixes complete the path (validated live on a SmoothNAS host driving isolated build/verify sandboxes).ensureBridgeAttachmentwaited (5s) for aLinkinlxc-infothat anempty/nonenetns never has, then failed, sodocker starterrored for every--network nonecontainer. Skip attachment when the config declares no veth NIC (lxc.net.0.type != veth). Unit-tested (bridgedNICConfigured).docker inspectreported a phantomveth0+ VMID-derived managed-bridge IP for a genuinely-isolated container, so any client/isolation probe saw false egress. Report{none:{}}with no address/gateway for none-mode (matches Docker). Unit-tested./proc/<pid>/root/...bind-mount sources beforelxc-startso a restarted/re-materialized container's socket binds don't point at a dead pid.go build ./...clean;internal/api+internal/lxctests pass except the pre-existing, host-disk-dependentTestCheckCreateDiskPressure.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.