mirror of https://github.com/k3s-io/k3s
Merge pull request #42015 from dashpole/min_timeout_eviction
Automatic merge from submit-queue (batch tested with PRs 42162, 41973, 42015, 42115, 41923) Increase Min Timeout for kill pod Should mitigate #41347, which describes flakes in the inode eviction test due to "GracePeriodExceeded" errors. When we use gracePeriod == 0, as we do in eviction, the pod worker currently sets a timeout of 2 seconds to kill a pod. We are hitting this timeout fairly often during eviction tests, causing extra pods to be evicted (since the eviction manager "fails" to evict that pod, and kills the next one). This PR increases the timeout from 2 seconds to 4, although we could increase it even more if we think that would be appropriate. cc @yujuhong @vishh @derekwaynecarrpull/6/head
commit
9f3343df40
|
@ -291,9 +291,9 @@ func killPodNow(podWorkers PodWorkers, recorder record.EventRecorder) eviction.K
|
|||
}
|
||||
|
||||
// we timeout and return an error if we don't get a callback within a reasonable time.
|
||||
// the default timeout is relative to the grace period (we settle on 2s to wait for kubelet->runtime traffic to complete in sigkill)
|
||||
// the default timeout is relative to the grace period (we settle on 10s to wait for kubelet->runtime traffic to complete in sigkill)
|
||||
timeout := int64(gracePeriod + (gracePeriod / 2))
|
||||
minTimeout := int64(2)
|
||||
minTimeout := int64(10)
|
||||
if timeout < minTimeout {
|
||||
timeout = minTimeout
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue