mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #128648 from pohly/dra-scheduler-perf-flake
scheduler_perf: fix steady-state pod creation/deletion
This commit is contained in:
commit
48ead4e622
@ -1953,12 +1953,19 @@ func createPodsSteadily(tCtx ktesting.TContext, namespace string, podInformer co
|
|||||||
}, metav1.ListOptions{})
|
}, metav1.ListOptions{})
|
||||||
// Ignore errors when the time is up. errors.Is(context.Canceled) would
|
// Ignore errors when the time is up. errors.Is(context.Canceled) would
|
||||||
// be more precise, but doesn't work because client-go doesn't reliably
|
// be more precise, but doesn't work because client-go doesn't reliably
|
||||||
// propagate it. Instead, this was seen:
|
// propagate it.
|
||||||
// client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
|
|
||||||
if tCtx.Err() != nil {
|
if tCtx.Err() != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// Worse, sometimes rate limiting gives up *before* the context deadline is reached.
|
||||||
|
// Then we get here with this error:
|
||||||
|
// client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
|
||||||
|
//
|
||||||
|
// This also can be ignored. We'll retry if the test is not done yet.
|
||||||
|
if strings.Contains(err.Error(), "would exceed context deadline") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
return fmt.Errorf("delete scheduled pods: %w", err)
|
return fmt.Errorf("delete scheduled pods: %w", err)
|
||||||
}
|
}
|
||||||
err = strategy(tCtx, tCtx.Client(), namespace, cpo.Count)
|
err = strategy(tCtx, tCtx.Client(), namespace, cpo.Count)
|
||||||
|
Loading…
Reference in New Issue
Block a user