Repository navigation
fix: give a box vast's ssh proxy when its direct port refuses connections - #102
Merged
Merged
Conversation
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.
Problem
On production (2026-11-22), every box a member rented on Vast machine 153597 gave a dead
krater sshwith "connection refused". On the boxsh45 2(instance 62020475):22/tcpto host port 20056, andVAST_TCP_PORT_22=20056was set in the container.sshdlistened on port 22 in the container, and Vast said the box was running.38.114.93.198:20056refused every connection, from a laptop and from weft.ssh5.vast.ai:12952) reached the samesshdand keys.Krater always recorded the direct port when Vast listed one, so the job page,
krater sshandkrater showgave the dead address.Change
The worker tests a running box's direct port with one TCP connection (
krater/compute/ssh_reach.py). A refusal moves the box to Vast's proxy address.flowchart TD A[Scheduler pass sees the box] --> B{Direct port and proxy both listed?} B -- no --> C[Use the one listed] B -- yes --> D{Can the port be tested now?} D -- "no: paused, quiet runner, stopping, Krater's network down" --> E{Moved to proxy before?} E -- yes --> P[Keep the proxy] E -- no --> F[Use the direct port] D -- yes --> G{TCP connect} G -- accepted --> F G -- refused --> H[Use the proxy, write one ssh_proxy event] G -- "timeout or error" --> Esshdstarts before the runner, so a refusal then is the host's fault.ssh_proxyevent marks that a box was moved to the proxy.Docs:
docs/compute/runner.md, the box SSH section.Limits
Checks
uv run ruff check .anduv run ruff format --check .pass.uv run pytest: 2130 passed, 1 skipped, against a local Postgres 16.Council review
Size: full. Rounds: 2