Watch
0
0
Fork
You've already forked hyperhive
0

docs: turning the node on restarts the store, so unseal before the re-grant

node.md named the second grant-bootstrap and nothing before it. The
first activation with deploy.k8s.enable adds a pod listener to the
store's configuration, which restarts container@swarm-bao. A shamir
store comes back sealed, the units that read it fail, and
grant-bootstrap cannot log in until an operator unseals it. A pkcs11
store unseals itself.

node.md now has the order for a swarm that already runs: unseal on a
shamir store, then grant-bootstrap once, then restart the policy units,
as setup.md does. Only node.md changes.

Closes #6844
This commit is contained in:
maia 2026-11-24 22:11:53 +01:00
commit 96430cf43c

View file

@ -132,6 +132,36 @@ The bootstrap policy that `swarmctl bao grant-bootstrap` applies carries
`sys/auth/jwt-k8s`, so a store set up before the node existed needs that step `sys/auth/jwt-k8s`, so a store set up before the node existed needs that step
once more. once more.
### Turning the node on for a swarm that already runs
The first activation with `deploy.k8s.enable` restarts the store's container,
`container@swarm-bao`. The node adds a `pod` listener to the store's
configuration, and a changed container configuration restarts the container.
What comes next depends on the store's seal:
- With the default `pkcs11` seal the store unseals itself. Skip the unseal
below.
- With `deploy.bao.seal = "shamir"` the store comes back sealed. Every unit that
reads it fails until an operator unseals it, and `swarmctl bao grant-bootstrap`
can't log in either. Unseal first, with the saved keys, as
[setup](../../1-getting-started/setup.md) does:
```bash
bao operator unseal # repeat with different keys until the store reports unsealed
```
Then, on either seal, as root on the host that runs `swarm-bao`:
```bash
swarmctl bao grant-bootstrap # prompts for the root token, input hidden
systemctl reset-failed 'swarm-bao-*-policy.service' swarm-bao-agent-pki.service
systemctl restart 'swarm-bao-*-policy.service' swarm-bao-agent-pki.service
```
The grant adds `sys/auth/jwt-k8s` to the bootstrap policy, and the restart lets
`swarm-bao-granter-role` enable the mount and `swarm-bao-k8s-jwt-policy` write
the pods' login. Until both have run, the pods can't log in.
## Validation ## Validation
`module-eval-k8s` compares an all-local host with the option on against the `module-eval-k8s` compares an all-local host with the option on against the