-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gracefully shutdown HTTP, gRPC, and Prom servers #1342
Conversation
This catches sigint and sigterm and calls each server's shutdown method, blocking until shutdown completes. This is only added for non-Duplex, we'll need to add a shutdown method for Duplex servers. Signed-off-by: Hayden Blauzvern <[email protected]>
Tested with I tried to get this working for Duplex by calling |
Codecov Report
@@ Coverage Diff @@
## main #1342 +/- ##
==========================================
- Coverage 58.49% 57.56% -0.93%
==========================================
Files 50 50
Lines 3053 3111 +58
==========================================
+ Hits 1786 1791 +5
- Misses 1110 1161 +51
- Partials 157 159 +2
|
Signed-off-by: Hayden Blauzvern <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ports are already in use (e.g. tcp :2112: bind: address already in use
), the server will hang instead of quickly failing and exiting
Signed-off-by: Hayden Blauzvern <[email protected]>
@bobcallaway Fixed comments, also made the unix domain socket configurable so that you can start up two fulcios on the same machine |
This catches sigint and sigterm and calls each server's shutdown method, blocking until shutdown completes.
This is only added for non-Duplex, we'll need to add a shutdown method for Duplex servers.
Fixes #1341
Summary
Release Note
Documentation