-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use RELEASE_ASSERT instead of raise(SIGABRT) in kill_request filter #15999
Conversation
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.
Looks good. I don't know what the format error is about.
@@ -81,7 +81,7 @@ Http::FilterHeadersStatus KillRequestFilter::encodeHeaders(Http::ResponseHeaderM | |||
|
|||
if (isKillRequest(headers) && isKillRequestEnabled()) { | |||
// Crash Envoy. | |||
raise(SIGABRT); | |||
RELEASE_ASSERT(false, "KillRequestFilter is crashing Envoy!!!"); |
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.
Should we consider adding some EXPECT_DEATH tests that look for the message above when terminating the process due to use of this filter?
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.
I think these death tests are already there in the kill_request_filter_test.cc
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.
Right. My request is to change expectations like:
EXPECT_DEATH(filter_->decodeHeaders(request_headers_, false), "");
to:
EXPECT_DEATH(filter_->decodeHeaders(request_headers_, false), "KillRequestFilter is crashing Envoy!!!");
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.
thanks. Updated the test.
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[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.
Thanks!
…quest filter (envoyproxy#15999) Signed-off-by: [email protected] <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Commit Message: Use
RELEASE_ASSERT
instead ofraise(SIGABRT)
in kill_request filter to provide better logging when the filter is crashing Envoy.Additional Description: N/A
Risk Level: low
Testing: unit test, integration test
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
/assign @antoniovicente