Commit Graph

4545 Commits

Author SHA1 Message Date
James deBoer a589f520c1
netty: Improve an exception message with more context (#7593)
Adds the address we are attempting to bind to. This context is useful for tracking down errors in configuration.
2020-11-06 12:58:05 -08:00
Chengyuan Zhang 01e3832b42
interop-testing: fix bug of not completing client configure RPC in xDS test client (#7597) 2020-11-05 16:16:52 -08:00
Jan Tattermusch 26d8f9cfa2
LoadWorker: clarify the semantics of --server_port flag
The behavior is as follows:
59528d8efe/benchmarks/src/main/java/io/grpc/benchmarks/driver/LoadWorker.java (L136)
(ServerConfig.port takes precedence if set).

grpc-go's documentation is clearer:
02cd07d9bb/benchmark/worker/main.go (L44)
2020-11-05 10:05:32 -08:00
Chengyuan Zhang 10dc41af74
core: round robin should ignore name resolution error for channel state change when there are READY subchannels (#7595)
Round robin is keeping use of READY subchannels even if there is name resolution error. However, it moves Channel state to TRANSIENT_ERROR.

In hierarchical load balancers, the upstream LB policy may need to aggregate pickers from multiple downstream round_robin LB policy while filtering out non-ready subchannels. It cannot infer if the subchannel can be used just from the SubchannelPicker interface. It relies on the state that the round_robin intends to set channel to.

So the change is to match the readiness of the picker/subchannel with the state that round_robin tries to update. It will completely ignore name resolution error if there are READY subchannels.
2020-11-04 14:36:12 -08:00
Chengyuan Zhang 8020a735f9
xds: refactor XdsClient test to cover protocol version v2 and v3 (#7577)
This change refactors client side XdsClient's unit test. The main testing logic (test cases) will being the abstract class while the extended classes will be providing xDS version-specific services and messages. With this approach, we do not suffer from maintaining two copies of test logics in order to cover both v2 and v3 xDS protocols. So every time making changes to XdsClient's own logic, we only need to modify the corresponding test logic in the abstract class. Also, this approach could be sustainable for future xDS protocol version upgrades without necessity to re-implement test logics.
2020-11-04 13:47:27 -08:00
sanjaypujare d7764d7e32
xds: reorder processing of tlsContext to prioritize CertProviderInstance (#7592) 2020-11-04 12:57:20 -08:00
Sean C. Sullivan d52b359631 enable Gradle wrapper validation
https://blog.gradle.org/gradle-wrapper-checksum-verification-github-action
2020-11-03 10:53:29 -08:00
Chengyuan Zhang 8e04df99f3
interop-testing: support dynamic configuration and accumulated stats for xDS test client (#7549) 2020-11-03 10:33:41 -08:00
Chengyuan Zhang b2bf5fa7f5
interop-testing: support rpc keep-open for xDS test server (#7548) 2020-11-03 10:33:17 -08:00
Chengyuan Zhang 47d1488373
xds: implement xDS circuit breaking max_requests (#7517)
Implemented xDS circuit breaking for the maximum number of requests can be in-flight. The threshold is retrieved from CDS responses and is configured at the cluster level. It is implemented by wrapping the Picker spawned by EDS LB policy (which resolves endpoints for a single cluster) with stream-limiting logic. That is, when the picker is trying to create a new stream (aka, a new call), it is controlled by the number of open streams created by the current EDS LB policy. RPCs dropped by circuit breakers are recorded into total number of drops at cluster level and will be reported to TD via LRS.

In the future, multiple gRPC channels can be load balancing requests to the same (global) cluster. Those request should share the same quota for maximum number of requests can be in-flight. We will use a global counter for aggregating the number of currently-in-flight requests per cluster.
2020-11-02 14:24:22 -08:00
Chengyuan Zhang 7009c1a863
xds: only reschedule time for unresolved resources upon ADS stream restarts (#7582)
Since the xDS resource version info persists across ADS stream recreation so that the management server can choose to not send client resources that have already been sent previously (in the previous stream). The client should not consider previously received (resolved) resources not exist if it does not receive them on the new ADS stream. So initial resource fetch timers should only be scheduled for unresolved resources when the ADS stream is recreated.
2020-11-02 12:12:31 -08:00
Sergii Tkachenko bb6679eec7 Update README etc to reference 1.33.1 2020-11-02 14:21:41 -05:00
ST-DDT 566f16ea0b
api: Clarify expectations regarding ServerCall#close (#7580) 2020-11-02 11:13:36 -08:00
Chengyuan Zhang df9c2355b1
xds: import v2 version of aggregate.ClusterConfig proto (#7573) 2020-10-29 23:49:54 -07:00
Sergii Tkachenko e65f67d4a9 Add sergiitk to MAINTAINERS.md
Might be needed for https://issues.sonatype.org/browse/OSSRH-61680
2020-10-29 17:08:20 -04:00
Sergii Tkachenko d314c68126
Fix builders ABI backward compatibility broken in v1.33.0
* fix channel builders ABI backward compatibility broken in v1.33.0
* fix server builders ABI backward compatibility broken in v1.33.0
* makes ForwardingServerBuilder package-private
2020-10-29 12:06:37 -04:00
Eric Anderson 735b85fb33 netty: Differentiate GOAWAY closure status descriptions
With this, it will be clear if the RPC failed because the server didn't
use a double-GOAWAY or if it failed because of MAX_CONCURRENT_STREAMS or
if it was due to a local race. It also fixes the status code to be
UNAVAILABLE except for the RPCs included in the GOAWAY error (modulo the
Netty bug).

Fixes #5855
2020-10-29 09:04:37 -07:00
Chengyuan Zhang 59528d8efe
xds: delete XdsClientImpl2 (#7565) 2020-10-29 00:20:24 -07:00
ZHANG Dapeng 5111eca71b
rls: remove redundant request field in CachedRouteLookupResponse 2020-10-28 17:24:23 -07:00
ZHANG Dapeng 654f7c3dc6
core: fix floating-point number formatting Locale (#7473) 2020-10-28 17:23:57 -07:00
Chengyuan Zhang 80631db7a8
xds: create singleton XdsClient object (promote ClientXdsClient) (#7500)
Use a global factory to create a shared XdsClient object pool that can be used by multiple client channels. The object pool is thread-safe and holds a single XdsClient returning to each client channel. So at most one XdsClient instance will be created per process, and it is shared between client channels.
2020-10-28 13:50:33 -07:00
Chengyuan Zhang 34ef76704a
xds: use passed-in SynchronizationContext for load report client (#7560)
LoadReportClient is a subcomponent of XdsClient. Since the XdsClient uses a SynchronizationContext for synchronizing its operations, calls to LoadReportClient APIs should all from that SynchronizationContext. Hence, we can pass that SynchronizationContext into LoadReportClient to synchronize its RPC operations as well. This eliminates the synchronization needed by LoadReportClient itself.
2020-10-28 12:44:13 -07:00
Chengyuan Zhang 351d4b4d0f
xds: make stats objects thread-safe (#7555)
A LoadStatsStore instance is used for recording client stats for a global cluster. A single instance may be shared by multiple client channels. So it should be thread-safe.
2020-10-28 12:40:07 -07:00
Chengyuan Zhang cdf7876813
xds: use internal SynchronizationContext for XdsClient's synchronization (#7559)
Replace locks used inside XdsClient for its synchronization with a SynchronizationContext created by itself.
2020-10-28 10:41:16 -07:00
sanjaypujare 5fe83c3b23
xds: add a V2 test for CDS response with UpstreamTlsContext and fix the broken CDS response processing (#7562) 2020-10-27 18:22:56 -07:00
Chengyuan Zhang 90a3873a13
interop-testing: only need to count total number of succeeded RPCs for accumulated stats in xDS tests (#7561) 2020-10-27 16:09:16 -07:00
sanjaypujare 8520e06012
xds: re-add tests removed from a previous PR for v3 support (#7556) 2020-10-27 13:29:10 -07:00
sanjaypujare f24fd7cab7
xds: implement the new v3 and old fallback server xDS API (#7553) 2020-10-26 18:46:27 -07:00
Chengyuan Zhang 3395112b4f
xds: import v3 version of aggregate.ClusterConfig proto (#7554) 2020-10-26 17:36:05 -07:00
Chengyuan Zhang f367e0c673
xds: promote ServerXdsClient (#7550)
Replace XdsClientImpl2 in server side code with ServerXdsClient, which is the split implementation for server side only.
2020-10-24 02:28:43 -07:00
Chengyuan Zhang a26f8e00a6
xds: import envoy proto envoy/config/cluster/aggregate/v2alpha/cluster.proto (#7551) 2020-10-24 02:27:06 -07:00
Chengyuan Zhang 40191b2f81
xds: implement XdsClient thread-safety and synchronization for gRPC client (refactored XdsClient to client and server usages separately) (#7533)
Two major changes involved:

- Separated client and server side XdsClient code paths. Currently the single XdsClientImpl2 implementation runs separate code paths for client side and server side usages. Due to different implementation progress for client side and server side development, client and server implementations diverge in whether it supports multiple/removing watchers, response data cache, synchronization model, etc. It became cumbersome to put them together in a single class. The separation is effectively duplicating the XdsClientImpl2 class for client and server so that the two sides can develop independently. But we made this AbstractXdsClient to reuse some of the code, such as the logic for xDS RPC stream. More details can be found in go/separate-client-server-xds-client.

- Changes the synchronization model for the client side APIs. Multiple gRPC Channels will be sharing a single XdsClient instance. So the client side APIs need to be thread-safe. Also, the XdsClient needs to implement synchronization for API calls and xDS RPC callbacks without using a particular Channel's SynchronizationContext. This is done by using XdsClient's own lock.
2020-10-23 13:38:24 -07:00
sanjaypujare b6601ba273
xds: create a full xDS example with XDS Channel creds and server xDS options (#7535) 2020-10-23 08:38:27 -07:00
sanjaypujare 26a4ca38ec
xds: Rename to dynamic reloading cert provider. (#7547)
Co-authored-by: matthewstevenson88 <mattstev@google.com>
2020-10-22 12:57:43 -07:00
Eric Anderson 45b8b0eb60 netty: Abrupt GOAWAY should not cause INTERNAL status
The stream creation was failing because the stream id was disallowed:
Caused by: io.grpc.StatusRuntimeException: INTERNAL: http2 exception
	at io.grpc.Status.asRuntimeException(Status.java:533)
	at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:629)
	... 16 more
Caused by: io.grpc.netty.shaded.io.netty.handler.codec.http2.Http2Exception$StreamException: Cannot create stream 222691 greater than Last-Stream-ID 222689 from GOAWAY.

The problem was introduced in 9ead606. Fixes #7357
2020-10-22 11:15:58 -05:00
Chengyuan Zhang f5c7f4e154
interop-testing: add proto definitions for xDS circuit breaking test (#7545) 2020-10-21 17:57:34 -07:00
Sergii Tkachenko 641c54eb3d okhttp: exclude Internal* from javadoc 2020-10-21 16:11:57 -04:00
Chengyuan Zhang 19485014fd
xds: run watcher callbacks in its own channel synchronization context (#7525)
In the context of sharing the XdsClient instance between Channels, watcher callbacks need to be executed in each Channel's own SynchronizationContext.
2020-10-21 13:06:08 -07:00
ZHANG Dapeng 0b6e6e5fd5
Update README etc to reference 1.33.0 2020-10-20 19:31:38 -07:00
Chengyuan Zhang 0ec3bfb471
xds: synchronize LoadReportClient operations with lock (#7528)
Replace the SynchronizationContext used in LoadReportClient with a lock.
2020-10-20 16:58:08 -07:00
Ran c329aad2bc
repositories.bzl: Remove the unused load of "jvm_maven_import_external". (#7541) 2020-10-20 13:00:11 -07:00
sanjaypujare 0e7cd05bf4
xds: implement ZatarCertificateProviderProvider (#7526) 2020-10-19 16:46:08 -07:00
Chengyuan Zhang 0b6f29371b
xds: simplify XdsClient APIs to start load reporting automatically when the first stats is added (#7523)
Eliminate reportClientStats/cancelClientStatsReport APIs. The first call of addClientStats will start load reporting.
2020-10-15 18:13:57 -07:00
sanjaypujare 5ee264da90
xds: implement ZatarCertificateProvider (#7493) 2020-10-15 10:16:14 -07:00
Chengyuan Zhang d25f5acf1f
xds: implement xDS timeout (#7481)
The xDS timeout retrieves per-route timeout value from RouteAction.max_stream_duration.grpc_timeout_header_max or RouteAction.max_stream_duration.max_stream_duration if the former is not set. If neither is set, it eventually falls back to the max_stream_duration setting in HttpConnectionManager.common_http_options retrieved from the Route's upstream Listener resource. The final timeout value applied to the call is the minimum of the xDS timeout value and the per-call timeout set by application.
2020-10-14 17:53:30 -07:00
Chengyuan Zhang ef90da036d
xds: support case insensitive path matching (#7506) 2020-10-14 17:05:47 -07:00
Chengyuan Zhang 67b54608da
alts: migrate java proto map getter from get<field> to get<field>Map (#7522)
Migrate java proto map getter from get to getMap.

This is part of a set of changes to java proto map API described here: go/java-proto-maplike

More information: go/java-proto-maplike-getFooMap
2020-10-14 13:37:16 -07:00
sanjaypujare 42555a86cd
xds: fix comment to note experimental functionality for XdsServerBuilder (#7521) 2020-10-14 11:00:09 -07:00
ZHANG Dapeng b8257d6f06
rls: fix RPC hanging if lookup request fails (#7511) 2020-10-13 22:42:34 -07:00
sanjaypujare 84337747ef
xds: implement the temporary xDS creds+fallback API (#7515) 2020-10-13 22:07:38 -07:00