diff --git a/magnum/drivers/common/templates/kubernetes/fragments/install-cri.sh b/magnum/drivers/common/templates/kubernetes/fragments/install-cri.sh index f60efe47a8..61204fe47a 100644 --- a/magnum/drivers/common/templates/kubernetes/fragments/install-cri.sh +++ b/magnum/drivers/common/templates/kubernetes/fragments/install-cri.sh @@ -10,6 +10,9 @@ ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost" if [ "${CONTAINER_RUNTIME}" = "containerd" ] ; then $ssh_cmd systemctl disable docker.service docker.socket $ssh_cmd systemctl stop docker.service docker.socket + if $ssh_cmd [ -f /etc/containerd/config.toml ] ; then + $ssh_cmd sed -i 's/bin_dir.*$/bin_dir\ =\ \""\/opt\/cni\/bin\/"\"/' /etc/containerd/config.toml + fi if [ -z "${CONTAINERD_TARBALL_URL}" ] ; then CONTAINERD_TARBALL_URL="https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/cri-containerd-cni-${CONTAINERD_VERSION}-linux-amd64.tar.gz" fi