From 5160e7e20b4f97c12a578aa355913d02e5d28b2a Mon Sep 17 00:00:00 2001 From: Kay Yan Date: Tue, 5 Dec 2023 23:00:55 +0800 Subject: [PATCH] using ctr pull instead of nerdctl (#10687) --- roles/download/defaults/main/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/download/defaults/main/main.yml b/roles/download/defaults/main/main.yml index 27a8ef79c59..1e180028506 100644 --- a/roles/download/defaults/main/main.yml +++ b/roles/download/defaults/main/main.yml @@ -57,7 +57,8 @@ download_retries: 4 docker_image_pull_command: "{{ docker_bin_dir }}/docker pull" docker_image_info_command: "{{ docker_bin_dir }}/docker images -q | xargs -i {{ '{{' }} docker_bin_dir }}/docker inspect -f {% raw %}'{{ '{{' }} if .RepoTags }}{{ '{{' }} join .RepoTags \",\" }}{{ '{{' }} end }}{{ '{{' }} if .RepoDigests }},{{ '{{' }} join .RepoDigests \",\" }}{{ '{{' }} end }}' {% endraw %} {} | tr '\n' ','" nerdctl_image_info_command: "{{ bin_dir }}/nerdctl -n k8s.io images --format '{% raw %}{{ .Repository }}:{{ .Tag }}{% endraw %}' 2>/dev/null | grep -v ^:$ | tr '\n' ','" -nerdctl_image_pull_command: "{{ bin_dir }}/nerdctl -n k8s.io pull --quiet" +# Using the ctr instead of nerdctl to workdaround the https://github.com/kubernetes-sigs/kubespray/issues/10670 +nerdctl_image_pull_command: "{{ bin_dir }}/ctr -n k8s.io images pull" crictl_image_info_command: "{{ bin_dir }}/crictl images --verbose | awk -F ': ' '/RepoTags|RepoDigests/ {print $2}' | tr '\n' ','" crictl_image_pull_command: "{{ bin_dir }}/crictl pull"