Skip to content

agent: callers are told a snapshot build failed when the snapshot was installed and is being served #1620

Closed

Description

@bpalermo

Since #1608 generateSnapshot does its bookkeeping for a snapshot whose SetSnapshot returned an error (the snapshot is installed; only answering an open watch failed), but it still returns that error. AddPod, and through it the CNI server, RemoveCluster and the other callers therefore report failure for state that is installed and served: a CNI ADD can fail and be retried although the pod's listeners are published.

Decide per caller whether "installed, one watch not answered" is an error at all (the proxy will get the resources on its next request), and return a distinguishable value so the CNI path does not fail a pod start for it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

  1. added
    bug
    minor
    proxy
    on Oct 9, 2026
  2. bpalermo commented on Oct 10, 2026

    @bpalermo
    OwnerAuthor

    PR #1625 fixes the cause that could be reached and leaves the caller side.

    Done there: SetSnapshot is no longer called under the caller's context, so a caller whose context has already ended (a CNI ADD whose RPC was abandoned) no longer leaves watches unanswered or gets an error for an installed snapshot. A build that could not hand a response to an open watch within its bound (5 s) returns cache.ErrWatchNotAnswered, wrapped by every mutator, so a caller can tell it with errors.Is.

    Left: agent/internal/cni/server/pod.go still turns every SnapshotCache.AddPod error into codes.Internal. If the bound expires, the pod's snapshot is installed and served, and the ADD is still reported failed and retried. The CNI caller should treat errors.Is(err, cache.ErrWatchNotAnswered) as installed (the build has already logged snapshot installed, but an open watch was not answered from it at WARN). The other callers outside the cache package that return a build's error (takeover.go, the cluster and secret setters' callers) are worth the same look.

    The bound is not expected to expire: #1619 shows no stream of the pinned go-control-plane can refuse a response.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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

    bugminorproxy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions