From f9dd8dedc87c443dc48e2a52d1469f3b577289c6 Mon Sep 17 00:00:00 2001 From: cryptk Date: Mon, 22 Jul 2019 17:03:36 -0500 Subject: [PATCH 1/2] Add a little extra delay between restart attempts This extra delay prevents systemd from determining that the service is restarting "too quickly". --- install.sh | 1 + k3s.service | 1 + 2 files changed, 2 insertions(+) diff --git a/install.sh b/install.sh index c9af7fcdd1..5206042bda 100755 --- a/install.sh +++ b/install.sh @@ -527,6 +527,7 @@ LimitCORE=infinity TasksMax=infinity TimeoutStartSec=0 Restart=always +RestartSec=5s [Install] WantedBy=multi-user.target diff --git a/k3s.service b/k3s.service index 472f87df1d..94abfb771a 100644 --- a/k3s.service +++ b/k3s.service @@ -15,6 +15,7 @@ LimitCORE=infinity TasksMax=infinity TimeoutStartSec=0 Restart=always +RestartSec=5s [Install] WantedBy=multi-user.target From 612b2c159695ff1ee2364b2366ed7f4f267456dd Mon Sep 17 00:00:00 2001 From: Chris Jowett Date: Fri, 26 Jul 2019 13:05:54 -0500 Subject: [PATCH 2/2] Add RestartSec to ansible systemd unit files --- contrib/ansible/roles/k3s/master/templates/k3s.service.j2 | 1 + contrib/ansible/roles/k3s/node/templates/k3s.service.j2 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 b/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 index 32d1a3a880..d8b9c18c14 100644 --- a/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 +++ b/contrib/ansible/roles/k3s/master/templates/k3s.service.j2 @@ -13,6 +13,7 @@ LimitNPROC=infinity LimitCORE=infinity TasksMax=infinity Restart=always +RestartSec=5s [Install] WantedBy=multi-user.target diff --git a/contrib/ansible/roles/k3s/node/templates/k3s.service.j2 b/contrib/ansible/roles/k3s/node/templates/k3s.service.j2 index fffd727044..d66d4722fd 100644 --- a/contrib/ansible/roles/k3s/node/templates/k3s.service.j2 +++ b/contrib/ansible/roles/k3s/node/templates/k3s.service.j2 @@ -11,5 +11,7 @@ LimitNPROC=infinity LimitCORE=infinity TasksMax=infinity Restart=always +RestartSec=5s + [Install] WantedBy=multi-user.target