RouterOS 009: RouterOS upgrade flow #71

Open
opened 2026-11-14 01:41:06 +00:00 by ginjiruu · 0 comments
Owner

Part of #43

Refs: lab/iac#46, lab/iac#45
Migrated from router-as-code tracker 009 (docs/routeros/tracker in this repo history). Research notes: docs/routeros/notes/.

Upgrades are the whole reason HA (#46) exists, and the provider has no
package/upgrade resource (verified, note §2). So the upgrade path is not
Terraform-managed by default and needs an explicit decision.

Options, least to most clever

  1. Manual on one unit at a time, VRRP-handed-over (#46 decides the
    handover). /system package update download + reboot, watched from the
    other unit. Dumb, proven, fits a 2-router lab.
  2. routeros_file + routeros_system_script + routeros_scheduler
    (launch_trigger verified in provider source): upload npk, scheduler job
    runs the upgrade script. Automatable, but a Terraform apply that reboots
    the device it's talking to is a footgun; if taken, it goes behind a manual
    terraform apply -target gate, never the controller's auto-apply interval.
  3. Netinstall for downgrade/repair paths only — bench, physical.

Whatever wins

  • Version pins live in one file (routeros_version per workspace + expected
    version check as a terraform_data guard so plan goes red on drift).
  • The #008 nightly round-trip job re-runs against the NEW version's CHR image
    first; green round-trip is the precondition for touching hardware.
  • Reboot during upgrade must be shown non-disruptive per #46's measured-
    downtime criterion before it's routine.

Done when

  • One written runbook; rehearsed on rb5009-b in sim (image swap) and once per
    unit on hardware with downtime measured and within the #46 target.
Part of #43 Refs: lab/iac#46, lab/iac#45 Migrated from router-as-code tracker 009 (docs/routeros/tracker in this repo history). Research notes: docs/routeros/notes/. Upgrades are the whole reason HA (#46) exists, and the provider has no package/upgrade resource (verified, note §2). So the upgrade path is not Terraform-managed by default and needs an explicit decision. ## Options, least to most clever 1. **Manual on one unit at a time**, VRRP-handed-over (#46 decides the handover). `/system package update download` + reboot, watched from the other unit. Dumb, proven, fits a 2-router lab. 2. **`routeros_file` + `routeros_system_script` + `routeros_scheduler`** (launch_trigger verified in provider source): upload npk, scheduler job runs the upgrade script. Automatable, but a Terraform apply that reboots the device it's talking to is a footgun; if taken, it goes behind a manual `terraform apply -target` gate, never the controller's auto-apply interval. 3. **Netinstall** for downgrade/repair paths only — bench, physical. ## Whatever wins - Version pins live in one file (`routeros_version` per workspace + expected version check as a `terraform_data` guard so plan goes red on drift). - The #008 nightly round-trip job re-runs against the NEW version's CHR image first; green round-trip is the precondition for touching hardware. - Reboot during upgrade must be shown non-disruptive per #46's measured- downtime criterion before it's routine. ## Done when - One written runbook; rehearsed on rb5009-b in sim (image swap) and once per unit on hardware with downtime measured and within the #46 target.
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#71
No description provided.