On 11.07.24 09:16, Philip Hands wrote:
Simon McVittie <s...@debian.org> writes:
On Tue, 09 Jul 2024 at 16:21:16 +0200, Ansgar 🙀 wrote:
On Tue, 2024-07-09 at 22:44 +0900, Simon Richter wrote:
I believe NM does not have a fixed configuration format, but only a dbus
API.
It's perfectly fine to edit configuration files for NM manually, see
man:nm-settings-keyfile(5).
... and debian-installer already knows how to write out these files,
and has done so for more than a decade if I'm reading correctly. This is
not a recent innovation, and anyone who has installed our default desktop
environment in the last few years - especially if they used wifi during
installation - has been relying on this code path.
<https://salsa.debian.org/installer-team/netcfg/> is responsible
for converting the network configuration that was used temporarily in
the d-i environment into a NM configuration file if NM is installed,
or an ifupdown configuration otherwise. Writing the equivalents into
/etc/systemd/network for systemd-networkd would presumably not be rocket
science, it's a simple .ini-like syntax similar to the one NM uses.
We're just in the process of adding support for netplan as well:
https://salsa.debian.org/installer-team/netcfg/-/merge_requests/9
I've only seen netplan mentioned in passing in this thread so far.
It seems like it is exactly what we need as a replacemtent for ifupdown
(given that is what it's designed for AFAICT -- I've not yet tried it
out myself though) and it already supports configuring systemd-networkd,
so seems like a more sensible route than duplicating that effort in D-I.
See: https://netplan.readthedocs.io/
Yes, please!
As Phil mentions, we're pretty close in getting D-I support for Netplan merged
[d-i/netcfg !9].
The implementation enables Netplan+systemd-networkd for new installations,
except for cases where NetworkManager is available (e.g. Desktop
installations). In the latter case it would enable Netplan+NetworkManager, as
it is today.
That way, we will be able to rely on the two most popular, well tested and well
maintained networking daemons (systemd-networkd & NetworkManager), while also
being able to use the common Netplan configuration language, controlling both
(optionally!). Everybody is still free to write their own custom sd-networkd
.network or N-M .nmconnection in /etc/ or configure the daemon through
corresponding D-Bus APIs or GUI/TUI applications, by just not putting any
configuration for a given interface into /etc/netplan/.
Netplan should be considered a unification layer on top of those networking
daemons, which allows Debian as a project to use common language around networking,
e.g. in Debian-Installer [d-i/netcfg !9], [cloud] deployments or [documentation],
independent of the chosen backend daemon (sd-networkd on Cloud & Server,
NetworkManager on Desktop).
Additional benefits of Netplan:
* Already used on Debian Bookworm [cloud] images by default
* Well tested (big autopkgtest suite) and supported by a company
* Lots of knowledge, Q/A & tutorials on the internet, as its being used by
millions of people since many years
* Proven track record, being the default for several Ubuntu LTS releases
* Python dependency considered optional, base installations only need the
"netplan-generator" package
* Solid documentation and a stable API for libnetplan, as of [Netplan 1.0]
This would allow us to combine the best of two worlds, while leaving everybody
with full flexibility for custom configurations.
In addition to that, I'd propose to keep ifupdown in maintenance mode for a
transitional period (Trixie at least), to keep backwards compatibility for
existing systems and give people some time in transitioning to new networking
tools.
Cheers,
Lukas
PS: If you happen to be at Debconf in Korea in a few weeks, please join my
[networking BoF].
[d-i/netcfg !9]
https://salsa.debian.org/installer-team/netcfg/-/merge_requests/9
[cloud]
https://blog.slyon.de/2023/07/10/netplan-and-systemd-networkd-on-debian-bookworm/
[documentation]
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_modern_network_configuration_for_cloud
[Netplan 1.0]
https://blog.slyon.de/2024/04/04/netplan-v1-0-paves-the-way-to-stable-declarative-network-management/
[networking BoF]
https://debconf24.debconf.org/talks/10-past-present-and-future-of-networking-in-debian/