mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 21:02:07 +00:00
[PR #43] [MERGED] fix(pve): hide image templates from the Proxmox UI + fix docker run -d deadlock #44
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#44
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/43
Author: @JBailes
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @JBailes
Base:
main← Head:fix/pve-hide-templates📝 Commits (4)
3e556c6fix(pve): hide image templates from the Proxmox UI; fix docker run -d deadlockef17f58fix(pve): treat instant-exit pct start as a successful fast-exit74d3040fix(attach): frame non-TTY container output as Docker stdcopy streama660b17feat(pve): reap leaked daemon-managed CTs from the Proxmox UI📊 Changes
6 files changed (+524 additions, -83 deletions)
View changed files
📝
internal/api/containers.go(+97 -18)📝
internal/lxc/config.go(+6 -2)📝
internal/lxc/manager.go(+70 -63)➕
internal/lxc/pve_tarball.go(+295 -0)➕
internal/lxc/pve_tarball_test.go(+52 -0)📝
internal/store/store.go(+4 -0)📄 Description
What
PVE GUI cleanup + storage-agnostic image handling, plus a
docker run -ddeadlock fix. Reconciled onto the native-LLBmainline (the storage-agnostic bits were ported from the deployed LVM WIP, preserved onorigin/wip/deployed-lvm-buildx).Templates no longer clutter the Proxmox UI
Previously every base image became a
pcttemplate CT (visible in the GUI), and they leaked duplicates. Now the rootfs is stored as a tarball under the state dir and containers arepct created from it directly:RemoveImagejust deletes the tarballstore.ImageRecord.TemplateTarball;internal/lxc/pve_tarball.go(createPVEFromTarball,detectPVEStorageType,readPVERootfsSpec,mountPVERootfs)Also ported from the WIP: storage-type detection, and
cgroup:rw+features: nesting=1,keyctl=1in the CT config (cgroup-v2 host fix + nested runtimes).docker run -ddeadlock fixwaitContaineronly sent its HTTP response when the container exited. But the Docker SDK'sContainerWait(API ≥1.30) blocks on the POST until it gets the response header, anddocker runcallsContainerWaitbeforeContainerStart— so/startwas never sent, the container stayedCreated, and the wait never resolved. Deadlock (broken only by an externaldocker start). This is very likely the source of the lingering "Created" containers in the GUI.Fix: flush the
200header immediately, then stream the result when the wait resolves (matches the real docker daemon). Also detect fast-exiting containers innext-exit.Validation
Live on the lvmthin host (isolated daemon, production untouched):
docker pull busybox→ tarball, no GUI template ✓docker run -d busybox sleep N→ container running ✓docker exec✓Known remaining edge case (follow-up)
Foreground
docker run <quick-cmd>/--rm(e.g.echo):pct startreturns non-zero for a CT whose init exits instantly, and the foreground attach for an already-gone CT is a further layer.docker run -dwith a long-running command (the common case + Wolf's pattern) is unaffected.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.