mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 12:52:04 +00:00
[PR #58] [MERGED] feat(daemon): keep bulky regenerable state off the host root #60
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#60
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/58
Author: @JBailes
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @JBailes
Base:
main← Head:feat/pve-cache-off-root📝 Commits (1)
562e3c4feat(daemon): keep bulky regenerable state off the host root📊 Changes
10 files changed (+97 additions, -7 deletions)
View changed files
📝
cmd/docker-lxc-daemon/main.go(+4 -0)📝
internal/api/buildkit_cache.go(+1 -1)📝
internal/api/buildkit_exec.go(+1 -1)📝
internal/api/containers.go(+11 -1)📝
internal/api/containers_extra.go(+1 -1)➕
internal/lxc/cachedir_test.go(+27 -0)📝
internal/lxc/diskspace.go(+1 -0)📝
internal/lxc/manager.go(+48 -1)📝
internal/lxc/pve_tarball.go(+2 -2)📝
readme.md(+1 -0)📄 Description
Why
The daemon's large, regenerable data — PVE image rootfs tarballs, OCI unpacks, named-volume backing, and the buildkit cache — all lived under the state dir (
/var/lib/docker-lxc-daemon) on the host root. On a node with a small root pool that's a slow leak toward a full root (image tarballs alone were ~3 G on the affected host), which destabilizes everything. Sibling to the Wolf-game-library-on-root problem, but for the daemon's own state.What
A single, configurable cache location for bulky data, separate from the small JSON metadata, via
--cache-path:--cache-pathwins;/<pool>) → auto-defaults the cache onto that pool, off root;--cache-path.Manager.CacheDir()/SetCacheDir()resolve and own the path. Tarball, OCI, volume-root, and buildkit-cache call sites derive from it (the API via a nil-safeh.cacheDir()that falls back to the store root for tests). The disk-pressure watcher (PR #57) also watches the cache filesystem.Backward compatible: image and volume records store absolute paths, so existing tarballs/volumes keep resolving; only new writes land in the new location.
Tests
Unit test covers
resolveCacheDiracross explicit / zfs-auto / lvmthin-fallback / legacy.make test(unit + integration) green.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.