From 0a9734464941167a39c03042f3729490834a1ed8 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Tue, 10 Dec 2024 13:57:28 +0900 Subject: [PATCH] Fix GC failure of CRI plugin Signed-off-by: Kohei Tokunaga --- README.md | 5 ++++- docs/INSTALL.md | 6 ++++++ docs/overview.md | 4 ++++ .../benchmark/config-containerd/etc/containerd/config.toml | 2 ++ script/config/etc/containerd/config.toml | 2 ++ script/demo/config.containerd.toml | 2 ++ script/integration/containerd/entrypoint.sh | 2 ++ 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bffd027d3..0ab8e4f5e 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ version = 2 [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" # Use stargz snapshotter through CRI [plugins."io.containerd.grpc.v1.cri".containerd] @@ -69,7 +71,8 @@ version = 2 disable_snapshot_annotations = false ``` -**Note that `disable_snapshot_annotations = false` is required since containerd > v1.4.2** +> NOTE1: `disable_snapshot_annotations = false` is required since containerd > v1.4.2 +> NOTE2: `root` field of `proxy_plugins` requires containerd >= v1.6.32 or v1.7.16 or v2.0.0 You can try our [prebuilt](/Dockerfile) [KinD](https://github.com/kubernetes-sigs/kind) node image that contains the above configuration. diff --git a/docs/INSTALL.md b/docs/INSTALL.md index bd139287a..c3b556c2b 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -44,9 +44,13 @@ We assume that you are using containerd (> v1.4.2) as a CRI runtime. [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" ``` +> NOTE: `root` field of `proxy_plugins` requires containerd >= v1.6.32 or v1.7.16 or v2.0.0 + - Install fuse ###### centos @@ -145,6 +149,8 @@ We assume that you are using CRI-O newer than https://github.com/cri-o/cri-o/pul [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" ``` - Install fuse diff --git a/docs/overview.md b/docs/overview.md index ef438d8fa..25896a364 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -44,6 +44,8 @@ version = 2 [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" # Use stargz snapshotter through CRI [plugins."io.containerd.grpc.v1.cri".containerd] @@ -51,6 +53,8 @@ version = 2 disable_snapshot_annotations = false ``` +> NOTE: `root` field of `proxy_plugins` requires containerd >= v1.6.32 or v1.7.16 or v2.0.0 + This repo contains [a Dockerfile as a KinD node image](/Dockerfile) which includes the above configuration. ## State directory diff --git a/script/benchmark/config-containerd/etc/containerd/config.toml b/script/benchmark/config-containerd/etc/containerd/config.toml index de5514346..9c83f9170 100644 --- a/script/benchmark/config-containerd/etc/containerd/config.toml +++ b/script/benchmark/config-containerd/etc/containerd/config.toml @@ -4,3 +4,5 @@ version = 2 [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" diff --git a/script/config/etc/containerd/config.toml b/script/config/etc/containerd/config.toml index 8f8259bfc..5f87080cf 100644 --- a/script/config/etc/containerd/config.toml +++ b/script/config/etc/containerd/config.toml @@ -22,3 +22,5 @@ version = 2 [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" diff --git a/script/demo/config.containerd.toml b/script/demo/config.containerd.toml index de5514346..9c83f9170 100644 --- a/script/demo/config.containerd.toml +++ b/script/demo/config.containerd.toml @@ -4,3 +4,5 @@ version = 2 [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" diff --git a/script/integration/containerd/entrypoint.sh b/script/integration/containerd/entrypoint.sh index 0482da65f..c2e3dbc1b 100755 --- a/script/integration/containerd/entrypoint.sh +++ b/script/integration/containerd/entrypoint.sh @@ -243,6 +243,8 @@ if [ "${BUILTIN_SNAPSHOTTER}" != "true" ] ; then [proxy_plugins.stargz] type = "snapshot" address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock" + [proxy_plugins.stargz.exports] + root = "/var/lib/containerd-stargz-grpc/" EOF fi