Skip to content

parent snapshot does not exist: not found #2382

Closed

Description

@Random-Liu

I saw a CRI validation test failure:

[BeforeEach] [k8s.io] Image Manager
  /home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:50
[BeforeEach] [k8s.io] Image Manager
  /home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/image.go:56
[It] listImage should get exactly 3 repoTags in the result image [Conformance]
  /home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/image.go:149
STEP: Remove image : gcr.io/cri-tools/test-image-tags:1
STEP: Remove image : gcr.io/cri-tools/test-image-tags:2
STEP: Remove image : gcr.io/cri-tools/test-image-tags:3
STEP: Pull image : gcr.io/cri-tools/test-image-tags:1
E0605 01:35:46.753391   21534 remote_image.go:108] PullImage "gcr.io/cri-tools/test-image-tags:1" from image service failed: rpc error: code = Unknown desc = failed to pull and unpack image "gcr.io/cri-tools/test-image-tags:1": failed to unpack image on snapshotter overlayfs: failed to prepare extraction snapshot "extract-731580600-yNJo sha256:fc7dabc612d929d4031ebbf977320d95b8408945bc8e096fb888aa54fb83b2ce": parent snapshot sha256:4febd3792a1fb2153108b4fa50161c6ee5e3d16aa483a63215f936a113a88e9a does not exist: not found
Jun  5 01:35:46.754: INFO: Unexpected error occurred: rpc error: code = Unknown desc = failed to pull and unpack image "gcr.io/cri-tools/test-image-tags:1": failed to unpack image on snapshotter overlayfs: failed to prepare extraction snapshot "extract-731580600-yNJo sha256:fc7dabc612d929d4031ebbf977320d95b8408945bc8e096fb888aa54fb83b2ce": parent snapshot sha256:4febd3792a1fb2153108b4fa50161c6ee5e3d16aa483a63215f936a113a88e9a does not exist: not found
[AfterEach] [k8s.io] Image Manager
  /home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:51
• Failure [0.515 seconds]
[k8s.io] Image Manager
/home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/framework.go:72
  listImage should get exactly 3 repoTags in the result image [Conformance] [It]
  /home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/validate/image.go:149
  failed to pull image: rpc error: code = Unknown desc = failed to pull and unpack image "gcr.io/cri-tools/test-image-tags:1": failed to unpack image on snapshotter overlayfs: failed to prepare extraction snapshot "extract-731580600-yNJo sha256:fc7dabc612d929d4031ebbf977320d95b8408945bc8e096fb888aa54fb83b2ce": parent snapshot sha256:4febd3792a1fb2153108b4fa50161c6ee5e3d16aa483a63215f936a113a88e9a does not exist: not found
  Expected error:
      <*status.statusError | 0xc4204731d0>: {
          Code: 2,
          Message: "failed to pull and unpack image \"gcr.io/cri-tools/test-image-tags:1\": failed to unpack image on snapshotter overlayfs: failed to prepare extraction snapshot \"extract-731580600-yNJo sha256:fc7dabc612d929d4031ebbf977320d95b8408945bc8e096fb888aa54fb83b2ce\": parent snapshot sha256:4febd3792a1fb2153108b4fa50161c6ee5e3d16aa483a63215f936a113a88e9a does not exist: not found",
          Details: nil,
      }
      rpc error: code = Unknown desc = failed to pull and unpack image "gcr.io/cri-tools/test-image-tags:1": failed to unpack image on snapshotter overlayfs: failed to prepare extraction snapshot "extract-731580600-yNJo sha256:fc7dabc612d929d4031ebbf977320d95b8408945bc8e096fb888aa54fb83b2ce": parent snapshot sha256:4febd3792a1fb2153108b4fa50161c6ee5e3d16aa483a63215f936a113a88e9a does not exist: not found
  not to have occurred
  /home/travis/gopath/src/github.com/kubernetes-incubator/cri-tools/pkg/framework/util.go:248

The containerd log https://gist.github.com/Random-Liu/6b9e9f794861b69f36df2d7dd7916a5e.

From the log, it seems that the parent snapshot 4febd3792a1fb2153108b4fa50161c6ee5e3d16aa483a63215f936a113a88e9a is removed as part of other image gcr.io/cri-tools/test-image-latest:latest before image gcr.io/cri-tools/test-image-tags:1 is unpacked. Shouldn't lease avoid that?

Activity

  1. Random-Liu commented on Jun 5, 2018

    @Random-Liu
    MemberAuthor
  2. dmcgowan commented on Jun 5, 2018

    @dmcgowan
    Member

    Hmm, this kind of looks like (2) from #2331. The current problem is leases are only used for newly created objects, not to gain reference of an existing object. I solved that in the PR by removing the reliance on stat during unpack to see if the parent exists.

  3. Random-Liu commented on Jun 5, 2018

    @Random-Liu
    MemberAuthor

    I saw this in a presubmit test yesterday in cri, and containerd has been updated to 84bebdd which should have included #2331.

    We can keep this issue open, and I'll update if I see this again.

    @dmcgowan This shouldn't be a permanent error, right? If the image is pulled again, the unpack may succeed. As long it is not a permanent error, and not happen frequently, kubelet should be able to tolerant it in some extent.

  4. relyt0925 commented on Oct 19, 2018

    @relyt0925

    We've seen this as well in our IKS clusters.

    Events:
      Type     Reason                  Age                   From                   Message
      ----     ------                  ----                  ----                   -------
      Warning  FailedCreatePodSandBox  47s (x553 over 130m)  kubelet, 10.94.24.199  Failed create pod sandbox: rpc error: code = Unknown desc = failed to create containerd container: failed to create snapshot: missing parent "k8s.io/2/sha256:e17133b79956ad6f69ae7f775badd1c11bad2fc64f0529cab863b9d12fbaa5c4" bucket: not found
    

    I have a job that I thought I could periodically run to detect and fix this using crictl

    /usr/local/bin/crictl inspecti {{ kube_infra_image }} || /usr/local/bin/crictl pull --creds token:{{ containerd_token }} {{ kube_infra_image }
    

    But it doesn't appear to detect when the image is in this state.

  5. crosbymichael commented on May 22, 2019

    @crosbymichael
    Member

    This can be closed now

  6. foWQL commented on Mar 11, 2023

    @foWQL

    I saw this in a presubmit test yesterday in cri, and containerd has been updated to 84bebdd which should have included #2331.

    We can keep this issue open, and I'll update if I see this again.

    @dmcgowan This shouldn't be a permanent error, right? If the image is pulled again, the unpack may succeed. As long it is not a permanent error, and not happen frequently, kubelet should be able to tolerant it in some extent.

    how to solve this , pls

  7. nubunto commented on Jun 7, 2023

    @nubunto

    resetting the earthly cache solved this for me:

    $ earthly prune --reset
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions