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

new warning message about mismatching expected and actual platform doesn't "canonicalize" the input before comparison (ie aarch64 vs arm64) #14669

Closed
Romain-Geissler-1A opened this issue Jun 20, 2022 · 4 comments · Fixed by #14754
Assignees
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

@Romain-Geissler-1A
Copy link
Contributor

Romain-Geissler-1A commented Jun 20, 2022

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

/kind bug

Description

The new warning message about mismatching expected and actual platform doesn't "canonicalize" the input before comparison (ie aarch64 vs arm64).

Steps to reproduce the issue:

[root@5c9771d2427c /]# podman pull --arch aarch64 fedora
Resolved "fedora" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.fedoraproject.org/fedora:latest...
Getting image source signatures
Copying blob e0878b843331 done
Copying config 5beb352982 done
Writing manifest to image destination
Storing signatures
WARNING: image platform (linux/arm64) does not match the expected platform (linux/aarch64)  <--- unexpected warning here
5beb352982d939db3b957c8fd16da9d24bbd69f1d796169c5ddb649b3a03cf91

Describe the results you received:

We have this warning:

WARNING: image platform (linux/arm64) does not match the expected platform (linux/aarch64)

Describe the results you expected:

No warning should be printed in this case (as normally "linux/aarch64" shall be "canonicalized" to "linux/arm64" before comparison, like Docker does).

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

[root@5c9771d2427c /]# podman version
Client:       Podman Engine
Version:      4.2.0-dev
API Version:  4.2.0-dev
Go Version:   go1.18.3
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64```
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 20, 2022
@mheon
Copy link
Member

mheon commented Jun 21, 2022

@vrothberg PTAL

@vrothberg
Copy link
Member

Thanks for reaching out, @Romain-Geissler-1A!

It's unfortunate that aarch64 seems to be used in the wild as it's not an official GOARCH value (see https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) and is not really covered by the OCI image spec. But conventions matter, so I am going to take a look.

@Romain-Geissler-1A
Copy link
Contributor Author

Romain-Geissler-1A commented Jun 27, 2022

This lack of single convention is wider than just OCI images, for example it also creates issues for people packaging .deb and .rpm for their software where one uses one convention and the other one uses the other convention.

On the OCI side, IMO it's very important that container engine understand/accept $(uname -m) output, we use it in many places on our side to build multi-arch images. Shall there be some simple coreutils tools allowing to convert to the other naming convention, we would use it, but I don't think it exists and I don't want to write in every single of my scripts if ($(uname) -m == "x86_64") then OCIArch = "amd64" else if ....

@vrothberg
Copy link
Member

Thanks for elaborating, @Romain-Geissler-1A! I agree, the uname issue is probably why it's being tolerated in the wild. I already have a local fix and will push it once #14654 is merged.

vrothberg added a commit to vrothberg/common that referenced this issue Jun 28, 2022
vrothberg added a commit to vrothberg/common that referenced this issue Jun 28, 2022
Use containerd's platform package for platform checks. While the OCI
image spec requires the platform values to conform with GOOS and GOARCH
definitions of Go' runtime package, the values of uname are used by
convention.  Supporting these values silences annoying false-positive
warnings.

Fixes: #containers/podman/issues/14669
Signed-off-by: Valentin Rothberg <[email protected]>
vrothberg added a commit to vrothberg/libpod that referenced this issue Jun 28, 2022
Pull in fixes for platform checks to silence annoying warnings when
pulling images by platforms using uname values.

Fixes: containers#14669
Signed-off-by: Valentin Rothberg <[email protected]>
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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.

3 participants