refactor(hivectl): move quota + subvol under agents
Both groups only ever act on a single managed agent's state dir, so they belong in the `agents` namespace rather than as top-level verbs next to `forge` / `matrix` / `wg`. Renames `quota limit` -> `quota set`: the enclosing group already carries the noun, so the bare verb matches the flat `set-parent` / `set-limits` spelling without stuttering, and it removes the `set-limits` (cpu/mem) vs `quota limit` (disk) ambiguity. Adds a cross-pointer from `set-limits` to `agents quota`. Handlers stay in their own modules; `run_agents` gains the reparenting glue. Regenerates docs/tools/hivectl-cli.md. Refs #2724
This commit is contained in:
parent
2af8c2d17d
commit
766b1f71fb
9 changed files with 215 additions and 204 deletions
|
|
@ -1,4 +1,4 @@
|
|||
//! `hivectl quota` — per-agent disk accounting + optional quotas via
|
||||
//! `hivectl agents quota` — per-agent disk accounting + optional quotas via
|
||||
//! btrfs qgroups. The daemon holds the privileged helper that reads /
|
||||
//! sets qgroups; hivectl relays the request and formats the reply.
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ pub(crate) async fn quota_show(socket: &Path, name: Option<&str>) -> Result<()>
|
|||
.await
|
||||
.with_context(|| format!("connect to daemon socket {}", socket.display()))?;
|
||||
if !resp.ok {
|
||||
// Carries the "btrfs quota not enabled — run `hivectl quota enable`
|
||||
// Carries the "btrfs quota not enabled — run `hivectl agents quota enable`
|
||||
// first" hint when qgroups are off.
|
||||
bail!("{}", resp.error.as_deref().unwrap_or("quota show failed"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue