swarm-bao: re-run the operator viewer unit when the granter step succeeds
swarm-bao-operator-viewer-policy exits 0 while the granter may not configure auth/oidc, so it never retries on its own. On 2026-09-29 the operator fixed the granter (swarm-bao-granter-role succeeded at 15:29Z), but the viewer unit had last run on 2026-09-28 19:11Z on that exit-0 branch. auth/oidc/config and the viewer role stayed unwritten and OIDC login failed until a manual restart. The granter unit now restarts the viewer unit from ExecStartPost, which runs only after its script exits 0. Restart rather than start, because the viewer unit is RemainAfterExit and a start would be a no-op. --no-block, because the viewer unit is ordered after the granter and a blocking restart would deadlock. The link is one-way, so the viewer's own Restart=on-failure never re-runs the granter. OnSuccess= would not fire (the granter stays active under RemainAfterExit), and Wants=/PartOf= either no-op on an active unit or also propagate a failed restart and every stop. The viewer's log message no longer tells the operator to restart it. Refs #4772
This commit is contained in:
parent
efed43b672
commit
22c96282b9
3 changed files with 35 additions and 5 deletions
|
|
@ -469,7 +469,8 @@ step. A store set up before the mount existed needs the
|
|||
`bao-bootstrap`, which covers `sys/auth/oidc`, and the granter's own
|
||||
policy, which covers `auth/oidc/`. Until then
|
||||
`swarm-bao-operator-viewer-policy` writes the viewer policy, logs the step, and
|
||||
exits 0, and the UI offers token login only.
|
||||
exits 0, and the UI offers token login only. `swarm-bao-granter-role` re-runs
|
||||
it each time the step succeeds, so OIDC login needs no further restart.
|
||||
|
||||
## The constraint that decides where the root lives
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue