Skip to content

Ctr image import --local=false doesn't create corresponding image #9039

@elpdt852

Description

@elpdt852

Description

When using ctr image import --local=false to depend on the newer transfer service which uses the unpacker under the hood, it successfully transfers the image into the content store but it is missing a client.ImageService().Create(...) call. I assume this is the client's responsibility and not pkg/transfer/local/import.go?

Without this step, kubernetes won't be able to discover the image even though it is visible with ctr image ls or nerdctl image ls.

Steps to reproduce the issue

  1. ctr image import --local=false ./oci.tar
  2. Run image via CRI interface, e.g. crictl or kubernetes.
  3. Error in containerd log failed to resolve image ... here: https://github.com/containerd/containerd/blob/v1.7.2/pkg/cri/server/container_create.go#L96-L99

Describe the results you received and expected

Image imported with --local=false to be runnable via CRI

What version of containerd are you using?

v1.7.2

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions