Skip to content

Feature/tnz 75769 emergency tls route unregistration#1144

Draft
kart2bc wants to merge 4 commits into
developfrom
feature/TNZ-75769-emergency-tls-route-unregistration
Draft

Feature/tnz 75769 emergency tls route unregistration#1144
kart2bc wants to merge 4 commits into
developfrom
feature/TNZ-75769-emergency-tls-route-unregistration

Conversation

@kart2bc

@kart2bc kart2bc commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Backward Compatibility

Breaking Change? Yes/No

kart2bc and others added 4 commits June 8, 2026 16:03
Adds GetAllUnregistrationMessages() to the RoutingTable interface and
both internalRoutingTable and routingTable implementations. Reuses the
existing emitDiffMessages() machinery with reversed before/after args to
produce unregistration messages for all currently tracked routes.
Updates FakeRoutingTable with full counterfeiter-style stub.

TNZ-75769 ai-assisted=yes

Co-authored-by: Cursor <cursoragent@cursor.com>
Emits all routes currently in the routing table as NATS unregister
messages. Logs the unregistration count, handles NATS emitter errors
gracefully, and is a no-op when natsEmitter is nil.

TNZ-75769 ai-assisted=yes

Co-authored-by: Cursor <cursoragent@cursor.com>
…stration

Adds a SIGUSR2 signal handler goroutine in main.go. When the signal is
received (sent by drain.erb after Rep exits), all active routes from the
routing table are immediately emitted as NATS router.unregister messages,
giving gorouter 30+ seconds to clear stale TLS routes before SIGKILL.

TNZ-75769 ai-assisted=yes

Co-authored-by: Cursor <cursoragent@cursor.com>
After Rep finishes evacuating and before bpm stops it, drain.erb now
calls emergency_unregister_routes(). This sends SIGUSR2 to the
co-located route-emitter (identified via bpm pid), then waits 35 seconds
for NATS unregister messages to be delivered to gorouter before stopping
rep. If route-emitter is not running the step is a no-op.

TNZ-75769 ai-assisted=yes

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant