[systemd] really wait for network to come online (#1665)

Wants= is required to actually set the dependency on network-online.service
After= is required or k3s.service will be started at the same time as network-online.service

In network environments with slow DHCP, both are required to ensure valid network configuration for k3s

Signed-off-by: Adam Farden <adam@farden.cz>
pull/2457/head
Adam Farden 2020-09-26 10:44:06 +02:00 committed by Brad Davidson
parent 052d283a37
commit f58f89d327
3 changed files with 3 additions and 0 deletions

View File

@ -643,6 +643,7 @@ create_systemd_service_file() {
[Unit]
Description=Lightweight Kubernetes
Documentation=https://k3s.io
After=network-online.target
Wants=network-online.target
After=network-online.target

View File

@ -2,6 +2,7 @@
Description=Lightweight Kubernetes
Documentation=https://k3s.io
After=network-online.target
Wants=network-online.target
[Service]
Type=notify

View File

@ -648,6 +648,7 @@ create_systemd_service_file() {
[Unit]
Description=Lightweight Kubernetes
Documentation=https://k3s.io
After=network-online.target
Wants=network-online.target
After=network-online.target
Conflicts=${conflicts}