nix: finish the current-behaviour comment sweep in touched files
Rewrite the remaining narration in files the previous commit touched: "moved"/"sat"/"was REMOVED"/"old default" comments in swarm-bao, swarm-otel, glue-bao-tls, nats-authelia, swarm-controller, swarm-ui, swarm-otel-service, swarm-authelia-service, the deploy.nix rename table, hive-ci, hive-forge/service, hive-tls, hyperhive, swarm-nats, swarm.nix and a few module-eval fixtures, so each says where a thing is or why it is so now. Revert the comment edits inside shell script strings in hive-tls, swarm-nats and the forge token mint to their previous text, so those generated units are unchanged. The only unit still changing is swarm-bao-pki (two comment lines in its script). Refs #3902
This commit is contained in:
parent
1c90619fbb
commit
e990e9a0be
21 changed files with 102 additions and 103 deletions
|
|
@ -925,25 +925,29 @@ in
|
|||
# re-mint instead of being silently masked by a stamp that
|
||||
# outlived what it claims exists.
|
||||
if [ ! -s "$token_path" ]; then
|
||||
# `write:admin` is required by `swarm-controller::forge::Client::
|
||||
# ensure_agent_user` (the `CreateForgeUser` jobq node):
|
||||
# Forgejo's `admin_create_user` HTTP endpoint refuses a
|
||||
# token without it ("token does not have at least one of
|
||||
# required scope(s): [write:admin]"). A host whose token was
|
||||
# minted without this scope keeps it — the
|
||||
# `[ ! -s "$token_path" ]` guard above only mints when the
|
||||
# file is absent, by design (see its own comment) — so such a
|
||||
# deployment needs its token file deleted to force a re-mint
|
||||
# with the full scope.
|
||||
# `write:admin` added for `swarm-controller::forge::Client::
|
||||
# ensure_agent_user` (the `CreateForgeUser` jobq node) —
|
||||
# Forgejo's `admin_create_user` HTTP endpoint refused every
|
||||
# call with "token does not have at least one of required
|
||||
# scope(s): [write:admin]" without it, an already-deployed
|
||||
# swarm hitting this the moment that node shipped. A host
|
||||
# whose token was minted before this scope was added won't
|
||||
# pick it up automatically — the `[ ! -s "$token_path" ]`
|
||||
# guard above only mints when the file is absent, by design
|
||||
# (see its own comment) — so an existing deployment needs
|
||||
# its token file deleted to force a re-mint with the new
|
||||
# scope.
|
||||
#
|
||||
# Token name carries a timestamp suffix rather than a fixed
|
||||
# name: deleting the token *file* (the remediation above)
|
||||
# doesn't delete the token Forgejo already has under that
|
||||
# name, so re-running this unit would fail with "Command
|
||||
# error: access token name has been used already". Same
|
||||
# approach `hive-c0re::forge::users::mint_token` uses for its
|
||||
# own agent tokens — a monotonic suffix means a re-mint can
|
||||
# never collide with whatever this account already has.
|
||||
# Token name carries a timestamp suffix rather than the
|
||||
# fixed `swarm-controller-boot` this used to be — a real
|
||||
# incident, not a hypothetical: deleting the token *file*
|
||||
# (the remediation above) doesn't delete the token Forgejo
|
||||
# already has under that name, so re-running this unit hit
|
||||
# "Command error: access token name has been used already"
|
||||
# and failed outright. Same fix `hive-c0re::forge::users::
|
||||
# mint_token` already uses for its own agent tokens, for
|
||||
# the identical reason — a monotonic suffix means a re-mint
|
||||
# can never collide with whatever this account already has.
|
||||
out=$(forgejo admin user generate-access-token \
|
||||
--username ${lib.escapeShellArg swarmControllerForgeUser} \
|
||||
--token-name "swarm-controller-boot-$(date +%s)" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue