post-check and docs for NetworkManager WANs
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KqhjP7nud5gdBg25zCiRk9
This commit is contained in:
@@ -8,6 +8,26 @@
|
||||
> Edit that file (and commit it), not the individual configs. Before a deploy:
|
||||
> `./deploy.sh --check` and `./deploy.sh --diff`. Static checks: `tests/check-templates.sh`.
|
||||
|
||||
## Multi-WAN (NetworkManager)
|
||||
|
||||
Hosts with `ENABLE_NM_WAN=1` (`hosts/*.conf`) run their uplinks (Starlink, Wi-Fi, cellular) under
|
||||
NetworkManager. `deploy.sh` installs the packages and the cellular NM connection
|
||||
(`CELLULAR_CONN_NAME`/`CELLULAR_APN`), but a routine deploy never touches `/etc/netplan/*` or flaps
|
||||
an uplink; it only warns when the WAN netplan is missing or differs. Apply it with
|
||||
`sudo ./deploy.sh --apply-network` (add `--force` to override a blocking status): a detached
|
||||
helper installs the netplan, gates on uplink health and rolls back automatically on failure. Its log
|
||||
is `/var/log/vanlink-apply-network.log` and its status line is in
|
||||
`/var/lib/vanlink/apply-network.status` (`ok|running|rolled-back|rollback-failed`). `./deploy.sh --wan-plan`
|
||||
shows, read-only, what the provisioning would do. `--post-check` reports the last apply status.
|
||||
|
||||
Live WAN state: `cat /run/van-failover/state.json` lists each WAN with `device`, `connection`,
|
||||
`present` (device and connection both resolved), `up`, `healthy`, `active` (holds the best default
|
||||
route) and `route_metric`. `present: false` for an existing device is a problem; `--post-check` warns.
|
||||
|
||||
Known limitation: there is no boot-time recovery yet. If power is lost during an apply, the new
|
||||
config boots ungated and the status file still says `running`; `--apply-network` then refuses to run
|
||||
without `--force`. Inspect the log and the uplinks first.
|
||||
|
||||
Turns **wayback** (Asus ZenBook UX391U, Ubuntu 24.04, zabbly kernel) into a self-contained
|
||||
campervan hub/router/AP:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user