-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
drain manager: Make probabilistic drain configurable #11403
Conversation
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
@mattklein123 wanted to get your thoughts on this before I add the docs and release notes. I added a bool that guards the probabilistic drain behaviour, but I've got two thoughts:
|
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
+1 agreed this seems more future proof.
For integration tests it seems reasonable to allow direct access, but I will defer to @alyssawilk on that (it might already be possible). |
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
I don't mind allowing direct access, but please be mindful of thread safety issues - I think accessing it after the server starts running would be problematic. |
I decided this was too complicated for this PR and just plumbed the other variable. I'll maybe try to get this to work on the side. |
Signed-off-by: Auni Ahsan <[email protected]>
I'm going to assume this is still not ready for review as CI is red. Ping when it's ready for a pass! |
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Shikugawa <[email protected]> Signed-off-by: Auni Ahsan <[email protected]>
Moving the choice of http or tcp connection pool from the router to the generic connection pool. This will allow pluggable connection pools to choose to do HTTP or TCP on their own, as well as getting rid of a bunch of ugly variant logic. Risk Level: medium (router refactor, ideally no-op) Testing: existing test pass Docs Changes: n/a Release Notes: n/a Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Auni Ahsan <[email protected]>
…nvoyproxy#11126) Commit Message: grpc-json: preserve http request method in `x-envoy-original-method` header so that applications have access to it. Additional Description: The grpc-json transcoder currently forwards HTTP path to applications via "x-envoy-original-path" header. We would find it useful if it also forwarded the HTTP method. Risk Level: Low Testing: Updated grpc-json-transcoder unit tests Docs Changes: Added docs Release Notes: Added release notes Signed-off-by: Phillip Huang <[email protected]> Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
OK @alyssawilk this is green. |
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! just a few comments from my end.
void setParentShutdownTime(std::chrono::seconds parent_shutdown_time) { | ||
parent_shutdown_time_ = parent_shutdown_time; | ||
} | ||
void setDrainStrategy(Server::DrainStrategy drain_strategy) { drain_strategy_ = drain_strategy; } | ||
void setLogLevel(spdlog::level::level_enum log_level) { log_level_ = log_level; } |
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.
Why move these?
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.
Haha, the diff makes it look weird, but I was trying to move setParentShutdownTime(std::chrono::seconds)
in order to group all of the drain-related setters together.
EXPECT_CALL(server_, healthCheckFailed()).Times(0); // Listener check will short-circuit | ||
EXPECT_FALSE(drain_manager.drainClose()); | ||
} | ||
INSTANTIATE_TEST_SUITE_P(DrainGradually, DrainManagerImplTest, testing::Bool()); |
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.
Is DrainGradually the correct name for this? Perhaps DrainStrategies?
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.
Done.
signal_handling_enabled_(true), mutex_tracing_enabled_(false), cpuset_threads_(false), | ||
fake_symbol_table_enabled_(false) {} | ||
parent_shutdown_time_(900), drain_strategy_(Server::DrainStrategy::Gradual), | ||
mode_(Server::Mode::Serve), hot_restart_disabled_(false), signal_handling_enabled_(true), |
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.
How are non-google users to configure this option?
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.
Assuming you're saying this config path is only used by Google?
I was sticking to YAGNI, don't add further complications to the config plane unless someone actually wants it. I'd be happy to add CLI options for this similar to the --drain-time-s, though I'd prefer to do that in a separate PR.
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.
It's pretty envoy-standard to land the configuration, release notes, and code changes in a single PR - I don't think it'll make this one too large to review.
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.
Done I think, I looked at similar PRs to try to make sure I updated the right spot everywhere, but I'm not sure if I missed anything or if the language is correct.
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
Signed-off-by: Auni Ahsan <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 2 pipeline(s). |
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.
LGTM from a code perspective. Will defer to @htuch on API
/lgtm api |
Add DrainStrategy enum to Options with Graceful and Immediate Disable probabilistic drain in DrainManager if DrainStrategy == Immediate Add integration tests Risk Level: Low. Testing: Integration tests, verify that the race condition from envoyproxy#11240 does not occur if the probabilistic drain is disabled. Signed-off-by: Auni Ahsan <[email protected]> Signed-off-by: yashwant121 <[email protected]>
Add DrainStrategy enum to Options with Graceful and Immediate Disable probabilistic drain in DrainManager if DrainStrategy == Immediate Add integration tests Risk Level: Low. Testing: Integration tests, verify that the race condition from envoyproxy#11240 does not occur if the probabilistic drain is disabled. Signed-off-by: Auni Ahsan <[email protected]>
Add DrainStrategy enum to Options with Graceful and Immediate Disable probabilistic drain in DrainManager if DrainStrategy == Immediate Add integration tests Risk Level: Low. Testing: Integration tests, verify that the race condition from envoyproxy#11240 does not occur if the probabilistic drain is disabled. Signed-off-by: Auni Ahsan <[email protected]> Signed-off-by: yashwant121 <[email protected]>
Graceful
andImmediate
Risk Level: Low.
Testing: Integration tests, verify that the race condition from #11240 does not occur if the probabilistic drain is disabled.