docs: describe the recorded meta fan-out pin
This commit is contained in:
parent
2b9927fda2
commit
8b255b43a0
2 changed files with 20 additions and 4 deletions
|
|
@ -150,10 +150,22 @@ pins the agent's current config (see
|
||||||
[Config changes](../agent-lifecycle/config-changes.md#the-swarms-meta-flake)). A render
|
[Config changes](../agent-lifecycle/config-changes.md#the-swarms-meta-flake)). A render
|
||||||
equal to the committed `flake.nix` sends no lock.
|
equal to the committed `flake.nix` sends no lock.
|
||||||
|
|
||||||
When a commit moves the pin from one rev to another, the controller sends a
|
The controller sends a deploy to every agent a hive places whenever the pin in
|
||||||
deploy to every agent a hive places, so they rebuild on the new hyperhive. A
|
`internal/meta` differs from the pin it last sent, so they rebuild on the new
|
||||||
restart that moves nothing deploys nothing, and the first commit deploys
|
hyperhive. It keeps that pin as the key `pin` in the `meta-fanout` KV bucket,
|
||||||
nothing.
|
which only the controller reads or writes, and a `RecordFanout` job writes the
|
||||||
|
key after every deploy of the fan-out succeeds. The check runs after each update
|
||||||
|
and once when the controller starts.
|
||||||
|
|
||||||
|
- The first commit sends a deploy, because the key holds no pin yet.
|
||||||
|
- A controller that starts with no key, as after the upgrade that added it,
|
||||||
|
sends one round. A deploy is idempotent per pin, so the round is harmless.
|
||||||
|
- A controller that dies after the commit, or a deploy that fails, leaves the
|
||||||
|
key behind. The next update or start sends the deploys again.
|
||||||
|
- A restart that finds the key equal to the pin sends nothing.
|
||||||
|
- When the bucket won't open, or its key won't read, the controller logs a
|
||||||
|
warning and sends deploys only when its own update moved the pin. That case
|
||||||
|
writes no key.
|
||||||
|
|
||||||
## Credentials
|
## Credentials
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,10 @@ The swarm's control plane. The swarm UI and `swarmctl` are its clients.
|
||||||
(`GET /api/builder/runs`, `GET /api/builder/runs/{id}`, the link on each
|
(`GET /api/builder/runs`, `GET /api/builder/runs/{id}`, the link on each
|
||||||
`swarm-builder` commit status) →
|
`swarm-builder` commit status) →
|
||||||
[`docs/swarm/builder.md`](../docs/swarm/builder.md#build-records).
|
[`docs/swarm/builder.md`](../docs/swarm/builder.md#build-records).
|
||||||
|
- **Meta fan-out** — the hyperhive pin of `internal/meta` that this daemon last
|
||||||
|
sent the hives a deploy for, one key in the `meta-fanout` KV bucket, which
|
||||||
|
this daemon alone reads and writes →
|
||||||
|
[`docs/swarm/builder.md`](../docs/swarm/builder.md).
|
||||||
- **Relays** — each agent's terminal and turn-state header as SSE, agent
|
- **Relays** — each agent's terminal and turn-state header as SSE, agent
|
||||||
icons, the cross-repo issue report, and the UI's quick links.
|
icons, the cross-repo issue report, and the UI's quick links.
|
||||||
- **Alerts** — the swarm Grafana's current alerts (`GET /api/alerts`), read
|
- **Alerts** — the swarm Grafana's current alerts (`GET /api/alerts`), read
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue