RouterOS 008: CHR export oracle + round-trip golden gate (route B) #70
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac#70
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #43
Refs: lab/iac#45
Migrated from router-as-code tracker 008 (docs/routeros/tracker in this repo history). Research notes: docs/routeros/notes/.
Two uses of "ask a RouterOS box, don't trust the renderer". Design in note
§5. Depends on #001 (sim rig); #007 plugs the gate into CI.
Oracle: simulator export
/export, post-process(trim dynamic entries, re-inject the secrets the export refuses to print —
verified omission, note §1), wrap in
boot.tmpl.where the two disagree, the simulator is right until proven otherwise.
Round-trip gate (the task-golden equivalent)
importthe render →tofu plan -detailed-exitcodeagainst the sim → mustbe empty. This proves boot artifact ↔ Terraform truth equivalence and
catches provider/RouterOS schema drift before hardware sees anything.
breaks round-trip pages before any device is upgraded (this is also the
answer to "test RouterOS upgrades", see #009).
Done when
render is a build failure with the diff attached.
ADR-0009: the oracle CHR gets its
www-sslcert from the harness OpenBao (#85 adds the role there too)./exportomits installed certificates (note §1), so the round-trip re-injects the OpenBao-issued cert, same as the secrets.Implemented in PR #117 (
routeros/render/).The route changed from this issue's text in one way: the render is not wrapped in a boot template. The netinstall slot holds the #64 bootstrap only (recovery config), and the full render is a second file loaded on the bench after it. Terraform adopts the result with generated import blocks.
Gate (
task render:gate): fresh CHR, bootstrap, render, empty state + imports, plan. Everything must import with no change except a fixed allowlist:move_itemsx2,ip_dns(no importer) and the www-ssl rotation (the vault cert cannot be imported). The residue is applied, and the device export must stay byte-identical. The second plan must exit 0. Coverage: nothing unmanaged in owned menus.task render:selftestproves it rejects five kinds of broken render.Green on CHR 7.25.1 for rb5009-a, rb5009-b and crs309 (2026-11-16). Not done from the issue text: CI and nightly runs (needs a runner with KVM, containerlab and the harness OpenBao), and the #69 comparison (#69 does not exist yet).