mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-05 12:37:54 +00:00
f0944d3c7f
Ubuntu 18.04 and later render the network with netplan. ifupdown is not installed and /etc/network/interfaces.d/* is ignored entirely, so configeth's Debian branch -- which writes exactly there -- configures nothing at all on a modern Ubuntu node. It must write /etc/netplan/*.yaml and apply it instead. Issue #7454. Three properties a netplan writer has to hold, all of which an in-place YAML editor gets wrong. A VLAN interface (<parent>.<vid>) belongs under vlans: with id and link, or netplan never recreates it after a reboot. Multiple addresses on one NIC must keep the order they were added. And routes must be idempotent on the whole (to, via) pair, not on either field alone, or a second route sharing a gateway is swallowed. nicextraparams must survive as well: the ifupdown branch writes them into the interface stanza, so a netplan branch that drops them silently discards configuration the user asked for. Drive the real writers -- extracted from configeth and run against a temp NETPLAN_DIR -- and hand the result to `netplan generate` where netplan is installed. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>