-
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
No error reported when pulling an image with the wrong architecture #14271
Comments
@vrothberg PTAL |
Thanks for reaching out, @cfergeau! This issue is an unfortunate and sad fact of life. Podman (and as matter of fact Docker as well) can only run a best effort approach when it comes to matching architectures (and OSes). For some short period of time, Podman threw an error when the requested platform did not match but that broke many users so it has been reverted with containers/image@976ae91. The reason for the breakage is that many images in the wild specify a wrong platform. For a long period of time, even K8s images suffered from that issue. In some cases, it was a user error, in others some tools had bugs. I am no fan of the current behavior but I do not see a way out. Docker does not error out either: |
I understand there are backward-compatibility concerns involved, even if I did not realize some images were setting their arch wrong. |
Definitely! I will add this requirement to #12682 which asks for the same check but when looking up images locally. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
If I run
podman pull --arch=bogus quay.io/centos/centos:centos7
, podman will download an image:but its architecture is not the expected one
If I raise the log-level to
info
, I at least a message about this:INFO[0001] Image operating system mismatch: image uses OS "linux"+architecture "amd64", expecting one of "linux+bogus"
Contrast this with multiarch images with a manifest:
I'd expect the behaviour to be consistent in both cases, or to at least have an option to get an error in the former situation (I could not find one).
Output of
podman version
:(this is on fedora36)
Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
This was tested on a physical laptop, but I think the behaviour would be reproducible regardless of the environment
The text was updated successfully, but these errors were encountered: