Skip to content

Commit 471207b

Browse files
authored
Merge pull request #11561 from ilya-zuyev/ilyaz/fix_ctrd
Restore "containerd: upgrade io.containerd.runtime.v1.linux to io.containerd.runc.v2 (suppot cgroup v2)"
2 parents 835d9fa + e7bcd5c commit 471207b

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

pkg/minikube/cruntime/containerd.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const (
4949
containerdConfigTemplate = `root = "/var/lib/containerd"
5050
state = "/run/containerd"
5151
oom_score = 0
52-
5352
[grpc]
5453
address = "/run/containerd/containerd.sock"
5554
uid = 0
@@ -79,16 +78,21 @@ oom_score = 0
7978
enable_selinux = false
8079
sandbox_image = "{{ .PodInfraContainerImage }}"
8180
stats_collect_period = 10
82-
systemd_cgroup = {{ .SystemdCgroup }}
8381
enable_tls_streaming = false
8482
max_container_log_line_size = 16384
83+
84+
[plugins."io.containerd.grpc.v1.cri"]
85+
[plugins."io.containerd.grpc.v1.cri".containerd]
86+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
87+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
88+
runtime_type = "io.containerd.runc.v2"
89+
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
90+
SystemdCgroup = {{ .SystemdCgroup }}
91+
8592
[plugins.cri.containerd]
8693
snapshotter = "overlayfs"
87-
no_pivot = true
8894
[plugins.cri.containerd.default_runtime]
89-
runtime_type = "io.containerd.runtime.v1.linux"
90-
runtime_engine = ""
91-
runtime_root = ""
95+
runtime_type = "io.containerd.runc.v2"
9296
[plugins.cri.containerd.untrusted_workload_runtime]
9397
runtime_type = ""
9498
runtime_engine = ""
@@ -107,12 +111,6 @@ oom_score = 0
107111
{{ end -}}
108112
[plugins.diff-service]
109113
default = ["walking"]
110-
[plugins.linux]
111-
shim = "containerd-shim"
112-
runtime = "runc"
113-
runtime_root = ""
114-
no_shim = false
115-
shim_debug = false
116114
[plugins.scheduler]
117115
pause_threshold = 0.02
118116
deletion_threshold = 0

test/integration/docker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func validateContainerdSystemd(ctx context.Context, t *testing.T, profile string
114114
if err != nil {
115115
t.Errorf("failed to get docker cgroup driver. args %q: %v", rr.Command(), err)
116116
}
117-
if !strings.Contains(rr.Output(), "systemd_cgroup = true") {
117+
if !strings.Contains(rr.Output(), "SystemdCgroup = true") {
118118
t.Fatalf("expected systemd cgroup driver, got: %v", rr.Output())
119119
}
120120
}

test/integration/status_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestInsufficientStorage(t *testing.T) {
6565
verifyClusterState(t, stdout)
6666
}
6767

68-
// runStatusCmd runs the status command and returns stdout
68+
// runStatusCmd runs the status command expecting non-zero exit code and returns stdout
6969
func runStatusCmd(ctx context.Context, t *testing.T, profile string, increaseEnv bool) []byte {
7070
// make sure minikube status shows insufficient storage
7171
c := exec.CommandContext(ctx, Target(), "status", "-p", profile, "--output=json", "--layout=cluster")
@@ -76,7 +76,7 @@ func runStatusCmd(ctx context.Context, t *testing.T, profile string, increaseEnv
7676
rr, err := Run(t, c)
7777
// status exits non-0 if status isn't Running
7878
if err == nil {
79-
t.Fatalf("expected command to fail, but it succeeded: %v\n%v", rr.Command(), err)
79+
t.Fatalf("expected command to fail, but it succeeded: %v", rr.Command())
8080
}
8181
return rr.Stdout.Bytes()
8282
}

0 commit comments

Comments
 (0)