From 9637c1fdf933166f7c59c26ea5b9fd2ae23f76b8 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 24 Nov 2020 12:48:41 -0800 Subject: [PATCH 1/3] restart inner docker daemon using systemd --- pkg/provision/buildroot.go | 4 ++++ pkg/provision/ubuntu.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkg/provision/buildroot.go b/pkg/provision/buildroot.go index e0d80c0ba94d..bb9651e12f9e 100644 --- a/pkg/provision/buildroot.go +++ b/pkg/provision/buildroot.go @@ -76,8 +76,12 @@ Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target minikube-automount.service docker.socket Requires= minikube-automount.service docker.socket +StartLimitBurst=5 +StartLimitIntervalSec=60 [Service] +Restart=always +RestartSec=1 Type=notify ` if noPivot { diff --git a/pkg/provision/ubuntu.go b/pkg/provision/ubuntu.go index 64b4b29a54a6..0fc11878b400 100644 --- a/pkg/provision/ubuntu.go +++ b/pkg/provision/ubuntu.go @@ -79,8 +79,12 @@ BindsTo=containerd.service After=network-online.target firewalld.service containerd.service Wants=network-online.target Requires=docker.socket +StartLimitBurst=5 +StartLimitIntervalSec=60 [Service] +Restart=always +RestartSec=1 Type=notify ` if noPivot { From 46ea96d638862f67bf21e16069ef3b99e922095d Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 24 Nov 2020 13:00:33 -0800 Subject: [PATCH 2/3] restart on failure --- pkg/provision/buildroot.go | 2 +- pkg/provision/ubuntu.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/provision/buildroot.go b/pkg/provision/buildroot.go index bb9651e12f9e..84b64723e19a 100644 --- a/pkg/provision/buildroot.go +++ b/pkg/provision/buildroot.go @@ -80,7 +80,7 @@ StartLimitBurst=5 StartLimitIntervalSec=60 [Service] -Restart=always +Restart=on-failure RestartSec=1 Type=notify ` diff --git a/pkg/provision/ubuntu.go b/pkg/provision/ubuntu.go index 0fc11878b400..bd4dd64ba92d 100644 --- a/pkg/provision/ubuntu.go +++ b/pkg/provision/ubuntu.go @@ -83,7 +83,7 @@ StartLimitBurst=5 StartLimitIntervalSec=60 [Service] -Restart=always +Restart=on-failure RestartSec=1 Type=notify ` From 8ae3bda7d6565c7aa889f411e67b1dd192966864 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 24 Nov 2020 15:13:56 -0800 Subject: [PATCH 3/3] use docker recommendation --- pkg/provision/buildroot.go | 7 +++---- pkg/provision/ubuntu.go | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg/provision/buildroot.go b/pkg/provision/buildroot.go index 84b64723e19a..be0546daff0c 100644 --- a/pkg/provision/buildroot.go +++ b/pkg/provision/buildroot.go @@ -76,13 +76,12 @@ Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target minikube-automount.service docker.socket Requires= minikube-automount.service docker.socket -StartLimitBurst=5 -StartLimitIntervalSec=60 [Service] -Restart=on-failure -RestartSec=1 Type=notify +Restart=on-failure +StartLimitBurst=3 +StartLimitIntervalSec=60 ` if noPivot { klog.Warning("Using fundamentally insecure --no-pivot option") diff --git a/pkg/provision/ubuntu.go b/pkg/provision/ubuntu.go index bd4dd64ba92d..e4db0d6c8bdb 100644 --- a/pkg/provision/ubuntu.go +++ b/pkg/provision/ubuntu.go @@ -79,13 +79,12 @@ BindsTo=containerd.service After=network-online.target firewalld.service containerd.service Wants=network-online.target Requires=docker.socket -StartLimitBurst=5 -StartLimitIntervalSec=60 [Service] -Restart=on-failure -RestartSec=1 Type=notify +Restart=on-failure +StartLimitBurst=3 +StartLimitIntervalSec=60 ` if noPivot { klog.Warning("Using fundamentally insecure --no-pivot option")