You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Link routes: cap a late grant at the first deadline, and keep the orphan flag when the pidfile is unreadable #8609
Follow-ups from the fresh final review of #8603 at d63921f (approved with nits; none blocks the merge).
A late grant gives a candidate about 61 s, not the stated 60 s.src/link/route-rounds.ts sets grantedAt = host.now() in the grant tap. If OpenSSH prints the grant line just after spawnedAt + 30 s, before the next 1 s supervisor tick has stopped the candidate as grant_unobserved, readinessDeadline becomes the late grant plus 30 s. The wait is still bounded, but "at most 60 s" in the code comment, structure/remote-link.md, the guide and the PR text is slightly untrue; the probe path already refuses late results. Fix: cap the grant at the first deadline, Math.min(phase.grantedAt, phase.spawnedAt + READY_PROOF_MS) + READY_PROOF_MS, or ignore a grant that arrives after spawnedAt + READY_PROOF_MS. Test: skip READY_PROOF_MS + 500, grant, advance READY_PROOF_MS - 500, expect SIGTERM.
An unreadable pidfile counts as absent when the orphan flag is lifted.src/link/supervisor.ts (the branch where a flagged one-route link gains routes) with readPidfile, which returns null on any read or parse error. The flag is lifted and a candidate spawns while the earlier ssh may still hold the port. The candidate cannot take the port (ExitOnForwardFailure=yes), so the cost is a forward refusal and a 60 s rest. Fix: at that lift site keep the flag unless the read failed with ENOENT.
A stale doc comment.confirmedLineTrust in src/link/route-trust.ts still says "its one line for the alias must carry the confirmed key"; the code now accepts several lines for the alias when they carry the same key type and key.
Test nit. In tests/clients/link-route-supervisor.test.ts the loop that advances the fake clock until a probe appears only proves "within 61 s"; advance straight to the known backoff instead.
Also still open from the earlier review of this PR, by decision: the dashboard shows a generic error for the five new enrollment codes (link_pin_conflict, host_key_changed, trust_file_unexpected, key_cleanup_failed, link_cleanup_uncertain), and no real slow route (for example a relay route to a Windows Child) has been timed against the readiness budget.
Activity
fix(link): cap a late grant at the first deadline and keep the orphan…
fix(link): keep a multi-route link blocked while an unreadable pidfil…
fix(link): keep the orphan checks working when a stale pidfile cannot…
fix(link): settle a gaining link from its pidfile when a reload resta…
fix(link): send SIGKILL to a one-route ssh that ignores SIGTERM, keep…
fix(link): warn once when a stopped one-route child's exit stays unse…
docs(link): say a drained candidate halted with stop_unconfirmed logs…
docs(link): the drain's fresh stop time for a stopped candidate comes…
fix(link): warn once when a draining stop holds the lifecycle queue o…