feat: cgroup constraints#1467
Conversation
ce2f80b to
9af5b7e
Compare
|
@doc-han something giving me the ick here is the engine needing write access to the root So I'm thinking: what if we leave the sysadmin to configure the cgroups for us - assume they already exist. Then all the engine needs to do is assign processes to the existing cgroup. I've worked this up with Claude and it's given me a proposed change which I don't really understand - I'll post that in its own comment |
Spec: delegated cgroup memory enforcementRework of the cgroup work on the MotivationThe current implementation self-provisions the cgroup hierarchy: it walks down
DesignInvert the responsibility. The engine never provisions the hierarchy; it Contract: the worker process must be started inside a writable cgroup v2 This works because processes are always born inside their supervisor's cgroup:
Default parent = the worker's own cgroup, resolved from Startup sequence (all writes confined to the parent)
Code changes
|
Short Description
uses cgroups to set resource limits on run processes so we can kill them before they take the worker down.
Fixes #
Implementation Details
A more detailed breakdown of the changes, including motivations (if not provided in the issue).
QA Notes
List any considerations/cases/advice for testing/QA here.
AI Usage
Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):
You can read more details in our
Responsible AI Policy
Release branch checklist
Delete this section if this is not a release PR.
If this IS a release branch:
pnpm changeset versionfrom root to bump versionspnpm installpnpm changeset tagto generate tagsgit push --tagsTags may need updating if commits come in after the tags are first generated.