-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman push
to "dir:" has wrong mediaType
#2013
Comments
Valintin can you take a look at this. |
Sure 👍 |
I am not sure how to tackle it. The behaviour comes from issue containers/skopeo#425 and has been changed by PR containers/image#370 which changed the compression for the directory transport with https://github.com/containers/image/pull/370/files#diff-e29498c4bcf6aaaa545bcf30a1030503R101 but I don't see why this was needed. @mtrma, @runcom, do you know why the behaviour changed? There's also the |
@mtrmac ^ |
Can someone write down the precise actual/expected results? I am not quite clear what the reported problem is, or maybe @vrothberg is seeing an independent problem from the one reported; e.g. is it that the layer is/is not compressed, or that the mediaType does/does not match? Or both? It is a known missing functionality of c/image that it does not change MIME types at all on compression/decompression of layers. There isn’t, AFAIK, a fundamental reason why it couldn’t be done. Do note, though, that https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md does not define an “uncompressed layer” type at all, so for schema2 there wasn’t much point in implementing the MIME type edits. (OTOH, since, OCI has introduced compressed/uncompressed variants, we probably should support these.) This lack of MIME type changes would probably explain the why after pulling a compressed image from a remote registry (is that how the image was created?), creating a copy copy of the image from (IIRC, Buildah has independently implemented such a MIME type mapping, when creating the images from containers, and it uses the natural (but not defined by the spec) uncompressed MIME type string for schema2 uncompressed layers.)
This didn’t change the behavior; it only changed the type of the return value from
Where? AFAICS |
@mtrmac While their v2.s2 doc does not have it, their docker/distribution code does have it and supports it for docker and OCI formats. |
Yes, there is a docker/docker does use that constant, but only internally within the implementation of I have now noticed, though, that containerd does recognize the uncompressed MIME type (known in there as |
That's stated in |
(Just to check my understanding of the code) Does it imply we need to update/alter the manifest once the image is copied? Is there code in place for such tasks? |
What do you mean by “alters the compression”, or maybe by “the compression type doesn't default to the one of the source”? The |
Yes, we are already doing that when compressing images, so that the manifest of the destination refers to results of the compression which we have actually uploaded. In c/image/copy, see |
I have some spare cycles until DevConf and will look into it. |
Add a new mime type [1] to represent uncompressed DockerV2 layers, and propagate it to the destination's manifest. [1] application/vnd.docker.image.rootfs.diff.tar Fixes: github.com/containers/podman/issues/2013 Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg Any movement on this? |
Not yet. There were too many other things on my table since DevConf but the queue is getting smaller. |
@vrothberg Still no progress? |
Unfortunately not. The work on the copy-detection mechanism exploded into rewriting parts of the storage backend and I am continuously blocked by cleaning up breaking builds/tests due to API changes across the stack which is really slowing me down. |
@vrothberg any ideas? |
Unfortunately, no progress for a longer time since issues with higher priority are on my table. I removed me from the assignment to not block others from taking over. |
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
@mtrmac @vrothberg Any movement on this? Should I assign an @QiWang19 ? |
This is primarily WIP containers/image#563, some changes to buildah (almost certainly) and podman (maybe, less likely) would also be involved. |
Yes, there are some leftovers to iron out and we want to wait for zstd PR to be merged, so I can pick that up and add code for the new mime type. |
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Also check for supported media types when parsing a v2s2/OCI1 manifest. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
When copying an image, record the compression in the BlobInfo and use the information when updating the manifest's layer infos to set the layers' media types correctly. Also check for supported media types when parsing a v2s2/OCI1 manifest. Note that consumers of the containers/image library need to update opencontainers/image-spec to commit 775207bd45b6cb8153ce218cc59351799217451f. Fixes: github.com/containers/podman/issues/2013 Fixes: github.com/containers/buildah/issues/1589 Signed-off-by: Valentin Rothberg <[email protected]>
This issue will be fixed with merging #4165 |
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days. |
#4165 is merged, closing |
Does anyone know what version of podman contains those changes? I'm building with podman 2.0.3 using Furthermore, when doing:
podman apparently "corrects" the layer mediatype (everything else, including the layer hashes remains exactly the same) and the server weirdly ends up with the tags on different images, where the only difference is that mediatype value on two of the layers. |
From the changelog, it's included from v1.6.2-rc1 |
Thanks. Looks like I have a different issue then. Probably this one: #6496. |
Is this a BUG REPORT or FEATURE REQUEST?:
kind bug
Description
both as format docker
v2s2
and asoci
, the layers say they're+gzip
but are just plain tar archives.Steps to reproduce the issue:
podman push vbatts/slackware dir:xx
podman push --format oci vbatts/slackware dir:xxx
Describe the results you received:
and
Describe the results you expected:
expected layer mediaType to be gzip (of that the object were itself gzipped)
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:The text was updated successfully, but these errors were encountered: