local-up-cluster.sh: support more recent containerd like 2.2

The kubekins image got updated from containerd 1.7 to 2.2, which broke
local-up-cluster.sh in the CI because more recent containerd uses single
quotation marks around strings instead of double quotation marks as before. The
search/replaced with sed no longer matched, causing containerd to fail mounting
overlayfs on the default /var/lib/containerd. We have to use the emptyDir host
mount under /docker-graph.

The fix is to relax the search term slightly so that it accepts both kinds of
quotation marks.
This commit is contained in:
Patrick Ohly
2025-12-10 08:44:59 +01:00
parent 17044946fa
commit 26cf4979fa

View File

@@ -1388,8 +1388,8 @@ if [[ "${KUBETEST_IN_DOCKER:-}" == "true" ]]; then
# configure and start containerd
echo "configuring containerd"
containerd config default > /etc/containerd/config.toml
sed -ie 's|root = "/var/lib/containerd"|root = "/docker-graph/containerd/daemon"|' /etc/containerd/config.toml
sed -ie 's|state = "/run/containerd"|state = "/var/run/docker/containerd/daemon"|' /etc/containerd/config.toml
sed -ie 's|root = ./var/lib/containerd.|root = "/docker-graph/containerd/daemon"|' /etc/containerd/config.toml
sed -ie 's|state = ./run/containerd.|state = "/var/run/docker/containerd/daemon"|' /etc/containerd/config.toml
sed -ie 's|enable_cdi = false|enable_cdi = true|' /etc/containerd/config.toml
echo "starting containerd"