Skip to content

agent: registrar watch stream logs ERROR 'watch stream disconnected … received prior goaway' on every registrar roll; a server-initiated GOAWAY is a graceful handoff, not a failure #718

Closed

Description

@bpalermo

Observation

On every chart upgrade tonight (helm rev199/200/201, 2026-09-05), the registrar Deployment rolled and one or two agents logged, at ERROR:

registrar/registrar.go:588 watch stream disconnected
  rpc error: code = Unavailable desc = closing transport due to: connection error: desc = "error reading from server: EOF", received prior goaway: code: NO_ERROR ...

The agent reconnected to the surviving replica immediately; no other effect. It is now the only ERROR an agent emits in a healthy deploy (after #700 removed the startup one), so it trips every "zero ERROR lines" gate (deploy validation, the pressure harness's informational list, soak grading) and has to be explained away by hand each time.

Ask

When the stream ends with a server-sent GOAWAY (NO_ERROR) — i.e. the registrar is draining for a roll — log the disconnect at INFO/WARN with a server_drain=true marker and reconnect without the failure backoff; keep ERROR (and the watch_errors metric) for stream failures that are not a graceful drain. The gRPC status carries the GOAWAY in the error string; status.Code == Unavailable with a received prior goaway / NO_ERROR detail is the discriminator. Unit test with an in-process registrar that calls GracefulStop() mid-stream.

Low priority; filed so it is not rediscovered. Refs #700 (the startup case, fixed in #712), #612 (reconnect cost under concurrency).

Activity

  1. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    Validated on talos-main after the #720 merge (helm rev202, chart 0.92.5-bc601f4, 22:24–22:29Z 2026-09-05). The upgrade rolled the registrar Deployment as usual; the one agent whose stream was on the draining replica (main-worker-02) logged exactly one INFO watch stream closed by server drain; reconnecting with server_drain=true, and the fleet has zero agent ERROR lines — the first deploy since #700 with none to explain away. Roll hitless: liveness 0/6,294, mesh_dns 0 errors, restarts 0, rate 128/s flat. Note for graders: a genuine disconnect now reads watch stream disconnected, retrying (message changed) and pays a ~1s jittered backoff the established-stream path previously did not have.

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

Metadata

Metadata

Assignees

No one assigned

    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