Skip to content

fix(proxy-supervisor): don't externally kill the old hot-restart epoch (talos-validated) - #105

Merged
bpalermo merged 3 commits into
mainfrom
spike/proxy-hot-restart
Jun 9, 2026
Merged

bpalermo merged 3 commits into
mainfrom
spike/proxy-hot-restart

Conversation

@bpalermo

@bpalermo bpalermo commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #104. The merged Strategy-A supervisor had a bug that talos-main e2e caught: after a successful hot restart, the new epoch crashed ~70s later and the container restarted.

hot_restarting_base.cc] hot restart sendmsg() ... errno 111 (connection refused)
assert failure ... Caught Aborted
Error: envoy epoch 1 exited unexpectedly: signal: aborted

Root cause: the supervisor externally SIGTERMed the old epoch at --parent-shutdown-time, racing Envoy's own hot-restart IPC. Envoy already terminates the parent itself (as hot-restarter.py relies on); the supervisor must only reap it.

Fix: remove scheduleParentShutdown / the supervisor's parent-kill. --parent-shutdown-time-s is still passed to Envoy, which drives parent termination.

Validation (talos-main, rev 30, fixed image)

  • Hot restart epoch 0 → 1, hot_restart_generation 1 → 2, 4 listeners preserved, server.live held.
  • Old epoch reaped by Envoy's own parent-shutdown (~76s) — no external SIGTERM, no crash.
  • restartCount stayed 0 through ~104s past the restart (the window that previously crashed). In-place, no pod restart.

Doc updated with the finding + the GREEN re-validation and a test-workload caveat (the aether-test app path wasn't mesh-intercepted during the run, so guarantees were proven via Envoy's own signals rather than an app-level zero-drop curl).

Test plan

  • bazel test //agent/internal/proxy/hotrestart/... ✅
  • Deployed + hot-restarted on talos-main, validated stable past parent-shutdown ✅

🤖 Generated with Claude Code

bpalermo and others added 2 commits June 9, 2026 20:41
talos-main e2e found that after a successful hot restart (epoch 0->1,
hot_restart_generation 1->2, socket handoff), the new epoch aborted ~70s
later with `hot restart sendmsg() ... errno 111` and the container restarted.

Cause: the supervisor SIGTERMed the previous epoch at --parent-shutdown-time,
racing Envoy's own hot-restart IPC; the new epoch's sendmsg to the killed
parent failed and Envoy asserted. Envoy already coordinates parent shutdown
itself via --parent-shutdown-time-s (as hot-restarter.py relies on), so the
supervisor must not signal the parent -- it only reaps it on exit.

Records the finding in the proposal.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Strategy A re-validated after the parent-kill fix: hot restart epoch 0->1,
hot_restart_generation 1->2, listeners preserved, old epoch reaped by Envoy's
own parent-shutdown, restartCount stayed 0 ~104s past the restart. Notes the
test-workload caveat (app path wasn't mesh-intercepted; guarantees proven via
Envoy signals).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@bpalermo
bpalermo force-pushed the spike/proxy-hot-restart branch from 3c41282 to 841461a Compare June 9, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant