ci(runners): re-own the actions cache recursively — uid-1000 jobs die in checkout #70

Merged
sirius merged 1 commit from ci/t_29249bf0-runner-cache-reown into master 2026-11-27 06:08:57 +00:00
Owner

Why

All three runners now run as uid 1000 (audit F6 / cb387a8). fix-data-perms re-owned the PVC but
guarded the recursive chown behind a top-level owner check:

if [ "$(stat -c %u "$d")" != 1000 ]; then chown -R 1000:1000 "$d"; fi

/data/.cache is already 1000, so the guard skips it — while the git pack files inside it are
still root:root 0600 from the pre-uid-1000 runner. Every job on that runner then dies in
actions/checkout, before any step runs:

2026-11-27T05:54:45Z   git clone 'https://code.forgejo.org/actions/checkout' # ref=v4
2026-11-27T05:54:45Z open /data/.cache/act/actions-checkout@v4/.git/objects/pack/pack-ba0cccfe….pack: permission denied
2026-11-27T05:54:45Z   Job failed

That is the 3 s red X with zero steps on push (websites run 1430, card t_29249bf0). It was worked
around by hand (chown -R inside the pod, ctime 05:55:05 on those packs) — this makes it durable.

Change

chown -R 1000:1000 over exactly the trees the runner writes — cache/, .cache/, runner.ini —
in all three runners. /data/docker (dind data-root, tens of GB) stays root-owned and unwalked.
A few thousand small files, once per pod start.

Also documents the strategy: Recreate consequence: a template rollout SIGKILLs in-flight job
containers and Forgejo reports the run as a plain failure with the log cut off mid-step
(sirius-growth push run 1422 — 14 min red, log ending at ##[group]Fetching the repository).

## Why All three runners now run as uid 1000 (audit F6 / cb387a8). `fix-data-perms` re-owned the PVC but guarded the recursive chown behind a **top-level** owner check: ```sh if [ "$(stat -c %u "$d")" != 1000 ]; then chown -R 1000:1000 "$d"; fi ``` `/data/.cache` is already `1000`, so the guard skips it — while the git pack files **inside** it are still `root:root 0600` from the pre-uid-1000 runner. Every job on that runner then dies in `actions/checkout`, before any step runs: ``` 2026-11-27T05:54:45Z git clone 'https://code.forgejo.org/actions/checkout' # ref=v4 2026-11-27T05:54:45Z open /data/.cache/act/actions-checkout@v4/.git/objects/pack/pack-ba0cccfe….pack: permission denied 2026-11-27T05:54:45Z Job failed ``` That is the *3 s red X with zero steps* on push (websites run 1430, card t_29249bf0). It was worked around by hand (`chown -R` inside the pod, ctime 05:55:05 on those packs) — this makes it durable. ## Change `chown -R 1000:1000` over exactly the trees the runner writes — `cache/`, `.cache/`, `runner.ini` — in all three runners. `/data/docker` (dind data-root, tens of GB) stays root-owned and unwalked. A few thousand small files, once per pod start. Also documents the `strategy: Recreate` consequence: a template rollout SIGKILLs in-flight job containers and Forgejo reports the run as a plain failure with the log cut off mid-step (sirius-growth push run 1422 — 14 min red, log ending at `##[group]Fetching the repository`).
The fix-data-perms init container guarded a chown -R behind a TOP-LEVEL owner
check (`stat -c %u /data/.cache`). /data/.cache was already 1000 while the git
pack files inside it were still root:root from the pre-uid-1000 runner, so the
guard skipped exactly the file that matters and every job on that runner died
in actions/checkout, before a single step:

  open /data/.cache/act/actions-checkout@v4/.git/objects/pack/pack-ba0cccfe….pack:
  permission denied

That is a 3 s red X with zero steps on a push (websites run 1430, card
t_29249bf0). chown the three trees the runner writes recursively instead
(cache/, .cache/, runner.ini); /data/docker stays root-owned and unwalked.

Also document the Recreate consequence: a template rollout SIGKILLs in-flight
jobs and Forgejo reports them as a plain failure with the log cut off mid-step
(sirius-growth push run 1422: 14 min red, log ending at 'Fetching the
repository').
sirius merged commit 9979cf5e49 into master 2026-11-27 06:08:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/homek8s!70
No description provided.