Skip to content

Commit 8773815

Browse files
committed
Revert "promote e2e tests for taint-tolerations in predicates"
This reverts commit 4d3d364. This commit promoted a test to conformance and also changed the test at the same time. It should have been split up into two PRs to verify whether the change had the intended effect. The test is now failing consistently, so reverting.
1 parent 814fc34 commit 8773815

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

test/conformance/testdata/conformance.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ test/e2e/node/pre_stop.go: "should call prestop when killing a pod"
267267
test/e2e/scheduling/predicates.go: "validates resource limits of pods that are allowed to run"
268268
test/e2e/scheduling/predicates.go: "validates that NodeSelector is respected if not matching"
269269
test/e2e/scheduling/predicates.go: "validates that NodeSelector is respected if matching"
270-
test/e2e/scheduling/predicates.go: "validates that taints-tolerations is respected if matching"
271270
test/e2e/scheduling/predicates.go: "validates that there is no conflict between pods with same hostPort but different hostIP and protocol"
272271
test/e2e/scheduling/predicates.go: "validates that there exists conflict between pods with same hostPort and protocol but one using 0.0.0.0 hostIP"
273272
test/e2e/scheduling/taints.go: "removing taint cancels eviction"

test/e2e/scheduling/predicates.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,11 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
454454
framework.ExpectEqual(labelPod.Spec.NodeName, nodeName)
455455
})
456456

457-
/*
458-
Release : v1.18
459-
Testname: Scheduler, taints-tolerations matching
460-
Description: Find an available node and taint it with a key with effect NoSchedule. Schedule a pod with a
461-
corresponding nodeLabel and toleration spec such that it should only be able to run on the selected node.
462-
Ensure that the pod is scheduled and running on the node.
463-
*/
464-
framework.ConformanceIt("validates that taints-tolerations is respected if matching [Disruptive]", func() {
457+
// 1. Run a pod to get an available node, then delete the pod
458+
// 2. Taint the node with a random taint
459+
// 3. Try to relaunch the pod with tolerations tolerate the taints on node,
460+
// and the pod's nodeName specified to the name of node found in step 1
461+
ginkgo.It("validates that taints-tolerations is respected if matching", func() {
465462
nodeName := getNodeThatCanRunPodWithoutToleration(f)
466463

467464
ginkgo.By("Trying to apply a random taint on the found node.")
@@ -489,7 +486,12 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
489486
NodeSelector: map[string]string{labelKey: labelValue},
490487
})
491488

492-
framework.ExpectNoError(e2epod.WaitForPodNameRunningInNamespace(cs, ns, tolerationPodName))
489+
// check that pod got scheduled. We intentionally DO NOT check that the
490+
// pod is running because this will create a race condition with the
491+
// kubelet and the scheduler: the scheduler might have scheduled a pod
492+
// already when the kubelet does not know about its new taint yet. The
493+
// kubelet will then refuse to launch the pod.
494+
framework.ExpectNoError(e2epod.WaitForPodNotPending(cs, ns, tolerationPodName))
493495
deployedPod, err := cs.CoreV1().Pods(ns).Get(tolerationPodName, metav1.GetOptions{})
494496
framework.ExpectNoError(err)
495497
framework.ExpectEqual(deployedPod.Spec.NodeName, nodeName)

0 commit comments

Comments
 (0)