From 0217abce24fcded0f8fefc1dab73d3f18eb151a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 13 Dec 2021 11:20:22 +0100 Subject: [PATCH] kata-deploy: Deal with empty containerd conf file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As containerd can properly run without having a existent `/etc/containerd/config.toml` file (it'd run using the default cobnfiguration), let's explicitly create the file in those cases. This will avoid issues on ammending runtime classes to a non-existent file. Fixes: #3229 Signed-off-by: Fabiano FidĂȘncio Tested-by: Jakob Naucke --- tools/packaging/kata-deploy/scripts/kata-deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index abdfc6777b..0d0afcece7 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -266,6 +266,11 @@ function main() { containerd_conf_file="${containerd_conf_tmpl_file}" containerd_conf_file_backup="${containerd_conf_file}.bak" + else + # runtime == containerd + if [ ! -f "$containerd_conf_file" ]; then + containerd config default > "$containerd_conf_file" + fi fi action=${1:-}