Sign in

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

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Stop a runner by draining instead of killing its jobs

f642e0aa232df7a284b9d9026fe17b34eada634c · Keenan Nemetz · 2d ago · parent 77056ba8

Stop a runner by draining instead of killing its jobs

SIGTERM ended the process mid-step, so a build that was nearly done was thrown
away and its run sat unclaimed until the lease expired. With --jobs that is N jobs
instead of one.

A runner now stops taking work on a signal and lets the jobs it already has finish
and report. The one wait it cannot interrupt from inside is a parked lease — the
reply is read by the session's decoder, and nothing else can break that read — so
the session is hung up from outside its lock and the slot exits. That costs
nothing: a slot parked on a lease is holding no job. A second signal ends the
process at once, which is what signal.Stop restores.

The packaged unit allows 60 seconds for the drain (TimeoutStopSec), so a longer
build is still killed; docs/runner.md and docs/deploy/runner.md say how to raise it
and why.

Refs: 01M6SCWCSX39QXS38QAHQSMVGX (#216)

docs/deploy/runner.md +8

@@ -72,6 +72,14 @@ sudo systemctl enable --now vole-runner
72 72 Add `--jobs N` to that line to run several jobs at once on a machine with room for
73 73 them.
74 74
75 `systemctl stop vole-runner` stops taking work and lets the jobs in flight finish,
76 up to the unit's `TimeoutStopSec` (60 seconds). Raise it in a drop-in if this
77 machine's builds run longer and you would rather wait for them:
78
79 ```sh
80 sudo systemctl edit vole-runner # [Service] / TimeoutStopSec=30min
81 ```
82
75 83 `systemctl status vole-runner` and `journalctl -u vole-runner` are where a runner
76 84 that is not taking work says why.
77 85