Skip to content

Commit

Permalink
Update containerd runtime to v2
Browse files Browse the repository at this point in the history
Containerd runtime v1 is deprecated and we use v2 runtime for linuxkit
services. Let's move to runtime v2 in pillar and replace v1 shim with
empty file to reduce space usage. Also version 1 of config.toml is
deprecated, we should move to version 2.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
  • Loading branch information
giggsoff authored and eriknordmark committed Jul 21, 2022
1 parent 9a751e6 commit 2c50626
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
8 changes: 7 additions & 1 deletion pkg/dom0-ztools/rootfs/etc/containerd/config.toml
@@ -1,6 +1,12 @@
version = 2
state = "/run/containerd"
root = "/persist/containerd-system-root"
disabled_plugins = ["cri", "btrfs", "aufs"]
disabled_plugins = [
"io.containerd.grpc.v1.cri",
"io.containerd.snapshotter.v1.btrfs",
"io.containerd.snapshotter.v1.aufs",
"io.containerd.internal.v1.opt"
]

[grpc]
address = "/run/containerd/containerd.sock"
Expand Down
Empty file.
2 changes: 0 additions & 2 deletions pkg/pillar/build-dev.yml
Expand Up @@ -15,8 +15,6 @@ config:
- /:/hostfs
- /persist:/persist:rshared,rbind
- /usr/bin/containerd:/usr/bin/containerd
- /usr/bin/containerd-shim:/usr/bin/containerd-shim
- /usr/bin/containerd-shim-runc-v2:/usr/bin/containerd-shim-runc-v2
net: host
capabilities:
- all
Expand Down
2 changes: 0 additions & 2 deletions pkg/pillar/build.yml
Expand Up @@ -15,8 +15,6 @@ config:
- /:/hostfs
- /persist:/persist:rshared,rbind
- /usr/bin/containerd:/usr/bin/containerd
- /usr/bin/containerd-shim:/usr/bin/containerd-shim
- /usr/bin/containerd-shim-runc-v2:/usr/bin/containerd-shim-runc-v2
net: host
capabilities:
- all
Expand Down
2 changes: 1 addition & 1 deletion pkg/pillar/containerd/containerd.go
Expand Up @@ -51,7 +51,7 @@ const (
// ctrdServicesNamespace containerd namespace for running user containers
ctrdServicesNamespace = "eve-user-apps"
//containerdRunTime - default runtime of containerd
containerdRunTime = "io.containerd.runtime.v1.linux"
containerdRunTime = "io.containerd.runc.v2"
// container config file name
imageConfigFilename = "image-config.json"
// full OCI runtime spec
Expand Down
16 changes: 15 additions & 1 deletion pkg/pillar/rootfs/etc/containerd/user.toml
@@ -1,6 +1,20 @@
version = 2
state = "/run/containerd-user"
root = "/persist/vault/containerd"
disabled_plugins = ["cri", "btrfs", "aufs"]
disabled_plugins = [
"io.containerd.grpc.v1.cri",
"io.containerd.snapshotter.v1.btrfs",
"io.containerd.snapshotter.v1.aufs",
"io.containerd.runtime.v1.linux",
"io.containerd.runtime.v2.task",
"io.containerd.service.v1.tasks-service",
"io.containerd.internal.v1.restart",
"io.containerd.grpc.v1.tasks",
"io.containerd.service.v1.containers-service",
"io.containerd.grpc.v1.containers",
"io.containerd.monitor.v1.cgroups",
"io.containerd.snapshotter.v1.native"
]

[grpc]
address = "/run/containerd-user/containerd.sock"
Expand Down

0 comments on commit 2c50626

Please sign in to comment.