Repository navigation
fix: stop nok8s standup at the first container failure and roll back what launched - #1757
Merged
Merged
Conversation
UgaTheDev
requested review from
Vezio,
achandrasekar,
kalantar,
maugustosilva,
mengmeiye and
namasl
as code owners
August 10, 2026 05:30
Collaborator
|
Hi @UgaTheDev Thank you for the PR! Can you fix the ruff-format CI error and the conflicts? Thanks! |
A container that failed to start was recorded in errors and the loop kept going, so a failed vllm-0 still pulled and started epp and envoy. Nothing removed the containers already launched, and because epp and envoy run with --network host they held ports 9002/9003/9090/8081, tripping the preflight host-port check on the next standup. Return on the first launch failure instead of collecting errors across every container, and remove whatever was already up before returning. The same rollback runs when readiness times out, which left containers behind for the same reason. Container logs are dumped before removal: rm -f destroys them and a failed standup is exactly when they are needed. The rollback itself is best-effort so it cannot mask the failure that triggered it. Signed-off-by: Kush Zingade <[email protected]>
UgaTheDev
force-pushed
the
fix/nok8s-standup-rollback
branch
from
August 11, 2026 06:17
e52beba to
df6afef
Compare
mengmeiye
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A nok8s standup that fails on
vllm-0still pulls and startseppandenvoy, and leaves them running on the host.step_06_nok8s_deploy.py:82-97iterates every container, accumulating intoerrors, and only returns once all of them have been attempted. There is no rollback of what already launched. Becauseeppandenvoyuse--network host, they then hold 9002/9003/9090/8081, so the next standup attempt trips the preflight's own host-ports-in-use warning. Recovery works (teardown --methods nok8s), but the docs only mention it under "Ports busy", not as a required step after a failed standup.This stops at the first launch failure and removes what was already started before returning.
The ordering matters and the issue calls it out: rollback must not destroy the evidence. Logs for launched containers are dumped before anything is removed, so the failure is still diagnosable afterward.
_dump_logsis already best-effort (check=False,OSErrorswallowed), so the dump cannot make the failure path worse.Two regression tests, both verified to fail before the change: one that the loop stops and rolls back, one that logs are captured before removal. Full suite matches the pre-existing baseline on main.
Note this touches
step_06_nok8s_deploy.py, as does #1719 (readiness-timeout log dumping) and my #1756. The changes are in different functions, but whichever lands last will want a quick rebase.Fixes #1702