hive-c0re: the per-agent resource limit override is gone
The hive no longer sets an agent's CPU or memory cap: caps come from the swarm, else the hive-wide defaults. The container load tab was the only hive UI that set them, and its figures are already exported as OTEL metrics, so with the tab gone nothing wrote meta/resource-limits.json.
Removed: the file's reader and writer, the `hivectl agent set-limits` verb with its host-socket request, the `GET /api/container-resources` and `POST /api/resource-limits/{name}` dashboard endpoints, and the `cpu_quota`/`memory_max` fields of the container view that only the tab read. A leftover resource-limits.json is ignored.
This commit is contained in:
parent
a2540be98b
commit
90e33cbd19
19 changed files with 161 additions and 828 deletions
|
|
@ -393,30 +393,6 @@ pub enum AgentCmd {
|
|||
},
|
||||
/// Apply pending config to this managed container.
|
||||
Rebuild,
|
||||
/// Declare this agent's CPU/memory limits, overriding the hive-wide
|
||||
/// defaults.
|
||||
///
|
||||
/// Replaces the agent's whole override entry rather than merging into
|
||||
/// it: any limit you don't pass returns to the hive-wide default. To
|
||||
/// change one and keep the other, pass both. Disk is a separate
|
||||
/// resource with its own group — see `quota`.
|
||||
SetLimits {
|
||||
/// systemd `CPUQuota=` value, for example `400%` (100% = one full core).
|
||||
#[arg(long, conflicts_with = "reset")]
|
||||
cpu_quota: Option<String>,
|
||||
/// systemd `MemoryMax=` value, for example `8G`, `50%`, or `infinity`.
|
||||
#[arg(long, conflicts_with = "reset")]
|
||||
memory_max: Option<String>,
|
||||
/// Drop all overrides — the agent returns to the hive-wide
|
||||
/// defaults. Required to clear limits, so that a `set-limits`
|
||||
/// with a forgotten value can't silently reset the agent.
|
||||
#[arg(
|
||||
long,
|
||||
conflicts_with_all = ["cpu_quota", "memory_max"],
|
||||
required_unless_present_any = ["cpu_quota", "memory_max"],
|
||||
)]
|
||||
reset: bool,
|
||||
},
|
||||
/// Open an interactive Claude session inside this agent's container.
|
||||
///
|
||||
/// A fresh session by default, or resume a prior one. Requires root
|
||||
|
|
|
|||
Loading…
Reference in a new issue