Skip to content

Bound the standalone launcher's container and tell the harness - #30

Merged
daniel-rossier merged 1 commit into
mainfrom
launcher-resource-limits
Nov 21, 2026
Merged

daniel-rossier merged 1 commit into
mainfrom
launcher-resource-limits

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

A session started with scripts/docker/spear could not run any terminal command: the harness answered resource control unavailable: systemd-run is absent.

The harness refuses a command that no cgroup bounds. In a container the launcher must pass the limits to Docker and set SPEAR_RESOURCE_CONTROL=delegated; spear-docker.sh does, the standalone launcher did not.

  • --memory (three quarters of the machine by default, SPEAR_CONTAINER_MEMORY in the configuration file for another bound), --pids-limit 4096, and the delegation variable on the same docker run.
  • No CPU bound: the container also runs the user's own builds.
  • Doc (by-hand run), CHANGELOG, one test.

Checked by replaying the failing turn (pwd from a checkout, edg image): the command now runs.

The harness refuses to run a command that no cgroup bounds. In a container
there is no systemd to scope each command, so the launcher has to pass the
limits to Docker and set SPEAR_RESOURCE_CONTROL=delegated, as spear-docker.sh
does. scripts/docker/spear did neither, and the terminal of a session started
from it answered every command with "systemd-run is absent".

The container also holds the user's own builds, so it gets three quarters of
the machine's memory (SPEAR_CONTAINER_MEMORY for another bound) and 4096
processes, and no CPU bound.
@daniel-rossier
daniel-rossier merged commit 63aeb94 into main Nov 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant