-
Notifications
You must be signed in to change notification settings - Fork 202
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
libimage: pull: ignore platform for local image lookup #634
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
@vrothberg The linter is not happy |
We must ignore the platform of a local image when doing lookups. Some images set an incorrect or even invalid platform (see containers/podman/issues/10682). Doing the lookup while ignoring the platform checks prevents redundantly downloading the same image. Note that this has the consequence that a `--pull-never --arch=hurz` may chose a local image of another architecture. However, I estimate the benefit of continuing to allow potentially invalid images higher than not running them (and breaking workloads). The changes required to touch the corrupted checks. I used the occasion to make the corrupted checks a bit cheaper. Signed-off-by: Valentin Rothberg <[email protected]>
Linter is happy now :) @Luap99 PTanotherL |
/hold |
Enforce the pull policy to always if a custom platform is requested by the user. Some images ship with invalid platforms which we must pessimistically assume, see containers/podman/issues/10682. Signed-off-by: Valentin Rothberg <[email protected]>
/lgtm |
/hold cancel |
/hold |
Too early: containers/podman#10739 is red all over |
As it turned out in Podman CI (containers/podman/pull/10739), the policy is overridden via --arch/os/platform/variant even when the policy is set to never. While I think this is a bug, it is a separate one and must tackled separately. Signed-off-by: Valentin Rothberg <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
Now also opened a Buildah PR containers/buildah#3326 to be extra sure. |
Note that there is still space for optimizations (e.g., do an extra arch/os/variant check) but I think it's good for now. Already an improvement to the previous state and with the RHEL deadlines around the corner, I want to make sure to have enough time for getting the backports to v0.38 ready (for Podman v3.2). |
/hold cancel |
/lgtm |
We must ignore the platform of a local image when doing lookups. Some
images set an incorrect or even invalid platform (see
containers/podman/issues/10682). Doing the lookup while ignoring the
platform checks prevents redundantly downloading the same image.
Note that this has the consequence that a
--pull-never --arch=hurz
maychose a local image of another architecture. However, I estimate the
benefit of continuing to allow potentially invalid images higher than
not running them (and breaking workloads).
The changes required to touch the corrupted checks. I used the occasion
to make the corrupted checks a bit cheaper.
Signed-off-by: Valentin Rothberg [email protected]