Skip to content

WaitForSSH: say why SSH isn't coming up instead of spinning silently - #1294

Merged
cdalar merged 1 commit into
mainfrom
fix/waitforssh-surface-error
Nov 3, 2026
Merged

cdalar merged 1 commit into
mainfrom
fix/waitforssh-surface-error

Conversation

@cdalar

@cdalar cdalar commented Nov 3, 2026

Copy link
Copy Markdown
Owner

onctl -p ac create sat after βœ” VM IP: … until the 3m timeout. The container was up and /usr/bin/ssh reached it. But onctl's own Go dial got connect: no route to host: macOS Local Network privacy refuses non-Apple binaries on the vmnet LAN. WaitForSSH threw the error away on every 100ms retry, so it just looked hung.

  • Log each distinct dial failure at DEBUG.
  • Include the last error in the timeout message.
  • On darwin, after 3s of EHOSTUNREACH, print a one-time hint (spinner paused) pointing at System Settings > Privacy & Security > Local Network.

Tested: unit test for sshWaitHint. Also ran end to end with onctl -p ac create on this Mac. The hint appeared 3s after VM IP.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01Ba6Vc6erd3NJfAyafpSHBj

WaitForSSH retried every 100ms until vm.cloud-init.timeout and threw
each error away, so a create whose dial could never succeed looked
hung. On macOS that is what Local Network privacy does to an Apple
container (ac) VM: onctl's Go dial to the vmnet address fails with
EHOSTUNREACH ("no route to host") while /usr/bin/ssh reaches it fine.

- log each distinct dial failure at DEBUG
- include the last error in the timeout message
- on darwin, after 3s of EHOSTUNREACH, print a one-time hint pointing
  at System Settings > Privacy & Security > Local Network

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ba6Vc6erd3NJfAyafpSHBj
@cdalar
cdalar merged commit fe91f73 into main Nov 3, 2026
12 checks passed
@cdalar
cdalar deleted the fix/waitforssh-surface-error branch November 3, 2026 08:53
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 14.28571% with 24 lines in your changes missing coverage. Please review.
βœ… Project coverage is 51.19%. Comparing base (bf34e53) to head (a5ef1b5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/tools/remote-run.go 14.28% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1294      +/-   ##
==========================================
- Coverage   51.28%   51.19%   -0.10%     
==========================================
  Files          86       86              
  Lines       10165    10191      +26     
==========================================
+ Hits         5213     5217       +4     
- Misses       4952     4974      +22     

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 捒网址