Skip to content

[regression in master] containerd config v2 and v3 are mixed up #4194

@AkihiroSuda

Description

@AkihiroSuda

The main containerd config is now version 3

Our config is still version 2:

if [ "${LIMA_CIDATA_CONTAINERD_SYSTEM}" = 1 ]; then
if [ ! -e /etc/containerd/config.toml ]; then
mkdir -p /etc/containerd
cat >"/etc/containerd/config.toml" <<EOF
version = 2
# TODO: remove imports after upgrading containerd to v2.2, as
# conf.d is set by default since v2.2.
imports = ['/etc/containerd/conf.d/*.toml']
[plugins."io.containerd.grpc.v1.cri"]
enable_cdi = true
[proxy_plugins]
[proxy_plugins."stargz"]
type = "snapshot"
address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock"
EOF
fi
if [ ! -e /etc/buildkit/buildkitd.toml ]; then
mkdir -p /etc/buildkit
cat >"/etc/buildkit/buildkitd.toml" <<EOF
[worker.oci]
enabled = false
[worker.containerd]
enabled = true
namespace = "${CONTAINERD_NAMESPACE}"
snapshotter = "${CONTAINERD_SNAPSHOTTER}"
EOF
fi
systemctl enable --now containerd buildkit stargz-snapshotter
fi
if [ "${LIMA_CIDATA_CONTAINERD_USER}" = 1 ]; then
if [ ! -e "${LIMA_CIDATA_HOME}/.config/containerd/config.toml" ]; then
mkdir -p "${LIMA_CIDATA_HOME}/.config/containerd"
cat >"${LIMA_CIDATA_HOME}/.config/containerd/config.toml" <<EOF
version = 2
[plugins."io.containerd.grpc.v1.cri"]
enable_cdi = true
[proxy_plugins]
[proxy_plugins."fuse-overlayfs"]
type = "snapshot"
address = "/run/user/${LIMA_CIDATA_UID}/containerd-fuse-overlayfs.sock"
[proxy_plugins."stargz"]
type = "snapshot"
address = "/run/user/${LIMA_CIDATA_UID}/containerd-stargz-grpc/containerd-stargz-grpc.sock"
EOF
chown -R "${LIMA_CIDATA_USER}" "${LIMA_CIDATA_HOME}/.config"
fi

The configuration was not read, because it used the old config for config version 2 (it is now config version 3)

Doesn't seem true

Originally posted by @AkihiroSuda in #4185 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingkubernetesregressionUsed to work but has been broken

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions