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

ctr cann't export image pulled by crictl #1636

Open
johnsonisjiang opened this issue Oct 16, 2024 · 3 comments
Open

ctr cann't export image pulled by crictl #1636

johnsonisjiang opened this issue Oct 16, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@johnsonisjiang
Copy link

What happened:

when in containerd environment, if we use old version crictl and ctr, no matter the images pulled by ctr or crictl, the ctr can export the image successfully.
But when crictl >= 1.24.0, the issue happens, the image pulled by crictl, when use ctr export, it will failed; For comparison, images pulled by ctr have no problem.

ctr export image which pulled by crictl , will show error message

ctr -n k8s.io images export my_image.tar sha256:af282666faecdad41485bea589ff4c6f25af2abbf76c7b8dff24e7df2570798e
ctr: failed to get reader: content digest sha256:10d56570098259f40562e64b4d5ad9374c94af3e00688d62827e8c79c47d9617: not found

the crictl version: 1.25.0, ctr version 1.7.20

What you expected to happen:

I have another env (crictl:1.19.0; ctr:1.3.7), in this machine, images pulled by crictl can be exported by ctr successfully.
I think there maybe some changes between crictl versions, which changes the export perform.
Would you please tell me how to export images pulled by new version crictl?

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

the crictl version: 1.25.0, ctr version 1.7.20

@johnsonisjiang johnsonisjiang added kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Oct 16, 2024
@saschagrunert
Copy link
Member

THank you for opening this report @johnsonisjiang. Both crictl v1.19.0 and v1.25.0 are end of life. crictl also just invokes the RPC to pull the image, so the main issue seems to be on the containerd side here.

@johnsonisjiang
Copy link
Author

THank you for opening this report @johnsonisjiang. Both crictl v1.19.0 and v1.25.0 are end of life. crictl also just invokes the RPC to pull the image, so the main issue seems to be on the containerd side here.

Thanks, I got the reason, if the "/etc/containerd/config.toml"->"discard_unpacked_layers" was true, the image pulled by crictl may exported failed, but it have no effect on images pulled by ctr(ctr use contained api not grpc with containerd, default was false)

@saschagrunert
Copy link
Member

@johnsonisjiang unfortunately I don't think there is much we can do from a cri-tools perspective.

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. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

2 participants