DHCP and network issue meta-ish bug/feature
We have a lot of issues that are because of inadequate support of DHCP and network connections. There are a few ways forward.
Desktop images, those with KDE/LXQt/MATE (etc), should probably use NetworkManager and start NM on boot. I've done some testing with aarch64 and ppc media and it works great. NM implements the logic of "determine what interfaces have a link", "try and bring up v4 and v6 and see if either have actual network connectivity, not just link-local", and so on, that we would otherwise need to reimplement ourselves.
The Horizon install image, that is -inst
, may not need NetworkManager, but read on why I think it should probably do it anyway.
If we make dhcpcd setuid on live media only (not on real systems!), the security risk is low (it's a live system, nominally booted off a read-only CD) and allows the wizard to try DHCP without the wizard itself being setuid. This avoids us having to add the setuid-ok flag on the wizard which would then make it setuid-able even in other situations or on other platforms (or make a big ugly #ifdef
tree).
When dhcpcd is setuid, and NM has already achieved a DHCP lease on the desired interface, dhcpcd is intelligent enough to see the nm management and return immediately with "lease already obtained". It's a great experience for the user because they aren't waiting any time for the interface to come up or obtain an IP; the Next button is nearly instantaneously available.
The other concern is that we really should be enabling chronyd on systems. It should be part of the default install, and perhaps even base/text-only installs. This is to support SoCs with no RTC, older machines with flat clock batteries, etc etc. I see no reason not to do this. And this is required to connect to the HTTPS servers in Horizon, hence why I think nm should be brought up on the -inst
image as well. This way, chronyd can "start early" and fix up the clock before the wizard even begins.
So, to fix this bug, and all the other bugs related, this is my proposal:
- add
NetworkManager
to default run level of install images, to bring up network for live desktop; - add
chronyd
to default run level of all images, even rootfs, to make sure RTC has correct time; - setuid
dhcpcd
on live media, to ensure DHCP lease can be acquired by System Installation without setuid; - setuid
horizon-run-qt5
so thehorizon-ui
script can be run as thelive
user.