sandbox-relay: server keepalive, so a P4 host whose network drops is detected before the router's 5 m timeout
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- grpc, typescript
- Domain
- networking
Research direction
Start with packages/sandbox-relay/src/main.ts and newServer() to inspect the server's gRPC options, then compare them with the worker keepalive settings in remote-worker/internal/session/dial.go and duplicate-session handling in relay.ts. Add the transport test described in the issue. Done means a dead peer is detected within the keepalive bound, the session is torn down, presence is removed, and the worker's pings do not trigger GOAWAY too_many_pings.
Written by the indexing model from the issue text.
Description
Follow-up from #437, P6 on Kubernetes slice 2 (#424). The final review found this. The gap predates slice 2, but slice 2 makes it matter: P4 hosts now attach over the WAN.
Where: packages/sandbox-relay/src/main.ts, newServer(). The gRPC server sets no keepalive options.
What happens:
- A P4 host's network drops without a TCP close. Examples: a NAT or EC2 security-group change, a host reboot, a cable pull.
- The relay keeps the old Attach stream until the OpenShift router's passthrough tunnel times out (
haproxy.router.openshift.io/timeout: 5mon Routemoca-relay). Until then:- the host's reconnect is refused as a duplicate
sandboxId(relay.tsrejects a second live session for an ID); - turns leased to the stale
sh:sandbox:recordsentry fail.
- the host's reconnect is refused as a duplicate
Fix:
- Add server keepalive in
newServer():grpc.keepalive_time_msandgrpc.keepalive_timeout_ms(for example 30 s / 10 s), so a dead peer is detected in under a minute. - Check the server's ping policy against the worker's own 30 s client keepalive (
remote-worker/internal/session/dial.go):grpc.http2.min_ping_interval_without_data_msandgrpc.keepalive_permit_without_calls. The relay must not answer the worker's pings withGOAWAY too_many_pings. - Test: a transport test in which a client stops reading or acking. The relay must tear the session down, and remove presence, within the keepalive bound.
The live run (#424 results) stayed attached for 24 minutes, 11 of them idle, with one attach. So the happy path is fine today; this is only about detecting a dead peer.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 9
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 139
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rossoctl/moca
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rossoctl/moca#421 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mermaid-js/mermaid#8546 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainers usually reply within 1 day