Add a flag used to allow qps_json_driver and qps_worker channels to use the "grpclb" LB policy#22540
Merged
apolcyn merged 1 commit intogrpc:masterfrom Apr 3, 2020
Merged
Conversation
nanahpang
reviewed
Apr 3, 2020
nanahpang
approved these changes
Apr 3, 2020
yang-g
reviewed
Apr 3, 2020
test/cpp/util/create_test_channel.cc
Outdated
|
|
||
| #include "test/cpp/util/test_credentials_provider.h" | ||
|
|
||
| DEFINE_bool(grpc_test_use_grpclb_with_pick_first_lb_policy, false, |
Contributor
There was a problem hiding this comment.
nit: will we ever need to use grpc lb with other child policy? If so, would it better to make it a string flag and just set that as the child policy name?
Contributor
Author
There was a problem hiding this comment.
That makes sense. It will be set to pick_first for all uses right now, but I could see wanting to set to round_robin in some scenario, so I changed to take a child policy string
yang-g
approved these changes
Apr 3, 2020
Contributor
yang-g
left a comment
There was a problem hiding this comment.
It is unfortunate we ended up with so many overloads. But it is a rant not relevant to your PR.
LGTM with a nit.
Thanks.
CreateTestChannel; use CreateTestChannel in qps_json_driver
00fa6ed to
962a8f2
Compare
Contributor
Author
|
interop to cloud: #18892 |
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.
Since https://github.com/grpc/proposal/blob/master/A26-grpclb-selection.md was recently implemented in C-core, the channels created in qps_json_driver and qps_worker binaries can no longer use "grpclb" via SRV record DNS resolution (this old behavior was relied upon when using these binaries for an internal benchmark). So update these binaries with an optional flag that can set the "grpclb" LB policy (with a "pick_first" child policy) via a service config plumbed through channel args.
This involves modifying:
CreateTestChannelutility to add and respect a new flag:--grpc_test_use_grpclb_with_pick_first_lb_policyqps_json_driverto use theCreateTestChannelAPI for non-inproc channels (qps_workeralready uses this API for non-inproc channels)@markdroth