k0sproject / k0s

k0s - The Zero Friction Kubernetes
https://docs.k0sproject.io
Other
3.15k stars 353 forks source link

Verify `NetworkManager-wait-online.service` or `systemd-networkd-wait-online.service` are enabled #1177

Open e-minguez opened 2 years ago

e-minguez commented 2 years ago

Is your feature request related to a problem? Please describe. Using Armbian, neither NetworkManager-wait-online.service nor systemd-networkd-wait-online.service, so even if the k0scontroller systemd unit has:

After=network-online.target 
Wants=network-online.target

It has no effect and the k0scontroller service fails to start. It works if manually perform a 'systemctl daemon-reload' and restart the k0scontroller service after the operating system completely boots.

Describe the solution you'd like Something that checks if NetworkManager or networkd is enabled, then check if the corresponding wait-online service is enabled and enable it otherwise.

Describe alternatives you've considered Check the service and warn the user but not enable it.

Additional context https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

xinfengliu commented 2 years ago

Thanks for raising this issue. Do you mean the systemd-networkd-wait-online.service in Armbian is not enabled by default?

e-minguez commented 2 years ago

Thanks for raising this issue. Do you mean the systemd-networkd-wait-online.service in Armbian is not enabled by default?

Correct.

xinfengliu commented 2 years ago

Not very clear about the your use cases/concerns, is it because it is difficult to enable that wait service in Armbian before provisioning k0s? After all, in most x64 linux distributions, the correspondent wait service is enabled by default and we don't worry about it.

e-minguez commented 2 years ago

The point I'm trying to make is the k0scontroller service requieres the 'wait' service to be enabled hence the installer should either check it and warn the user if that's not the case or enable it.

jnummelin commented 2 years ago

The issue is marked as stale since no activity has been recorded in 30 days

github-actions[bot] commented 2 years ago

The issue is marked as stale since no activity has been recorded in 30 days