-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Wait for pods to be running before eviction starts #80879
Wait for pods to be running before eviction starts #80879
Conversation
c7d22c2
to
56643d0
Compare
56643d0
to
b4ea510
Compare
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.
/lgtm
/approve
@@ -426,6 +427,9 @@ var _ = SIGDescribe("NoExecuteTaintManager Multiple Pods [Serial]", func() { | |||
pod2.Spec.NodeSelector = map[string]string{"kubernetes.io/hostname": nodeHostNameLabel} | |||
_, err = testutils.RunPodAndGetNodeName(cs, pod2, 2*time.Minute) | |||
framework.ExpectNoError(err) | |||
// Wait for pods to be running state before eviction happens | |||
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(cs, pod1)) |
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.
The name of RunPodAndGetNodeName
function is mis-leading. I initially thought we already check that the pods are running, but looks like that function only waits until the pod is scheduled. We should probably rename that function in a separate PR.
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.
Agreed, will change it in a another PR. Thanks :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, ravisantoshgudimetla 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 |
/retest |
/kind cleanup |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
As of now, we're not exactly waiting for pod to be running before proceeding to check for eviction. Sometimes this might cause races which we're noticing occasionally in OpenShift CI.
/cc @Huang-Wei @bsalamat
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: