-
Notifications
You must be signed in to change notification settings - Fork 41.1k
use pull if not present for eviction tests #133359
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
base: master
Are you sure you want to change the base?
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
fbaab50
to
ef0fcd3
Compare
ef0fcd3
to
48f514b
Compare
/milestone v1.35 /hold to confirm tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
thank you for the follow up, appreciate the improvement. I am tagging with approve, I do not expect issues with tests
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kannon92, SergeyKanzhelev 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this isn't a valid change, when the ImagePullPolicy
value isn't PullAlways
, it always gets reset to PullNever
by the e2e framework.
ref:
kubernetes/test/e2e/framework/pod/pod_client.go
Lines 272 to 287 in 8e6d788
for i := range pod.Spec.Containers { | |
c := &pod.Spec.Containers[i] | |
if c.ImagePullPolicy == v1.PullAlways { | |
// If the image pull policy is PullAlways, the image doesn't need to be in | |
// the allow list or pre-pulled, because the image is expected to be pulled | |
// in the test anyway. | |
continue | |
} | |
// If the image policy is not PullAlways, the image must be in the pre-pull list and | |
// pre-pulled. | |
gomega.Expect(ImagePrePullList.Has(c.Image)).To(gomega.BeTrueBecause("Image %q is not in the pre-pull list, consider adding it to PrePulledImages in test/e2e/common/util.go or NodePrePullImageList in test/e2e_node/image_list.go", c.Image)) | |
// Do not pull images during the tests because the images in pre-pull list should have | |
// been prepulled. | |
c.ImagePullPolicy = v1.PullNever | |
} | |
} |
On the contrary, we should modify the |
Huhhhhh, I think that's a misguided feature. We should attempt to pre-pull, but we should not clear the image to Never. Images can of course be evicted. IMHO we should stop clearing this setting. |
cc @SergeyKanzhelev @tallclair (would've cced @kannon92...); @pohly @aojea clobbering the image pull policy like this seems like a bug IMHO |
I agree. Is there a bug tracking improving this? @ajaysundark @HirazawaUi do you know? |
Thank you for calling this out @HirazawaUi! |
This didn't help all the test cases, as we also have a test I think we could ImagePull Always for all Eviction tests, and rewrite this test to manage disk-pressure explicitly without assumptions.
@BenTheElder I agree with this, but I'd also want to be cautious to not handle this improvement as part of release efforts.
#131142 was for tracking the containerd eviction failures. |
I'm skeptical of this breaking anything that isn't already flaky / unreliable, it's fundamentally broken to assume that the image once pulled will remain available. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Follow up from @SergeyKanzhelev below.
ref: #133349 (comment)
Which issue(s) this PR is related to:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: