RouterOS: first armed apply after the 11-17 password rotation (watch) #142

Closed
opened 2026-11-17 19:53:11 +00:00 by ginjiruu · 1 comment
Owner

Low priority, watch item. Close after the first real armed apply on an rb5009 succeeds post-rotation.

Context

2026-11-17 (#68, PR #135): the terraform REST password of all three devices was rotated live with task routeros:rotate-password (crs309 13:58, rb5009-b 14:25, rb5009-a 14:43 local; OpenBao secret/routeros-secrets v4 -> v7). After each one, a triggered reconcile ran detectDrift with the new password: no drift, no apply. Runner pods are created per reconcile, so their env always carries the current Secret.

Verified read-only: each rb5009 reaches its peer's /rest/system/scheduler with the peer password from the cluster Secret (HTTP 200 both ways). That is the first request arm.sh makes.

Not yet exercised on hardware: a full arm -> judge -> commit after the rotation. The sim (routeros/sim/rollback/run.sh) proves that path; rotation changed values only, not code.

If an apply fails after this

Symptom in the runner log Likely cause Fix
peer ... answered HTTP 401, cannot prove it is unarmed peer's routeros-<peer>-env stale or KV/device disagree compare login with the Secret's value; re-run task routeros:rotate-password DEVICE=<peer> (resumes)
WARN: stored credentials refused (rotated?); no early arm expected once right after a rotation (early arm uses the previous apply's creds) none; the final arm still covers the apply
provider 401 on plan routeros-<dev>-env not refreshed kubectl -n flux-system annotate externalsecret routeros-<dev>-env force-sync=$(date +%s) --overwrite
rotate script 403 on OpenBao operator token expired (TTL 30m) re-login, re-run; a pending file in $XDG_RUNTIME_DIR resumes the run

Docs: docs/routeros/README.md section "Secrets and state". Sim: task routeros:rotate-sim.

Refs #68, #74

Low priority, watch item. Close after the first real armed apply on an rb5009 succeeds post-rotation. ## Context 2026-11-17 (#68, PR #135): the terraform REST password of all three devices was rotated live with `task routeros:rotate-password` (crs309 13:58, rb5009-b 14:25, rb5009-a 14:43 local; OpenBao `secret/routeros-secrets` v4 -> v7). After each one, a triggered reconcile ran detectDrift with the new password: no drift, no apply. Runner pods are created per reconcile, so their env always carries the current Secret. Verified read-only: each rb5009 reaches its peer's `/rest/system/scheduler` with the peer password from the cluster Secret (HTTP 200 both ways). That is the first request `arm.sh` makes. **Not yet exercised on hardware:** a full arm -> judge -> commit after the rotation. The sim (`routeros/sim/rollback/run.sh`) proves that path; rotation changed values only, not code. ## If an apply fails after this | Symptom in the runner log | Likely cause | Fix | |---|---|---| | `peer ... answered HTTP 401, cannot prove it is unarmed` | peer's `routeros-<peer>-env` stale or KV/device disagree | compare login with the Secret's value; re-run `task routeros:rotate-password DEVICE=<peer>` (resumes) | | `WARN: stored credentials refused (rotated?); no early arm` | expected once right after a rotation (early arm uses the previous apply's creds) | none; the final arm still covers the apply | | provider 401 on plan | `routeros-<dev>-env` not refreshed | `kubectl -n flux-system annotate externalsecret routeros-<dev>-env force-sync=$(date +%s) --overwrite` | | rotate script 403 on OpenBao | operator token expired (TTL 30m) | re-login, re-run; a pending file in `$XDG_RUNTIME_DIR` resumes the run | Docs: `docs/routeros/README.md` section "Secrets and state". Sim: `task routeros:rotate-sim`. Refs #68, #74
Author
Owner

Closing: armed applies have gone through arm, judge and commit on both rb5009s since the 11-17 rotation (#140, #163-#166), and both runners are Ready at d4e98ba.

Closing: armed applies have gone through arm, judge and commit on both rb5009s since the 11-17 rotation (#140, #163-#166), and both runners are Ready at d4e98ba.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/iac#142
No description provided.