mirror of https://github.com/k3s-io/k3s
Merge pull request #38895 from dashpole/e2e_node_timeout
Automatic merge from submit-queue (batch tested with PRs 38888, 38895) InodeEviction Test failing because of docker race condition. The inode eviciton test was failing because of a bug in docker/docker#21215. Inode eviction test triggers garbage collection of images, which causes an error if kubernetes tries to "docker images list" at the same time. This is not relevant to the inode eviction test, so do not cause the test to fail if this race occurs. @Random-Liupull/6/head
commit
d381ff422f
|
@ -146,7 +146,9 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs
|
|||
It(fmt.Sprintf("should eventually see %s, and then evict all of the correct pods", testCondition), func() {
|
||||
Eventually(func() error {
|
||||
hasPressure, err := hasPressureCondition(f, testCondition)
|
||||
framework.ExpectNoError(err, fmt.Sprintf("checking if we have %s", testCondition))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if hasPressure {
|
||||
return nil
|
||||
}
|
||||
|
@ -161,7 +163,9 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs
|
|||
framework.Logf("fetching pod %s; phase= %v", p.Name, p.Status.Phase)
|
||||
}
|
||||
_, err = hasPressureCondition(f, testCondition)
|
||||
framework.ExpectNoError(err, fmt.Sprintf("checking if we have %s", testCondition))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
By("checking eviction ordering and ensuring important pods dont fail")
|
||||
done := true
|
||||
|
@ -216,7 +220,9 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs
|
|||
By("making sure conditions eventually return to normal")
|
||||
Eventually(func() error {
|
||||
hasPressure, err := hasPressureCondition(f, testCondition)
|
||||
framework.ExpectNoError(err, fmt.Sprintf("checking if we have %s", testCondition))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if hasPressure {
|
||||
return fmt.Errorf("Conditions havent returned to normal, we still have %s", testCondition)
|
||||
}
|
||||
|
@ -226,7 +232,12 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs
|
|||
By("making sure conditions do not return")
|
||||
Consistently(func() error {
|
||||
hasPressure, err := hasPressureCondition(f, testCondition)
|
||||
framework.ExpectNoError(err, fmt.Sprintf("checking if we have %s", testCondition))
|
||||
if err != nil {
|
||||
// Race conditions sometimes occur when checking pressure condition due to #38710 (Docker bug)
|
||||
// Do not fail the test when this occurs, since this is expected to happen occasionally.
|
||||
framework.Logf("Failed to check pressure condition. Error: %v", err)
|
||||
return nil
|
||||
}
|
||||
if hasPressure {
|
||||
return fmt.Errorf("%s dissappeared and then reappeared", testCondition)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue