Watch
0
0
Fork
You've already forked hyperhive
0

remove the hivectl-only quota verbs and the trollshell status feed

This commit is contained in:
atlas 2026-11-13 16:00:30 +01:00
commit cf360b74b9

View file

@ -33,7 +33,7 @@ pub enum Cmd {
/// Everything here targets a single named agent (`hivectl agent foo
/// restart`, `hivectl agent foo choom`, …) — anything that acts
/// hive-wide lives at the top level instead (`list-agents`,
/// `restart`/`stop`/`start` with a scope, `quota-enable`).
/// `restart`/`stop`/`start` with a scope).
Agent {
/// Agent name (for example `agent1`).
name: String,
@ -51,12 +51,6 @@ pub enum Cmd {
#[arg(long)]
json: bool,
},
/// Enable btrfs qgroup accounting on the agent-state filesystem.
///
/// Global one-shot toggle (not per-agent), hence top-level rather than
/// under `hivectl agent <name>`. Idempotent — safe to re-run. Once
/// enabled, `hivectl agent <name> quota show`/`quota set` work.
QuotaEnable,
/// WireGuard inter-hive mesh setup helpers.
///
/// Generate this hive's mesh key and print the nix to enable the mesh,
@ -277,39 +271,20 @@ pub enum AgentCmd {
/// ends the watch with exit 0. `Ctrl-C` to stop.
/// Requires the agent to be running.
Watch,
/// This agent's disk accounting + optional quota via btrfs qgroups.
///
/// Needs `hivectl quota-enable` run once hive-wide first. No-op on
/// non-btrfs hosts.
Quota {
#[command(subcommand)]
cmd: AgentQuotaCmd,
},
/// btrfs subvolume management for this agent's state dir.
///
/// Upgrade an existing plain-dir agent's state into a btrfs subvolume
/// so it gains snapshots and per-subvol usage/quota.
/// so it gains snapshots.
Subvol {
#[command(subcommand)]
cmd: SubvolCmd,
},
}
#[derive(Subcommand)]
pub enum AgentQuotaCmd {
/// Report this agent's disk usage from btrfs qgroups.
Show,
/// Set or clear this agent's disk-usage quota.
Set {
/// Size cap (`5G`, `500M`, `1073741824`) or `none` to clear.
size: String,
},
}
#[derive(Subcommand)]
pub enum SubvolCmd {
/// Convert a plain-dir agent state root into a btrfs subvolume in
/// place, so it gains snapshots and per-subvol usage/quota.
/// place, so it gains snapshots.
///
/// Bounces the agent to migrate its state, so it requires `--yes`.
Upgrade {