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

"layer not known" transient error after interrupting a pull #9588

Closed
martinetd opened this issue Mar 3, 2021 · 7 comments · Fixed by #9617
Closed

"layer not known" transient error after interrupting a pull #9588

martinetd opened this issue Mar 3, 2021 · 7 comments · Fixed by #9617
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@martinetd
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Follow-up on #8148 : with today's master, the error is now transient, but it's still scary to unaware users so simple ^C should probably not cause this.
As said there it's more of an UX issue than an actual problem

Steps to reproduce the issue:

  1. alternate between podman pull smth, interrupting it, and rmi the freshly fetched image. Full reproducer in It's baaaack: podman images: Error: top layer [...] not found in layer tree #8148 (comment)

Describe the results you received:
Sometimes get this error (only once, state fixes itself after running it)

$ ./bin/podman --root /tmp/podmanroot rmi localhost:5000/a:2
WARN[0000] Top layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f of image e1b17d5af16529f22664f6c8f7328cad67bf10e3cabe9f7e13d75f14b992d7a2 not found in layer tree. The storage may be corrupted, consider running `podman system reset`. 
WARN[0000] Layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f not found in layer. The storage may be corrupted, consider running `podman system reset`. 
WARN[0000] Top layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f of image e1b17d5af16529f22664f6c8f7328cad67bf10e3cabe9f7e13d75f14b992d7a2 not found in layer tree. The storage may be corrupted, consider running `podman system reset`. 
WARN[0000] Layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f not found in layer. The storage may be corrupted, consider running `podman system reset`. 
Error: 1 error occurred:
	* layer not known

Describe the results you expected:

pull should not be able to leave the directory in that state? I don't know.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 3, 2021
@rhatdan
Copy link
Member

rhatdan commented Mar 3, 2021

@umohnani8 Just fixed this in container storage, I believe. Urvashi can you confirm?

@umohnani8
Copy link
Member

This looks different, I fixed the symlinks not found issue. This actually may be fixed by the pull improvements that @vrothberg is working on?

@vrothberg
Copy link
Member

The pull improvement won't help in this case. The problem is that rmi needs to (still) be made more robust against a corrupted storage.

@vrothberg
Copy link
Member

#9617 is (hopefully) the last missing piece. We already ignored unknown-image errors so it seems logical to extend it to ignore unknown-layer errors as well - those may be caused by an incomplete pull/commit.

@martinetd
Copy link
Author

Thanks! I'll test tomorrow

vrothberg added a commit to vrothberg/libpod that referenced this issue Mar 4, 2021
[NO TESTS NEEDED] as I have absolutely no idea how to force a reliable
reproducer.

Fixes: containers#9588
Signed-off-by: Valentin Rothberg <[email protected]>
@martinetd
Copy link
Author

tomorrow got a bit late, here's what it looks like now:

$ ./bin/podman --root /tmp/podmanroot pull localhost:5000/a:2
Trying to pull localhost:5000/a:2...
Getting image source signatures
Copying blob fc87b077f4bb skipped: already exists  
Copying blob 353a677e0e56 done  
Copying config e1b17d5af1 done  
Writing manifest to image destination
Storing signatures
^C
$ ./bin/podman --root /tmp/podmanroot rmi localhost:5000/a:2
WARN[0000] Top layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f of image e1b17d5af16529f22664f6c8f7328cad67bf10e3cabe9f7e13d75f14b992d7a2 not found in layer tree. The storage may be corrupted, consider running `podman system reset`. 
WARN[0000] Layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f not found in layer. The storage may be corrupted, consider running `podman system reset`. 
WARN[0000] Top layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f of image e1b17d5af16529f22664f6c8f7328cad67bf10e3cabe9f7e13d75f14b992d7a2 not found in layer tree. The storage may be corrupted, consider running `podman system reset`. 
WARN[0000] Layer ca84fd7b90547cb7f2b5adf21c4d5270becc15b855548277feccb31732917e8f not found in layer. The storage may be corrupted, consider running `podman system reset`. 
Untagged: e1b17d5af16529f22664f6c8f7328cad67bf10e3cabe9f7e13d75f14b992d7a2
Deleted: e1b17d5af16529f22664f6c8f7328cad67bf10e3cabe9f7e13d75f14b992d7a2

$ echo $?
0

So the hard error is gone; I guess it's fair to keep showing the warnings. Thanks!

@vrothberg
Copy link
Member

@martinetd, thanks a lot for sharing and for your patience. I appreciate your feedback and interactions!

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants