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

kube play: always pull when both imagePullPolicy and tag are missing #21493

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

mporrato
Copy link
Contributor

@mporrato mporrato commented Feb 2, 2024

Align the behaviour of podman kube play file.yaml to Kubernetes' by forcing an image pull when imagePullPolicy is omitted and the container image does not specify a tag.

Fixes #21211

Does this PR introduce a user-facing change?

None

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Contributor

openshift-ci bot commented Feb 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mporrato, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2024
Comment on lines 3180 to 3183
inspect := podmanTest.Podman([]string{"inspect", BB})
inspect.WaitWithDefaultTimeout()
oldBBinspect := inspect.InspectImageJSON()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing an exit code check, needs to have an Expect(inspect).Should(ExitCleanly())


kube := podmanTest.Podman([]string{"kube", "play", kubeYaml})
kube.WaitWithDefaultTimeout()
// Cannot ExitCleanly() because pull output goes to stderr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should check the stderr output here as it should contain the pull output, i.e. Copying blob

Align the behaviour of `podman kube play file.yaml` to Kubernetes' by forcing
an image pull when `imagePullPolicy` is omitted and the container image does
not specify a tag.

Signed-off-by: Maurizio Porrato <[email protected]>
Copy link

Cockpit tests failed for commit cb81da9. @martinpitt, @jelly, @mvollmer please check.

@martinpitt
Copy link
Contributor

There is the podman build hang again on rawhide which I've seen several times in the last few weeks. The subsequent tests then also fail as there seems to be an unkillable podman process. This smells like a kernel issue at first. The journal doesn't have anything unusual/interesting.

I'll add this to the TODO list to see if I can reproduce it locally with running this in a loop, but I won't get to it much next week as I'll be on a sprint.

In the meantime, you can either retry or ignore that failure (with my blessing 😁 )

@martinpitt
Copy link
Contributor

I locally ran that test a few hundred times in two parallel VMs, with the same kernel version, and didn't manage to reproduce the lockup. That's either unfortunate timing or some quirk/bug on the EC2 (where Testing Farm instances run). Meh..

@Luap99
Copy link
Member

Luap99 commented Feb 12, 2024

@martinpitt follow #21504 for the hang, so far we were not able to reproduce either.

Copy link

A friendly reminder that this PR had no activity for 30 days.

@mporrato
Copy link
Contributor Author

@Luap99 anything needed on my side to move this forward?

@rhatdan rhatdan removed the stale-pr label Mar 27, 2024
@rhatdan
Copy link
Member

rhatdan commented Mar 27, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit a1a5bd3 into containers:main Mar 27, 2024
88 of 90 checks passed
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jun 26, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Jun 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

imagePullPolicy should be set to Always when both imagePullPolicy and tag are missing
5 participants