summaryrefslogtreecommitdiff
path: root/libcontainerd
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-07-27 16:33:00 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-07-27 16:33:00 +0200
commitba2ff69894f7948aa1499f3c26bf3b5171c40b2c (patch)
tree52e64d8353bbeb9ce9a763bb66acff7fe827d249 /libcontainerd
parent2bfc7aedab34758e62ea102acaa2cdca712042c8 (diff)
downloaddocker-ba2ff69894f7948aa1499f3c26bf3b5171c40b2c.tar.gz
libcontainerd: switch generated containerd.toml to v2 (v1 is deprecated)
Before this patch: INFO[2022-07-27T14:30:06.188762628Z] Starting up INFO[2022-07-27T14:30:06.190750725Z] libcontainerd: started new containerd process pid=2028 ... WARN[0000] containerd config version `1` has been deprecated and will be removed in containerd v2.0, please switch to version `2`, see https://github.com/containerd/containerd/blob/main/docs/PLUGINS.md#version-header INFO[2022-07-27T14:30:06.220024286Z] starting containerd revision=10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 version=v1.6.6 With this patch: INFO[2022-07-27T14:28:04.025543517Z] Starting up INFO[2022-07-27T14:28:04.027447105Z] libcontainerd: started new containerd process pid=1377 ... INFO[2022-07-27T14:28:04.054483270Z] starting containerd revision=10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 version=v1.6.6 And the generated /var/run/docker/containerd/containerd.toml: ```toml disabled_plugins = ["io.containerd.grpc.v1.cri"] imports = [] oom_score = 0 plugin_dir = "" required_plugins = [] root = "/var/lib/docker/containerd/daemon" state = "/var/run/docker/containerd/daemon" temp = "" version = 2 [cgroup] path = "" [debug] address = "/var/run/docker/containerd/containerd-debug.sock" format = "" gid = 0 level = "debug" uid = 0 [grpc] address = "/var/run/docker/containerd/containerd.sock" gid = 0 max_recv_message_size = 16777216 max_send_message_size = 16777216 tcp_address = "" tcp_tls_ca = "" tcp_tls_cert = "" tcp_tls_key = "" uid = 0 [metrics] address = "" grpc_histogram = false [plugins] [proxy_plugins] [stream_processors] [timeouts] [ttrpc] address = "" gid = 0 uid = 0 ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'libcontainerd')
-rw-r--r--libcontainerd/supervisor/remote_daemon.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcontainerd/supervisor/remote_daemon.go b/libcontainerd/supervisor/remote_daemon.go
index 2f38f1505c..60ec588ac6 100644
--- a/libcontainerd/supervisor/remote_daemon.go
+++ b/libcontainerd/supervisor/remote_daemon.go
@@ -62,8 +62,9 @@ func Start(ctx context.Context, rootDir, stateDir string, opts ...DaemonOpt) (Da
rootDir: rootDir,
stateDir: stateDir,
Config: config.Config{
- Root: filepath.Join(rootDir, "daemon"),
- State: filepath.Join(stateDir, "daemon"),
+ Version: 2,
+ Root: filepath.Join(rootDir, "daemon"),
+ State: filepath.Join(stateDir, "daemon"),
},
Plugins: make(map[string]interface{}),
daemonPid: -1,