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)"pull/11610/head
commit
471207b1d8
|
@ -49,7 +49,6 @@ const (
|
|||
containerdConfigTemplate = `root = "/var/lib/containerd"
|
||||
state = "/run/containerd"
|
||||
oom_score = 0
|
||||
|
||||
[grpc]
|
||||
address = "/run/containerd/containerd.sock"
|
||||
uid = 0
|
||||
|
@ -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 = ""
|
||||
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue