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

Convert usages of nerdctl and crt to crictl #11001

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KubeKyrie
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #10907

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Convert usages of nerdctl and crt to crictl

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 11, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: KubeKyrie
Once this PR has been reviewed and has the lgtm label, please assign liupeng0518 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 11, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @KubeKyrie. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 11, 2024
@KubeKyrie KubeKyrie marked this pull request as draft March 11, 2024 15:19
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 11, 2024
@yankay
Copy link
Member

yankay commented Mar 12, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 12, 2024
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
@KubeKyrie KubeKyrie marked this pull request as ready for review April 1, 2024 10:29
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2024
@KubeKyrie
Copy link
Contributor Author

One question is that crictl is not yet a complete replacement for ctr due to a known issue #10670, as this PR ci failure shows.

And on the other hand, crictl does not support load/save image.

@yankay @VannTen @mzaian Could u give some help please?
Thanks.

@VannTen
Copy link
Contributor

VannTen commented Apr 2, 2024 via email

@KubeKyrie
Copy link
Contributor Author

One question is that crictl is not yet a complete replacement for ctr due to a known issue #10670, as this PR ci failure shows.
The CI shows nerdctl failing, so not sure of the relation ? ```

As discussed in #10907, we use crictl uniformly to pull images.
But just as this CI failure shows:
we first pull image by

crictl pull quay.m.daocloud.io/kubespray/k8s-netchecker-server:v1.2.2

then image save

nerdctl -n k8s.io image save -o  xxx.tar quay.m.daocloud.io/kubespray/k8s-netchecker-server:v1.2.2

an error occurs:

FATA[0000] failed to get reader: content digest sha256:16708e34354589f10d0f402e59f7251e0a685a98c1497dffbd84cce4a11a62d6: not found

This is a known issue #10670, and workaround way is to use ctr to pull image. So I am not sure how to handle it.

@yckaolalala
Copy link
Contributor

Can convert all save/load image operations to only use skopeo ?

- name: Set image save/load command for docker
  set_fact:
    image_save_command: "{{ docker_bin_dir }}/docker save {{ image_reponame }} | gzip -{{ download_compress }} > {{ image_path_final }}"
    image_load_command: "{{ docker_bin_dir }}/docker load < {{ image_path_final }}"
  when: container_manager == 'docker'

- name: Set image save/load command for containerd
  set_fact:
    image_save_command: "{{ bin_dir }}/nerdctl -n k8s.io image save -o {{ image_path_final }} {{ image_reponame }}"
    image_load_command: "{{ bin_dir }}/nerdctl -n k8s.io image load < {{ image_path_final }}"
  when: container_manager == 'containerd'

- name: Set image save/load command for crio
  set_fact:
    image_save_command: "{{ bin_dir }}/skopeo copy containers-storage:{{ image_reponame }} docker-archive:{{ image_path_final }} 2>/dev/null"
    image_load_command: "{{ bin_dir }}/skopeo copy docker-archive:{{ image_path_final }} containers-storage:{{ image_reponame }} 2>/dev/null"
  when: container_manager == 'crio'

@VannTen
Copy link
Contributor

VannTen commented Apr 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert usages of nerdctl and crt to crictl
5 participants