-
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
create: support images with invalid platform #10739
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 |
/hold |
4d9bfb8
to
b2f0f8e
Compare
Also fixes: #10648 |
Needs a backport to the v3.2 branch. |
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]>
efc5174
to
940423b
Compare
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]>
90bb381
to
854e61f
Compare
Still fighting the good fight with the CI here @vrothberg |
af15501
to
71fb632
Compare
This one really unfolds like origami :^) |
cac0320
to
3e9645e
Compare
In case somebody is restarting the jobs, please don't. They look like infra problems but I want to see the errors. |
06ec5d9
to
5bcb11b
Compare
Let's see if it's better now. Finally managed to get the logs of a failing int remote test. Had to massage the remote pulling code a bit and wire the pull policy through. |
Much to my regret, there is a number of images in the wild with invalid platforms breaking the platform checks in libimage that want to make sure that a local image is matching the expected platform. Imagine a `podman run --arch=arm64 fedora` with a local amd64 fedora image. We really shouldn't use the local one in this case and pull down the arm64 one. The strict platform checks in libimage in combination with invalid platforms in images surfaced in Podman being able to pull an image but failing to look it up in subsequent presence checks. A `podman run` would hence pull such an image but fail to create the container. Support images with invalid platforms by vendoring the latest HEAD from containers/common. Also remove the partially implemented pull-policy logic from Podman and let libimage handle that entirely. However, whenever --arch, --os or --platform are specified, the pull policy will be forced to "newer". This way, we pessimistically assume that the local image has an invalid platform and we reach out to the registry. If there's a newer image (i.e., one with a different digest), we'll pull it down. Please note that most of the logic has either already been implemented in libimage or been moved down which allows for removing some clutter from Podman. [NO TESTS NEEDED] since c/common has new tests. Podman can rely on the existing tests. Fixes: containers#10648 Fixes: containers#10682 Signed-off-by: Valentin Rothberg <[email protected]>
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]>
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]>
@containers/podman-maintainers merge me |
LGTM |
/lgtm |
If registry is remote default pull policy must be `missing` instead of remote. Since `empty str == pullpolicy {always}` for more context on this behaviour check containers#10739 [NO TESTS NEEDED] Signed-off-by: Aditya Rajan <[email protected]>
Much to my regret, there is a number of images in the wild with invalid
platforms breaking the platform checks in libimage that want to make
sure that a local image is matching the expected platform.
Imagine a
podman run --arch=arm64 fedora
with a local amd64 fedoraimage. We really shouldn't use the local one in this case and pull down
the arm64 one.
The strict platform checks in libimage in combination with invalid
platforms in images surfaced in Podman being able to pull an image but
failing to look it up in subsequent presence checks. A
podman run
would hence pull such an image but fail to create the container.
Support images with invalid platforms by vendoring the latest HEAD from
containers/common. Also remove the partially implemented pull-policy
logic from Podman and let libimage handle that entirely. However,
whenever --arch, --os or --platform are specified, the pull policy will
be forced to "newer". This way, we pessimistically assume that the
local image has an invalid platform and we reach out to the registry.
If there's a newer image (i.e., one with a different digest), we'll pull
it down.
Please note that most of the logic has either already been implemented
in libimage or been moved down which allows for removing some clutter
from Podman.
Fixes: #10682
Signed-off-by: Valentin Rothberg [email protected]