Repository navigation
[CI/Build] Restart k8s e2e engines that die during startup - #1196
rahulssv-ibm wants to merge 1 commit into
Conversation
On the first deploy of the k8s routing job, an engine can die with "RuntimeError: cudaHostAlloc failed: 1" while LMCache allocates its pinned buffer (vllm-project#1133). The container keeps running, so only the startup probe can restart it. The probe allows about 615s and wait-for-pods.sh gives up at 600s, so the restart never happens and the test fails. Lower failureThreshold to 30 in the roundrobin values, which is the first deploy of the job. A dead engine is then restarted at about 315s and can start again before the wait ends. An engine that never comes up still fails the test. Signed-off-by: Rahul <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request adds a startupProbe with a failureThreshold of 30 to the round-robin routing test configuration to ensure containers are restarted if they fail during startup. The reviewer recommends explicitly defining initialDelaySeconds and periodSeconds in this configuration to prevent the test budget from silently changing if global defaults are modified.
| startupProbe: | ||
| failureThreshold: 30 |
There was a problem hiding this comment.
To make this test configuration robust and self-contained, it is highly recommended to explicitly define initialDelaySeconds and periodSeconds alongside failureThreshold. Currently, this configuration implicitly relies on the default values defined in helm/values.yaml (which are 15 and 10 respectively). If those global defaults are ever modified in the future, the total startup probe budget for this test could silently change, potentially exceeding the 600s timeout or causing premature failures. Explicitly setting them here guarantees a consistent 315s budget.
startupProbe:
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 30
k8s-discovery-e2e-testkeeps failing on and off, on PRs and onmain(run 41551494154).roundrobinfailed in 13 of the last 60 jobs that reached a deploy. #1134 made the cause visible and left the fix open:RuntimeError: cudaHostAlloc failed: 1.delay=15s period=10s #failure=60), andwait-for-pods.shgives up at 600s. The restart never happens, so the test fails.This PR lowers the probe budget to about 315s in
values-08-roundrobin-routing.yaml, so the kubelet restarts a dead engine while the test is still waiting. An engine that never comes up still fails the test at 600s, with its log in the job output.Follow-up to #1133.
Why this value
Time from
RunningtoReadyfor healthy engines, from the logs of those 60 jobs. Image pull and PVC bind happen beforeRunning, and the probe doesn't count them.roundrobinA dead engine should recover at about 490s: about 5s to start, 315s of probing, up to 30s of termination grace and about 140s for the second startup. That is within the 600s wait.
Why only this file
Every
cudaHostAllocfailure I could find was on the first deploy. In the 24 runs with usable engine logs,roundrobinfailed 5 times and the later tests failed 0 of 72.values-07-prefix-routing.yamlhas the sameservingEngineSpec, so the position in the job matters, not the engine config.What this doesn't do
docker buildruns inside minikube, so memory pressure in the minikube container (see [Bugfix][CI] Fix k8s e2e engine OOM and raise test timeouts #1119) is my best guess, but I can't confirm it without the runner.Testing
helm templatewith this values file: the only rendered change is the engine'sfailureThreshold, from 60 to 30. The router probe doesn't change, and schema validation passes.wait-for-pods.shwith a stubbedkubectl: an engine that goes throughErrorandCrashLoopBackOffand comes back exits 0. An engine that never comes up times out, printscudaHostAlloc failedand exits 1.mainto confirm it's gone.pre-commit run --files tests/assets/values-08-roundrobin-routing.yaml: pass.-swhen doinggit commit[Bugfix],[Feat], and[CI].