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

[Flake] Change image behavior of high-priority-group pod #4438

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/e2e/singlecluster/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ var _ = ginkgo.Describe("Pod groups", func() {
})

highPriorityGroup := podtesting.MakePod("high-priority-group", ns.Name).
Image(util.E2eTestAgnHostImage, util.BehaviorExitFast).
Image(util.E2eTestAgnHostImage, util.BehaviorWaitForDeletion).
Queue(lq.Name).
PriorityClass("high").
Request(corev1.ResourceCPU, "1").
Expand Down Expand Up @@ -517,6 +517,10 @@ var _ = ginkgo.Describe("Pod groups", func() {
}, util.Timeout, util.Interval).Should(gomega.Succeed())
})

ginkgo.By("Call high priority group pods to complete", func() {
util.WaitForActivePodsAndTerminate(ctx, k8sClient, restClient, cfg, ns.Name, 2, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, I don't think we should be terminating them by the /exit, because the Pod is already being deleted due to preemptions. So, we just need to wait for SIGKILL by kubelet. To make it faster we can specify spec.graceTerminationPeriodSeconds. See #4434 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, sorry, this is already terminating the high-priority group. makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we do not terminate them they will never finish and replacement pods can't be ungated

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, got it.

})

ginkgo.By("Verify the high priority group completes", func() {
util.ExpectWorkloadToFinish(ctx, k8sClient, highGroupKey)
})
Expand Down