Skip to content

Failed to pull image, content digest sha256 not found #142

@pizzapim

Description

@pizzapim

Hello! First I would like to thank you for this awesome project! I have come across an issue while using it.

Context: I am running a k3s cluster on top of NixOS. I have already deployed nix-snapshotter successfully on my nodes. I can confirm my setup works as I was able to pull and run a Redis image from the Nix store.

However, I am now encountering a problem with a particular Docker image, mpepping/cyberchef. More specifically, I am using the image created by:

pkgs.dockerTools.pullImage {
  finalImageName = "mpepping/cyberchef";
  finalImageTag = "latest";
  imageDigest = "sha256:5044c72dd8070fb6e0595e720fc4440bf6168493b2433db06a1c966406398ba2";
  imageName = "mpepping/cyberchef";
  sha256 = "177yjfbz0ijc8lfqfr50fhqqmjk72373c0igyrxv3wwg0pyrgpv4";
}

When I use the Nix store path to this image, I receive the following events on the Kubernetes pod:

  Normal   Scheduled  19s   default-scheduler  Successfully assigned default/cyberchef-65769f8c78-7cmxv to lewis
  Normal   Pulling    19s   kubelet            Pulling image "nix:0/nix/store/frpcl21jwz0zhr2whmi21affqbfn9dqw-docker-image-mpepping-cyberchef-latest.tar"
  Warning  Failed     12s   kubelet            Failed to pull image "nix:0/nix/store/frpcl21jwz0zhr2whmi21affqbfn9dqw-docker-image-mpepping-cyberchef-latest.tar": content digest sha256:1ca8358066425ba22dd40a3bb562a1be846e7a721255ddfedcfb8468b028308f: not found
  Warning  Failed     12s   kubelet            Error: ErrImagePull
  Normal   BackOff    11s   kubelet            Back-off pulling image "nix:0/nix/store/frpcl21jwz0zhr2whmi21affqbfn9dqw-docker-image-mpepping-cyberchef-latest.tar"

The logs of nix-snapshotter show no problem:

msg="[image-service] Loading nix image archive"
msg="Importing image" ref="docker.io/mpepping/cyberchef:latest"
msg="Creating image" ref="docker.io/mpepping/cyberchef:latest"
msg="Created image" ref="docker.io/mpepping/cyberchef:latest"

It does look like this is an upstream containerd issue: containerd/containerd#9873
Do you have any ideas how to avoid this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions