Feature/tnz 75769 emergency tls route unregistration#1144
Draft
kart2bc wants to merge 4 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backward Compatibility
Breaking Change? Yes/No