Skip to content

Commit

Permalink
Merge pull request #11561 from ilya-zuyev/ilyaz/fix_ctrd
Browse files Browse the repository at this point in the history
Restore "containerd: upgrade io.containerd.runtime.v1.linux to io.containerd.runc.v2 (suppot cgroup v2)"
  • Loading branch information
ilya-zuyev authored Jun 8, 2021
2 parents 835d9fa + e7bcd5c commit 471207b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
22 changes: 10 additions & 12 deletions pkg/minikube/cruntime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const (
containerdConfigTemplate = `root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0
[grpc]
address = "/run/containerd/containerd.sock"
uid = 0
Expand Down Expand Up @@ -79,16 +78,21 @@ oom_score = 0
enable_selinux = false
sandbox_image = "{{ .PodInfraContainerImage }}"
stats_collect_period = 10
systemd_cgroup = {{ .SystemdCgroup }}
enable_tls_streaming = false
max_container_log_line_size = 16384
[plugins."io.containerd.grpc.v1.cri"]
[plugins."io.containerd.grpc.v1.cri".containerd]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = {{ .SystemdCgroup }}
[plugins.cri.containerd]
snapshotter = "overlayfs"
no_pivot = true
[plugins.cri.containerd.default_runtime]
runtime_type = "io.containerd.runtime.v1.linux"
runtime_engine = ""
runtime_root = ""
runtime_type = "io.containerd.runc.v2"
[plugins.cri.containerd.untrusted_workload_runtime]
runtime_type = ""
runtime_engine = ""
Expand All @@ -107,12 +111,6 @@ oom_score = 0
{{ end -}}
[plugins.diff-service]
default = ["walking"]
[plugins.linux]
shim = "containerd-shim"
runtime = "runc"
runtime_root = ""
no_shim = false
shim_debug = false
[plugins.scheduler]
pause_threshold = 0.02
deletion_threshold = 0
Expand Down
2 changes: 1 addition & 1 deletion test/integration/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func validateContainerdSystemd(ctx context.Context, t *testing.T, profile string
if err != nil {
t.Errorf("failed to get docker cgroup driver. args %q: %v", rr.Command(), err)
}
if !strings.Contains(rr.Output(), "systemd_cgroup = true") {
if !strings.Contains(rr.Output(), "SystemdCgroup = true") {
t.Fatalf("expected systemd cgroup driver, got: %v", rr.Output())
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestInsufficientStorage(t *testing.T) {
verifyClusterState(t, stdout)
}

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

0 comments on commit 471207b

Please sign in to comment.