Skip to content

Commit 6a0c165

Browse files
committed
monster: Fix runner work-dir bind mount not taking effect
The initial bind mount over /run/github-runner did not actually keep builds off tmpfs in CI; two issues surfaced: - The mount was wantedBy the runner services, but those are ephemeral (Restart=always) and a systemd restart does not re-pull WantedBy deps. After the first job the mount was left unmounted and builds dropped back onto the 4G tmpfs, failing with ENOSPC. Bind it to multi-user.target so it stays mounted for the host's lifetime. - The source dir was 0750, so the per-runner DynamicUser could not traverse the shared parent into its own RuntimeDirectory leaf, failing with EACCES on the build dir. Use 0755 to match the mode systemd gave the tmpfs parent before.
1 parent daa072c commit 6a0c165

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

nix/hosts/monster/github-runner.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ in
3636
trusted-users = runners;
3737
};
3838

39-
systemd.tmpfiles.rules = [ "d /var/lib/github-runner-work 0750 root root -" ];
39+
systemd.tmpfiles.rules = [ "d /var/lib/github-runner-work 0755 root root -" ];
4040

4141
systemd.mounts = [
4242
{
@@ -47,7 +47,7 @@ in
4747
requires = [ "systemd-tmpfiles-setup.service" ];
4848
after = [ "systemd-tmpfiles-setup.service" ];
4949
before = map (r: "github-runner-${r}.service") runners;
50-
wantedBy = map (r: "github-runner-${r}.service") runners;
50+
wantedBy = [ "multi-user.target" ];
5151
}
5252
];
5353

0 commit comments

Comments
 (0)