-
Notifications
You must be signed in to change notification settings - Fork 794
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
invalid tar header: unknown #1589
Comments
Still facing this issue. I tried with podman In the meantime I have also upgraded to Edit: runtime info
|
Hi @marshallford, thanks a lot for opening the issue. I can reproduce the error locally using the aforementioned Dockerfile: FROM alpine
RUN date ... pushing it to a local registry, e.g., ... and then pulling it with containerd via I was using containerd v1.2.4 from Fedora 30. However, I also tried with containerd v1.1.7 where I cannot reproduce error. I also cannot reproduce the error when pulling with Docker 18.06.03 or with Podman, Buildah, CRI-O, Skopeo. I think that there's a regression in containerd v1.2.x but oddly enough, the error does not occur when building the upper Dockerfile with Docker 18.06.03. @estesp, I was browsing containerd issues but did not find a similar one. Do you know of any changes to containerd v1.2.x that could contribute to this issue? |
@QiWang19 can you take a look at this please? |
@vrothberg Thanks for the reply. Good thinking checking an older containerd version! For reference I also cannot reproduce on Docker |
Should I cross post this issue in containerd/containerd? |
Any chance you could export this image to a tar or push it to a public registry? I don't currently have a system with |
Would a container image work @estesp? https://quay.io/user/buildah |
@estesp https://hub.docker.com/r/marshallford/buildah-1.8.2-containerd-test Exact commands used to get sample to dockerhub:
@TomSweeneyRedHat, I believe he is referring to a sample image built with buildah to test against containerd. |
Strange--I installed 1.2.6 exactly after not being able to reproduce on master and still getting no error on a direct
|
Perhaps the Dockerhub container registry is modifying the image in a non standard way? @vrothberg ideas? |
Docker Hub is transforming the OCI image into a Docker v2 one, while the default
I pushed the same image to @nalind, @rhatdan, do you have any suspicion of what could possible go south here? It would be nice to have containerd >= 1.2 and Buildah working together. |
This is still an issue with podman |
podman v1.4.2 has Buildah v1.9.0 vendored into it. Please try this out. |
No dice. The testing container image you see referenced was built and pushed with Buildah
|
@vrothberg @mtrmac PTAL |
I still think it's a regression in containerd. As mentioned above, containerd v1.1.7 has no issue but v1.2.x fails. |
@estesp was pulled into this thread via a cross-post on containerd/containerd. Perhaps the containerd conversation should be moved to that issue? |
I can’t see anything wrong with that layer as such (the above is the DiffID, the compressed layer is OTOH, it is pretty strange that a |
When you run a container, it creates inodes for all of the internal mount points including /etc/resolv.conf. |
I can now reproduce with @vrothberg's DockerHub image; let me see if I can understand what the applier method is choking on with that layer. I did look through commit history and nothing stands out as changing behavior here since 1.1.7 and today; but hopefully some debug will help figure it out. |
Not anything clear yet; I can capture the actual tar.gz of the layer blob and parse it with a simple Go program as well as |
from a quick look, it seems we are generating the wrong manifest. We should generate |
Wow; you're absolutely right: From
From
Same content; containerd believed the manifest media type and skipped uncompressing the content assuming it really was tar, and not tar.gz. Confirming the file is tar.gz:
|
@mtrmac @vrothberg looks like we need to update the manifest as well to reflect the compression we do in https://github.com/containers/image/blob/master/copy/copy.go#L808. Maybe this a good chance to discuss containers/image#639. @estesp is that something that should be discussed through OCI? I've seen huge improvements using zstd instead of gzip for compressing the layers. |
Yes; earlier discussion is in containers/podman#2013 .
I don’t see how that is strictly related, except that the code to have algorithm identifiers could help this (because we need to pass the manifest-schema-specific implementation some information about the compression/decompression that is happening, or maybe even let that implementation decide what to use). |
Hm ... that's actually not the issue in this particular case. Docker Hub accepts the OCI image but one layer claims to be unencrypted. I'll investigate further. Apologies for the inconvenience. |
I tracked it down. The manifest types are not correctly updated when a given blob is already present on the registry. For instance, the |
Given @vrothberg's last few comments, I'm going to reopen this one to make tracking easier. |
@vrothberg Have you had a chance to look at this? Perhaps a PR you can link to this issue? As always, thanks for all your work. |
@marshallford, I had time to look into it and to think about how we can address this specific issue but I did not have the time to implement it. I opened containers/image#733 to track it. I can't give an ETA for a fix since there are many things on my table at the moment. Maybe others will pick up containers/image#733. I will close the issue here to move the discussion over to containers/image. |
Hi, I am facing something similar issue with buildah and k3s cluster. Steps to reproduce
Symptoms
Build machine info
Host machine info
Did something go wrong with buildah? Thanks, |
Hi @akospinter, thanks for reaching out. The issue is being tracked in containers/image#733 which is not yet fixed. |
I faced the same issue today with podman 2.1.1/fedora-32 and gcr.io on GKE/cos/containerd. Exporting to tarball and pushing via docker worked. |
@vrothberg , this issue has been around for over 1.5 years now, with apparently no end in sight. What do you think about putting it prominently in the documentation, so that people have appropriate expectations about setting up workflows using buildah? I will submit a documentation patch if you are comfortable having something included. |
Thanks for reaching out, @AntonOfTheWoods. I am positive that things will improve very soon. @nalind is currently working on a fix in containers/image#1089. |
Seeing this issue when trying to build singularity 3.7 images from docker images from a GitLab Enterprise Edition 13.4 docker registry that were built/pushed using podman 2.0.5 / buildah 1.15.1 / skopeo 1.1.1. UPDATE: Think mine is caused by the issue linked by @vrothberg , but here is a simple example that replicates what I'm seeing:
|
I see that containers/image#733 is fixed now, has this fix been vendored into buildah yet? |
Yes, it has been vendored into Buildah v1.9.x. |
Hi all, One workaround is to use buildah instead of podman when pushing images to the registry, because we can (as suggested in earlier comments) use the switch --disable-compression when pushing. Something that is not possible with podman push, though I would say, please take a look again into this problem, maybe? |
Does podman push --compress=false ... Work? Seems like this needs a three way algorithm. If user sets it, we should pass it through, if not then stick with default. |
I think the fix predates Podman v2.2.1. Podman 3.0+ definitely ships with it. |
Yes indeed, this option does the trick as well |
One question: i was using buildah 1.19.4 to push the image(s). Not Podman. |
Buildah v1.19.4 was using github.com/containers/image/v5 v5.10.1 which did not include a follow-up fix (i.e., containers/image@f990c32dd462). In fact, containers/image must be updated for Buildah's 1.19 series. Thanks for pointing that out. I'll open a PR for Buildah. |
Fixes are needed to fix the remaining issues of containers#1589. Signed-off-by: Valentin Rothberg <[email protected]>
Hi all,
Pushing newly created images with and without compression into a docker registry:v2 and pulling multi-layered images with containerd works as expected. |
GKE cluster (
1.12.7-gke.10
) using the node imagecos_containerd
is failing to run containers built with buildah and pushed to GCR.Steps to reproduce the issue:
kubectl apply -f test.yaml
on k8s clusterkubectl describe
to view warning eventDescribe the results you received:
Pod fails to spin up.
Describe the results you expected:
I'd expect the pod to pull and run the container.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
cat /etc/*release
:Output of
uname -a
:Output of
cat /etc/containers/storage.conf
:The text was updated successfully, but these errors were encountered: