mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-16 01:22:00 +00:00
9bc15aa306
The veth-mode reboot persistence drop-ins added in mulga-998.b were incomplete: setup-ovn.sh wrote `15-spinifex-veth-wan.network` with `Bridge=br-wan`, but never declared br-wan itself to networkd. br-wan is created by `networking.service` (ifupdown via `/etc/network/interfaces`, generated by `install.go writeNetworkConfig`), not networkd. networkd's `Bridge=` directive requires the target to be a known NetDev — when it isn't, networkd silently logs `br-wan NetDev could not be found, ignoring assignment` and the veth ends up with no master. vpcd's bridge-mode sanity check then fails on every reboot. Fix: also write `14-spinifex-br-wan.netdev` declaring br-wan as `Kind=bridge`. networkd matches the existing kernel bridge by name+kind (the `Failed to create netdev: File exists` log is harmless), and `Bridge=br-wan` resolves on next boot. ifupdown still owns DHCP and the IP — networkd just needs the NetDev declaration to enslave the veth. The write is gated to avoid clobbering operator-managed networkd config: if any other `.netdev` under `/etc/systemd/network`, `/run/systemd/network`, or `/usr/lib/systemd/network` already declares the WAN bridge by name, the write is skipped with a log line pointing at the operator file. Cleanup hook also removes the new file when switching away from veth mode. Verified end-to-end via QEMU repro: clean install + first boot + reboot, veth-wan-br master persists across reboots, vpcd starts cleanly.