Skip to content

egress control client: keep the connection when a call outlives its ctx #587

Closed

Description

@pdettori

Follow-up from the #583 review (comment #583 (comment)), deferred out of that PR by agreement.

Problem. A control call abandoned mid-flight (its ctx expires with the reply still pending) drops the shared connection. That has three effects:

  • the server Unregisters every VM on the connection;
  • Proxy.Unregister aborts all their live connections;
  • so one Register that exceeds egressControlTimeout (for example, moca-egress briefly slow under load) kills every in-flight git clone on the host until the heal loop re-registers, about 100 ms later.

#583 documents this in client.go. In practice it is rare: the launcher's calls no longer inherit the Exec request's cancel, so only a stalled moca-egress gets here.

Proposed. Keep the connection: record one owed reply and have the per-connection reader discard it. Alternatively, add a request id to ControlRequest/ControlReply, which is an additive change on the wire. Add a test that one timed-out call leaves the other VMs' tunnels intact.

Related: #277, #583.

Activity

  1. self-assigned this
    on Oct 26, 2026
  2. added a commit that references this issue on Oct 27, 2026
    136a9e8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions