Skip to content

[Bug]: Restarting only atenet-router ingress container leaves Envoy permanently unready #3601

Open

Description

What happened?

When only the ingress router container in the atenet-router pod receives SIGTERM (when e.g. failing its liveness probe), it puts the accompanying Envoy container into a draining state with intentionally failing readiness probe. However, since Envoy never received SIGTERM itself it remains in that state indefinitely. Ingress to the cluster is effectively broken for the default install until the atenet-router pod is manually deleted.

Expected Behavior

When the atenet-router ingress container receives SIGTERM and restarts, the Envoy container eventually becomes healthy and passes traffic again.

Steps to Reproduce

Reproducible on a clean kind cluster with a fresh Substrate install:

# stop only the router container, with non-zero timeout for SIGTERM rather than SIGKILL
NODE=<kind node>; POD_UID=<router pod uid>
SANDBOX=$(docker exec $NODE crictl pods --label io.kubernetes.pod.uid=$POD_UID -q)
CID=$(docker exec $NODE crictl ps --pod $SANDBOX --name '^atenet-router$' -q)
docker exec $NODE crictl stop --timeout 30 $CID

I encountered this while running locally and running up against the hosting VM's memory limit.
The atenet-router pod's router container failed its liveness probes enough to get a SIGTERM.
When the system overall eventually recovered, Envoy remained unhealthy until I manually deleted
the atenet-router pod.

Sandbox Runtime

Both / Runtime Agnostic

Agent Substrate Version / Commit SHA

5a5b192

Kubernetes Version & Environment

Kubernetes: kind v0.33.0, node v1.37.0, containerd 2.3.4; Envoy 1.39.5; running locally

Host OS & Architecture

macOS 26.7.1 arm64 running a Lima VM (Ubuntu 24.04.5, aarch64, kernel 6.8.0)

Relevant Logs and Diagnostic Output

`kubectl get pods -n ate-system` shows `atenet-router-***` pod at 1/2 ready indefinitely:


NAME                              READY   STATUS      RESTARTS        AGE
ate-api-server-557cd56d66-4cc99   2/2     Running     1 (98m ago)     4h46m
ate-api-server-557cd56d66-brk4q   2/2     Running     1 (97m ago)     4h46m
ate-controller-c9b565767-vh7dn    1/1     Running     0               4h46m
ate-idp-server-847879c4b-fmqsq    1/1     Running     2 (97m ago)     4h46m
ate-idp-server-847879c4b-mckkz    1/1     Running     2 (97m ago)     4h46m
atelet-29h6b                      2/2     Running     0               4h46m
atelet-nhkdv                      2/2     Running     0               4h46m
atelet-qdckp                      2/2     Running     0               4h46m
atenet-egress-6c5fd67895-jsc78    3/3     Running     0               4h45m
atenet-router-84c4dd599b-jxjnv    1/2     Running     2 (7m25s ago)   20m
postgres-0                        2/2     Running     0               4h46m
rustfs-54c86945fb-cf5dj           1/1     Running     0               4h45m
rustfs-bucket-init-h86bz          0/1     Completed   0               4h45m


`kubectl logs -n ate-system $POD -c atenet-router` after the container restarts shows logs like:


{"time":"2026-11-03T19:05:34.208501058Z","level":"ERROR","msg":"Router dataplane health check failed","msg":"unexpected status code 503"}
{"time":"2026-11-03T19:05:35.207761177Z","level":"INFO","msg":"Checking health"}
{"time":"2026-11-03T19:05:35.209016607Z","level":"ERROR","msg":"Router dataplane health check failed","msg":"unexpected status code 503"}
{"time":"2026-11-03T19:05:36.208074878Z","level":"INFO","msg":"Checking health"}
{"time":"2026-11-03T19:05:36.209516406Z","level":"ERROR","msg":"Router dataplane health check failed","msg":"unexpected status code 503"}

Additional Context

The graceful termination procedure for atenet-router (#774) assumes both containers
receive SIGTERM and are in the process of shutting down, and orchestrates
shutdown cleanly in multiple phases under that assumption. It does not account
for the case where the atenet-router container receives SIGTERM but
Envoy does not.

In that case, the atenet-router container proceeds through its phases,
draining Envoy listeners and calling Envoy's /healthcheck/fail. However,
Envoy never runs its preStop hook, and it never exits.
The atenet-router container restarts, and from there until some
manual intervention Envoy remains in a draining/unready state.

A similar outcome obtains if the atenet-router container fails to proceed all the way through its shutdown phases before the process dies.

Confirmation

  • I have searched existing issues and verified that this is not a duplicate.
  • I have verified that this issue occurs on the latest commit on main.

Activity

  1. added
    kind/bug
    on Nov 3, 2026
  2. mmcgill-supabase commented on Nov 3, 2026

    @mmcgill-supabase
    Author

    I have a local candidate fix that has the router, for a period of time after startup, poll the Envoy /ready endpoint. If that endpoint indicates Envoy is DRAINING, the router kills Envoy by calling /quitquitquit and things recover when Envoy restarts.

    If that seems like a plausible approach, I'll submit a PR. Thoughts?

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

    area/networkarea/reliabilitykind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions