Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using containerd container runtime, kubespray will always download container images even if present on system #8892

Closed
timgriffiths opened this issue May 30, 2022 · 1 comment · Fixed by #8894
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@timgriffiths
Copy link

So I think the bug relates to the nerdctl command string you are trying to build here:

https://github.com/kubernetes-sigs/kubespray/blob/master/roles/download/defaults/main.yml#L51

I don't think your escaping the curly brackets correctly as you string looks like this when ansible tries to execute this line
"cmd": "/usr/local/bin/nerdctl -n k8s.io images --format '{{ '{{' }} .Repository {{ '}}' }}:{{ '{{' }} .Tag {{ '}}' }}' 2>/dev/null | grep -v ^:$ | tr '\n' ','",

I believe the code fix should be

nerdctl_image_info_command: "{{ bin_dir }}/nerdctl -n k8s.io images --format '{% raw %}{{ .Repository }}:{{ .Tag }}{% endraw %}' 2>/dev/null | grep -v ^:$ | tr '\n' ','"

Environment:

  • Cloud provider or hardware configuration:
    On Premis

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
    Centos 7

  • Version of Ansible (ansible --version):

ansible 2.8.5

  • Version of Python (python --version):

python version = 2.7.5
Kubespray version (commit) (git rev-parse --short HEAD):
master

Network plugin used:
calico

@timgriffiths timgriffiths added the kind/bug Categorizes issue or PR as related to a bug. label May 30, 2022
@liupeng0518
Copy link
Member

open a pr #8894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants