Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Bound the runner's image storage by age

3455902aa415e013b0e5525e3fd2271a2b1a4e9a · Keenan Nemetz · 3d ago · parent 1a9b3838

Bound the runner's image storage by age

The job cache and saved checkouts have caps, but image storage belonged to the
runtime and grew two ways: a changed `.vole/images` definition left a permanent
new digest tag behind, and a moved registry tag left the previous layers
dangling. `--disk-reserve` could not reclaim either; it stops a job instead.

Add `--image-max-age` (default 168h; 0 keeps every image), threaded through
agent.Options. At startup and on the cache trimmer's beat the runner asks the
runtime to prune unused images older than the age, using the filter docker,
podman, and nerdctl all express. A job holds an image guard from resolution
until its container is up, so a pass that races a lease gives way. A runner
with `--container-pull never` keeps every tagged image and prunes dangling
layers only, because it may have no network to fetch an evicted image again.
A runtime that will not prune is reported once and then left alone: the runner
keeps serving.

The primitive lives in ci/container so `vole workflow run` can use it later;
the policy and its beat live in ci/agent beside the two existing trimmers.

closes: 01M8CR0RN88JF14PKAZ0D387ND

docs/cli.md +2−1

@@ -501,7 +501,7 @@ See [Sites](sites.md).
501 501 ### runner
502 502
503 503 ```sh
504 vole runner --remote ssh://git@host[:port] [--once] [--jobs <n>] [--dir <path>] [--repos <name>]... [--label <name>]... [--container-runtime <name>] [--container-network <mode>] [--container-pull <mode>] [--container-user <uid:gid>] [--container-userns <mode>] [--container-memory <size>] [--container-cpus <n>] [--container-pids <n>] [--cache-size <size>] [--git-cache-size <size>] [--no-cache] [--known-hosts <path> | --insecure-host-key]
504 vole runner --remote ssh://git@host[:port] [--once] [--jobs <n>] [--dir <path>] [--repos <name>]... [--label <name>]... [--container-runtime <name>] [--container-network <mode>] [--container-pull <mode>] [--container-user <uid:gid>] [--container-userns <mode>] [--container-memory <size>] [--container-cpus <n>] [--container-pids <n>] [--cache-size <size>] [--git-cache-size <size>] [--image-max-age <duration>] [--no-cache] [--known-hosts <path> | --insecure-host-key]
505 505 ```
506 506
507 507 Leases CI jobs from a Vole instance and runs them. Authentication is the SSH
@@ -563,6 +563,7 @@ the job.
563 563 | `--disk-reserve <size>` | — | free space kept under --dir (default 2G; 0 disables the check) |
564 564 | `--cache-size <size>` | — | cap for the job cache (default 5G) |
565 565 | `--git-cache-size <size>` | — | cap for the saved checkouts (default 10G; 0 keeps every one) |
566 | `--image-max-age <duration>` | — | prune unused images older than this age (default 168h; 0 keeps every image) |
566 567 | `--no-cache` | — | mount the cache but empty it after every job |
567 568 | `--known-hosts <path>` | — | a known_hosts file to verify the instance against |
568 569 | `--insecure-host-key` | — | accept any host key; for tests and throwaway instances only |