Open sthroner opened 2 weeks ago
Seem to have a similar problem here, this is my full config (in case I'm missing something):
debug = true
root = "/var/lib/buildkit"
commands
[history]
maxAge = 172800
maxEntries = 50
[worker]
[worker.containerd]
enabled = false
[worker.oci]
enabled = true
rootless = true
max-parallelism = 4
gc = true
snapshotter = auto
platforms = ["linux/amd64"]
[[worker.oci.gcpolicy]]
filters = ["type==exec.cachemount"]
keepBytes = 90%
keepDuration = 30d
[[worker.oci.gcpolicy]]
all = true
keepBytes = 90%
keepDuration = 30d
But my volume mounted on /home/user/.local/share/buildkit
and used only by buildkit is full at 96%, causing a no space left on disk
error when trying to run a build task
EDIT: Another observation: after restarted the pod (and resized volume), seem that the cleanup was performed
@devthejo what version of buildkit do you see this on? The original issue seems to be on v0.16, with rootless mode, is that the same setup you have?
@devthejo what version of buildkit do you see this on? The original issue seems to be on v0.16, with rootless mode, is that the same setup you have?
@jedevc It was v0.13.0, I upgraded now to v0.17.1 and I'm waiting to see if it's reproducible on the new version (I was in the need to fix the bug quickly and didn't have enough time to investigate further). Not sure it's the same issue, but it looked like.
Hello,
we are running Buildkit rootless in a Kubernetes installation and have defined a GC policy with keepBytes:
But the Rule is not always triggered when we hit the limit. We tried to pin down the issue already and here are all the details we already found out.
GC Triggered based on Disk Usage
Most of the time, the GC is working fine and removes the cached data above the set limit, but from the time a buildkit instance, is running out of storage and responds with the following error:
After some tests it looked like the buildctl disk usage command (
buildctl du
) did not report the correct amount for the actual disk usage (du
). Since the buildctl reported disk usage was lower then thekeepByte
value set in the GC policy the GC was not triggered.Disk Usage Reported by Buildkit based on type
Disk Usage System
When running the GC manually via
buildctl prune
the GC does cleanup all the space. Therefore the GC collector is working fine but it looks more like an issue with the measurement of the disk usage.Wrong Permission within Cache Folder
What we also noticed during the analysis was that the permissions for some folders within the cache were not set as we would expect them to be.
running du does not work due to permission
permission for the folder
We also see other folder with similar permissions as the
var/cache/apt/archives/partial
, so this looks like not only something related to apt package manager.Setup
We currently use the version 0.16 of the rootless container (https://hub.docker.com/layers/moby/buildkit/v0.16.0-rootless) in a K8s setup.
StatefulSet:
ConfigMap: