hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 97cf8a1b2b agent-modules: write bao's stderr where UMask=0377 lets it, name what failed
hive-agent-forge-token and hive-agent-queue-credential both run with
UMask=0377. Their scripts captured bao's stderr in `err="$(mktemp)"`,
which under that umask is created 0400; the very next `2>"$err"` on the
`bao login` line cannot reopen it for writing, so bash fails the
redirect with "Permission denied" before bao ever runs. The `if !`
around the login then took the only error branch it had and printed
"this agent's certificate was refused by the swarm secret store" — the
store was never contacted. No agent has fetched either credential.

The stderr file now lives in each unit's own 0700 RuntimeDirectory and
is removed before every redirect into it, so the redirect creates it —
the idiom forge-token.nix already used for its staging file.

The login's error branch now says which of these happened, then quotes
bao's output:
- `$err` could not be created, so bao never ran;
- the store answered with HTTP 4xx (refusal) or another status;
- the store sent a TLS alert rejecting the certificate;
- no answer at all (network, DNS, or local TLS).
Unreadable cert/key credentials are reported before bao runs.

bao.nix has the same fetch shape but no UMask=, so its mktemp file is
0600 and writable; it is untouched.

Closes #4735
2026-09-26 21:50:39 +02:00
..
agent-modules agent-modules: write bao's stderr where UMask=0377 lets it, name what failed 2026-09-26 21:50:39 +02:00
docs nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
host-modules lint: tighten atomic-write-secret.nix's header comment; fix vale contractions in persistence.md 2026-09-26 21:50:03 +02:00
module-eval module-eval: read the services-leaf narrowing off a forge host 2026-09-26 01:39:22 +02:00
packages swarm-matrix-ctl: one control binary for the matrix container, not one per job 2026-09-20 22:07:16 +02:00
templates nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
checks.nix hive-tls: renew the swarm-services leaf on a daily timer 2026-09-25 23:38:36 +02:00
devshell.nix Add shellcheck to devshell 2026-09-15 21:45:58 +02:00
journald-severity.nix otel: map journald PRIORITY onto a severity at every journald receiver 2026-09-20 14:23:56 +02:00
reserved-hive-fragments.nix swarm: extract the name guards, so the module just says what is forbidden 2026-08-31 18:50:15 +02:00
reserved-names.nix swarm-controller: refuse a new agent name the forge would reject 2026-09-24 15:16:32 +02:00
rust.nix docs(rust): the dep-cache comment no longer describes two consumers 2026-08-11 22:29:56 +02:00
sources.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
treefmt.nix treefmt: format the web files with prettier 2026-09-02 15:25:07 +02:00