Skip to content

Error nerdctl commit, "failed to create a tmp single-platform image..., content digest ... not found" #3415

Closed

Description

@jooseop

Description

I am using Kubernetes, and the container runtime is containerd.
I want to commit an image from within a pod.

Inside the pod, nerdctl is installed, and the pod has mounted the node's /run/containerd and /var/lib/containerd directories as hostPath volumes.

When I try to commit using nerdctl, I encounter the following error:

"time="2024-09-05T08:09:43Z" level=fatal msg="failed to create a tmp single-platform image "registry:tag-tmp-reduced-platform": content digest sha256:602d8ad51b8130f3fcd71cb936dea612ebc799666136abf2e5914585b3178a4a: not found"
The registry and tag seem fine.
I've also tried pulling the base image before running nerdctl.
I already attempted using the --unpack=false flag as well.

Do you know of any solution for this issue?

Steps to reproduce the issue

No response

Describe the results you received and expected

complete commit

What version of nerdctl are you using?

nerdctl commit

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

Others

Host information

No response

Activity

  1. apostasie commented on Sep 5, 2024

    @apostasie
    Contributor

    Possibly a duplicate of #827 ?

  2. added
    duplicate
    and removed
    kind/unconfirmed-bug-claim
    on Sep 5, 2024
  3. jooseop commented on Sep 6, 2024

    @jooseop
    Author

    "failed to create a tmp single-platform image"
    -> Solved issue, using the '--all-platforms' option

    However, " content digest ... not found" still remains.

  4. apostasie commented on Sep 6, 2024

    @apostasie
    Contributor

    @AkihiroSuda we need to fix this.
    We got many reports / variants of it.

    I believe this is flaky - sometimes the Kube test would pass, sometimes it would fail.

    Someone mentioned it could be containerd garbage collecting layers.

    Tagging @lingdie who did some work already on this, and @fahedouch who might have an idea what's going on (IIRC he mentioned before that this was happening as well outside of kube?).

    Anyone has a good lead to start investigating? Or at least a simpler way to repro without Kube?

  5. jooseop commented on Sep 6, 2024

    @jooseop
    Author

    There are issues when committing a pod running an image built from a Dockerfile.
    Could the issue be caused by the image built from the Dockerfile?
    Committing a pod running an image from NVIDIA GPU Cloud worked fine

  6. apostasie commented on Sep 6, 2024

    @apostasie
    Contributor

    There are issues when committing a pod running an image built from a Dockerfile. Could the issue be caused by the image built from the Dockerfile? Committing a pod running an image from NVIDIA GPU Cloud worked fine

    Unfortunately, we reproduced with prebuilt images - so I would say that this is unlikely - but then again, we don't know at this point...

  7. lingdie commented on Sep 6, 2024

    @lingdie
    Contributor

    I'm not sure, but I do know that crt can push images that have been committed using nerdctl.

  8. jooseop commented on Sep 9, 2024

    @jooseop
    Author

    Steps

    1. nerdctl --namespace k8s.io pull --unpack=false {pod image}
    2. nerdctl --namespace k8s.io commit {nerdctl pod container id}
    3. nerdctl push --all-platforms

    Error

    1. nerdctl push error message : content digest ... not found
      "ctr push" also same problem.
    2. When there is an error, the content digest in the error message is not in the path (/var/lib/containerd/io.containerd.content.v1.content/blobs/sha256)
    3. I check "ctr image check" option, Image imcompleted. but no error message "nerdctl pull"
    acr-0-jworker-6:/# ctr --namespace=k8s.io i check | grep ubun
    registry/custom_ubuntu-20.04.6:latest              application/vnd.docker.distribution.manifest.v2+json      sha256:77649be7ae3b6950e0d6383c23f251e15cf58624d5ff64b40e35572663ce8552 incomplete (10/11) 930.8 MiB/957.0 MiB true
    

    Solution

    1. ctr --namespace k8s.io image pull
    2. nerdctl commit --namespace k8s.io
    3. ctr push --all-platforms

    Isn't there a problem with "nerdctl pull"?

  9. lingdie commented on Sep 9, 2024

    @lingdie
    Contributor

    not nerdctl pull, bug containerd pull.
    see: containerd/containerd#8973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions