Skip to content

registrar (kubernetes backend): the agent's second drain step (UNHEALTHY ~1 s before SIGTERM) reaches only the receiving replica #1144

Closed

Description

@bpalermo

Follow-up from #1124 (PR #1142). On the kubernetes backend RegisterEndpoint/UnregisterEndpoint are no-ops, so a health change an agent sends to one registrar replica lives only in that replica's overlay. #1142 fixed the DRAINING mark by deriving it from the Pod's deletionTimestamp on every replica (push via a Pod informer). The two-phase drain's SECOND step (#152: the agent marks the pod UNHEALTHY about 1 s before SIGTERM so sources close their connection pools) still reaches only the receiving replica; agents on the other replica see UNHEALTHY only when the pod's Ready condition drops, i.e. after the containers stop. Effect: pools to the terminating pod stay open ~1 s longer from sources attached to the other replica — new requests already stop at DRAINING, so this is the pool-close timing, not request routing. Fix options: derive the UNHEALTHY step from a pod-visible signal too (a condition/annotation the agent sets, or a time-since-deletionTimestamp rule), or forward health marks between replicas over the registrar gRPC. Measure first with the REGISTRY_BACKEND=kubernetes mode of e2e/drain-propagation.sh (pool-close time per replica).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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