From a629db023c565c48394fccb29c3b1f4d7c1541cf Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Wed, 16 Jun 2021 11:37:04 +0200 Subject: [PATCH] Fail to start k3s if nm-cloud-setup is enabled Signed-off-by: Manuel Buil --- install.sh | 1 + k3s.service | 1 + package/rpm/install.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 2c33166f10..9909c07119 100755 --- a/install.sh +++ b/install.sh @@ -744,6 +744,7 @@ TasksMax=infinity TimeoutStartSec=0 Restart=always RestartSec=5s +ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe overlay ExecStart=${BIN_DIR}/k3s \\ diff --git a/k3s.service b/k3s.service index 6ea1f8a4a5..7f8c9ec89c 100644 --- a/k3s.service +++ b/k3s.service @@ -9,6 +9,7 @@ Type=notify EnvironmentFile=-/etc/default/%N EnvironmentFile=-/etc/sysconfig/%N EnvironmentFile=-/etc/systemd/system/k3s.service.env +ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' ExecStart=/usr/local/bin/k3s server KillMode=process Delegate=yes diff --git a/package/rpm/install.sh b/package/rpm/install.sh index 83bb004abc..d2c9c5d069 100755 --- a/package/rpm/install.sh +++ b/package/rpm/install.sh @@ -669,6 +669,7 @@ TasksMax=infinity TimeoutStartSec=0 Restart=always RestartSec=5s +ExecStartPre=/bin/sh -xc '! /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service' ExecStartPre=-/sbin/modprobe br_netfilter ExecStartPre=-/sbin/modprobe overlay ExecStart=${BIN_DIR}/k3s ${CMD_K3S} \$${CMD_K3S_ARGS_VAR}