Commit d3eac09c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #41997 from dashpole/inode_test_post_monitoring

Automatic merge from submit-queue (batch tested with PRs 41994, 41969, 41997, 40952, 40576) Inode Eviction test Tests that Innocent pods are not evicted throughout test. The current version of the inode eviction test only makes sure that the two abusive pods are evicted before the innocent pod. This change adds a check during the post-eviction monitoring period to ensure that the innocent pod is not evicted, even after the abusive pods. This will likely result in a higher failure rate for this test, but since it is in the flaky test suite, this is not an issue. This change should help give us a better perspective on eviction issues. cc @Random-Liu @vishh @derekwaynecarr
parents 1a2ec1ad b798df8c
...@@ -233,7 +233,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs ...@@ -233,7 +233,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs
return nil return nil
}, evictionTestTimeout, evictionPollInterval).Should(BeNil()) }, evictionTestTimeout, evictionPollInterval).Should(BeNil())
By("making sure conditions do not return") By("making sure conditions do not return, and that pods that shouldnt fail dont fail")
Consistently(func() error { Consistently(func() error {
hasPressure, err := hasPressureCondition(f, testCondition) hasPressure, err := hasPressureCondition(f, testCondition)
if err != nil { if err != nil {
...@@ -245,6 +245,18 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs ...@@ -245,6 +245,18 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs
if hasPressure { if hasPressure {
return fmt.Errorf("%s dissappeared and then reappeared", testCondition) return fmt.Errorf("%s dissappeared and then reappeared", testCondition)
} }
// Gather current information
updatedPodList, _ := f.ClientSet.Core().Pods(f.Namespace.Name).List(metav1.ListOptions{})
for _, priorityPodSpec := range podTestSpecs {
// EvictionPriority 0 pods should not fail
if priorityPodSpec.evictionPriority == 0 {
for _, p := range updatedPodList.Items {
if p.Name == priorityPodSpec.pod.Name && p.Status.Phase == v1.PodFailed {
return fmt.Errorf("%s pod failed (delayed) and shouldn't have failed", p.Name)
}
}
}
}
return nil return nil
}, postTestConditionMonitoringPeriod, evictionPollInterval).Should(BeNil()) }, postTestConditionMonitoringPeriod, evictionPollInterval).Should(BeNil())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment