hot-restarter.py: revert SIGCHLD handler to force kill instead of term#2640
Merged
htuch merged 1 commit intoenvoyproxy:masterfrom Feb 22, 2018
Merged
Conversation
PR: envoyproxy#2596 changed the behavior of the SIGTERM and SIGCHLD handlers to attempt to allow child processes to exit gracefully before force killing them. This PR reverts the behavior of the SIGCHLD handler back to force killing children if a child exits uncleanly. This should allow the supervisor of the python process (e.g. runit) to restart envoy with a shorter delay (whereas an attempt at graceful TERM might delay up to TERM_WAIT_SECONDS). Note: If the child process of hot-restarter.py is a container framework (e.g. runc), the force kill might result in container state being leaked. This should hopefully be a rare occurrence. Signed-off-by: Michael Puncel <mpuncel@squareup.com>
2f0040e to
9db2974
Compare
htuch
reviewed
Feb 19, 2018
Member
htuch
left a comment
There was a problem hiding this comment.
@mpuncel seems reasonable as per @mattklein123 's ask. Thoughts on adding an integration sh_test with this?
Contributor
Author
|
sounds good to me, FYI it will probably take me a bit to get the developer environment set up |
Member
|
@htuch @danielhochman @mpuncel IMO this is somewhat of a regression. Can we merge this and then file a follow up issue for adding tests? |
Contributor
Author
|
if you'd prefer, I can also revert my previous PR and submit a new one with tests once I get the chance |
Member
|
I will defer to @htuch @danielhochman. I don't really think the other PR needs to get reverted but I would rather merge this sooner rather than later. |
danielhochman
approved these changes
Feb 21, 2018
Member
|
Fair enough, tests welcome in a followup PR. |
Shikugawa
pushed a commit
to Shikugawa/envoy
that referenced
this pull request
Mar 28, 2020
* prototype configurable metrics Signed-off-by: Kuat Yessenov <kuat@google.com> * fix license Signed-off-by: Kuat Yessenov <kuat@google.com> * format and regenerate Signed-off-by: Kuat Yessenov <kuat@google.com> * fix non-det config Signed-off-by: Kuat Yessenov <kuat@google.com> * generalize metric overrides Signed-off-by: Kuat Yessenov <kuat@google.com> * merge fix Signed-off-by: Kuat Yessenov <kuat@google.com> * wip Signed-off-by: Kuat Yessenov <kuat@google.com> * update PR Signed-off-by: Kuat Yessenov <kuat@google.com> * update Signed-off-by: Kuat Yessenov <kuat@google.com> * make example more complicated Signed-off-by: Kuat Yessenov <kuat@google.com> * asan debugging Signed-off-by: Kuat Yessenov <kuat@google.com> * stats golint Signed-off-by: Kuat Yessenov <kuat@google.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.
PR: #2596 changed the behavior of the SIGTERM and SIGCHLD handlers to
attempt to allow child processes to exit gracefully before force killing
them. This PR reverts the behavior of the SIGCHLD handler back to force
killing children if a child exits uncleanly. This should allow the
supervisor of the python process (e.g. runit) to restart envoy with a
shorter delay (whereas an attempt at graceful TERM might delay up to
TERM_WAIT_SECONDS).
Note: If the child process of hot-restarter.py is a container framework
(e.g. runc), the force kill might result in container state being
leaked. This should hopefully be a rare occurrence.
Signed-off-by: Michael Puncel mpuncel@squareup.com
title: Revert SIGCHLD handler in hot-restarter.py to force killing children instead of attempting graceful shutdown
Description:
Reverts the behavior of the hot-restarter.py
Risk Level: Low | Medium | High
Low
Testing:
I ran hot-restarter.py manually with /usr/bin/false and saw it print that it was sending a TERM
ran it with
/usr/bin/trueand saw that it exited cleanly without terminating childrenDocs Changes:
no docs changes
Release Notes:
no release notes