| Filename | Latest commit message | Latest commit date |
|---|---|---|
`CPUQuota=`/`MemoryMax=` are hard caps: they throttle an agent even when
the host is idle, so they are the wrong tool for "be polite under
contention". The cgroup v2 relative shares are, and neither was wired.
Adds `services.hyperhive.{agentCpuWeight,agentIoWeight}` (1..=10000,
default 80) threaded through the existing drop-in path: HiveEnv ->
write_dropins -> WriteResourceLimits -> hyperhive-limits.conf, next to
the caps already there. Hive-wide only, as the operator scoped it on the
issue: no per-agent override, no resource-limits.json field, no
dashboard form.
The default of 80 is below the kernel's 100, so agent containers yield
to everything *not* on this drop-in path -- host services and the infra
containers (hive-ci, hive-forge, hive-gateway, hive-matrix). It does not
rank agents against each other; they all carry the same weight.
`WriteResourceLimits` gains two `#[serde(default)]` fields, and the
writer treats weight 0 as "not configured" and omits the line, so an
older hive-c0re talking to a newer hive-priv still produces the exact
pre-weights drop-in. The body is extracted into `limits_dropin_body` so
that is covered by a test rather than asserted by eye.
|
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
hive-priv-sock
Wire types for the hive-priv privileged-helper socket
(/run/hive/priv.sock) — the contract between hive-priv (the root helper,
server) and hive-c0re (client, via its priv_client).
Why it's its own crate
Split out of hive-sh4re so hive-priv — a root-privileged binary —
depends on just this narrow protocol crate instead of the much larger
daemon-shared crate. Two wins: fewer dependencies in a root process's supply
chain, and a small, self-contained interface makes the privilege boundary this
crate encodes easier to audit. Mirrors hive-host-sock's split for the host
admin socket.
Shape
Serde-derived request/response types only — no server or client logic. Both
sides import them so the shapes stay in sync. See docs/boundary.md +
docs/security.md for the privilege boundary these types sit on, and
hive-priv/README for the helper itself.