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

podman pull --arch and --platform values are full ignored #14293

Closed
ssbarnea opened this issue May 19, 2022 · 6 comments · Fixed by containers/common#1052
Closed

podman pull --arch and --platform values are full ignored #14293

ssbarnea opened this issue May 19, 2022 · 6 comments · Fixed by containers/common#1052
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. macos MacOS (OSX) related

Comments

@ssbarnea
Copy link
Collaborator

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

/kind bug

Description

Apparently you can pass any value to --arch when doing a pull as that argument would fully be ignores, making impossible to pull a specific architecture.

Describe the results you received:

$ podman pull --arch xxx quay.io/ansible/python-base:latest
Trying to pull quay.io/ansible/python-base:latest...
Getting image source signatures
Copying blob ...
Copying config sha256:2d9a24aa7d131d57e581b2ffa2f8dfa2e58d12ccfdbc1fc18a0bc1904bf0c05e
Writing manifest to image destination
Storing signatures
2d9a24aa7d131d57e581b2ffa2f8dfa2e58d12ccfdbc1fc18a0bc1904bf0c05e

Describe the results you expected:

  • Failure to pull if that architecture does not exist.
  • A mention of the architectures that was pulled, as the user might not always know on which architecture he is running with.

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

Output of podman version:

$ podman version
Client:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18.1
Built:        Thu May  5 21:07:47 2022
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      4.0.2
API Version:  4.0.2
Go Version:   go1.16.14
Built:        Thu Mar  3 14:58:50 2022
OS/Arch:      linux/arm64

Output of podman info --debug:

(paste your output here)

Package info (e.g. output of rpm -q podman or apt list podman):

(paste your output here)

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)

Yes/No

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label May 19, 2022
@github-actions github-actions bot added the macos MacOS (OSX) related label May 19, 2022
@ssbarnea
Copy link
Collaborator Author

Current behavior and even the API is different than docker. Docker uses docker pull --platform arm64 ... instead of --arch and gives proper errors on both cases unsupported architecture or missing architecture.

# incorrect architecture given:
$ docker pull --platform xxx quay.io/ansible/python-base:latest
Error response from daemon: "xxx": unknown operating system or architecture: invalid argument
FAIL: 1 (exit code)

# missing architecture, WARNING displayed but another supported ones was pulled
$ docker pull --platform arm64 quay.io/ansible/python-base:latest
latest: Pulling from ansible/python-base
...
Status: Downloaded newer image for quay.io/ansible/python-base:latest
WARNING: image with reference quay.io/ansible/python-base was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64
quay.io/ansible/python-base:latest

@ssbarnea ssbarnea changed the title podman pull --arch is full ignored podman pull --arch and --platform values are full ignored May 19, 2022
@praveenkumar
Copy link
Contributor

This looks dup of #14271 one.

@vrothberg
Copy link
Member

Yes, that is a dup of many other dups. GitHub doesn't seem good in showing duplicates.

Please comment here: #12682

In my testing docker did not error out when doing --platform linux/bogus. xxx is interpreted as an OS which is easier to check than the architecture.

In case your version of Docker behaves different, please mention the version.

@vrothberg vrothberg reopened this May 30, 2022
@vrothberg
Copy link
Member

Actually, I am going to reopen this issue as it is slightly different. I will add the warnings as requested ✔️

vrothberg added a commit to vrothberg/common that referenced this issue May 30, 2022
Warn when the platform of a pulled image does not match the
user-specified platform.  The checks are only performed if the user
requested a custom platform.

Do not error out and warn only since there are many images in the wild
that claim to be of another architecture.  An error would break existing
workloads; we did that once and had to revert immediately.

Fixes: containers/podman/issues/14293
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg
Copy link
Member

Opened containers/common#1052. With this change, Podman behaves as follows (see the "WARNING: "):

podman (main) $ ./bin/podman pull --arch xxx quay.io/ansible/python-base:latest
Trying to pull quay.io/ansible/python-base:latest...
Getting image source signatures
Copying blob 6fa7edf44c66 skipped: already exists  
Copying blob 998ceb85f375 skipped: already exists  
Copying blob f33f743beaa6 skipped: already exists  
Copying blob b0eb4fd5a26a skipped: already exists  
Copying blob 45081c646f63 skipped: already exists  
Copying blob b8ea9b41ba10 skipped: already exists  
Copying blob 902d2d706c71 skipped: already exists  
Copying blob 5a88d10fae3e skipped: already exists  
Copying blob 4ca17c9836ac skipped: already exists  
Copying blob 148a20a0616a skipped: already exists  
Copying blob c978fc766a4b skipped: already exists  
Copying blob fdc12ef68aee skipped: already exists  
Copying config 2d9a24aa7d done  
Writing manifest to image destination
Storing signatures
WARNING: requested architecture "xxx" does not match architecture "amd64" of image 2d9a24aa7d131d57e581b2ffa2f8dfa2e58d12ccfdbc1fc18a0bc1904bf0c05e
2d9a24aa7d131d57e581b2ffa2f8dfa2e58d12ccfdbc1fc18a0bc1904bf0c05e

vrothberg added a commit to vrothberg/common that referenced this issue May 30, 2022
Warn when the platform of a pulled image does not match the
user-specified platform.  The checks are only performed if the user
requested a custom platform.

Do not error out and warn only since there are many images in the wild
that claim to be of another architecture.  An error would break existing
workloads; we did that once and had to revert immediately.

Fixes: containers/podman/issues/14293
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg
Copy link
Member

The issue will be fixed with the next version of Podman (v4.2)

@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. macos MacOS (OSX) related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants