apollo_node: restart a node that fails to start instead of failing the run - #15039
Open
asaf-sw wants to merge 1 commit into
Open
apollo_node: restart a node that fails to start instead of failing the run#15039asaf-sw wants to merge 1 commit into
asaf-sw wants to merge 1 commit into
Conversation
…e run Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Restarts a node that fails to start, instead of failing the whole run on what is usually a transient port collision.
This is a safety net and worth reviewing as one: #14964 already removed the two causes behind the failures we actually observed, so holding this until we see whether
AddrInUserecurs is a reasonable call.Detailed Summary for AI Bots
Problem
spawn_run_nodeturns any node exit into a panic that fails the run:A port that passed the allocator's probe can be taken before the node binds it, losing the run to something that would have worked on a second attempt.
Change
spawn_run_noderestarts a node that exits within 30 seconds of being spawned, up to 3 attempts with a 2 second backoff.AddrInUsespecifically. The error appears only in the child's own output, so matching on it means parsing a log stream. An early exit is a startup failure whatever the cause, and a deterministic one still fails the run after 3 attempts, with the uptime and attempt count in the message.Verification
cargo build -p apollo_node --all-featuresandcargo clippy -p apollo_node --all-targets --all-features -- -D warningsare clean.The retry path has no automated test: reproducing it means racing a real port bind against a child process, which is the same non-determinism this change absorbs.