Commit Graph

4821 Commits

Author SHA1 Message Date
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
Eric Anderson 38fe5d276f interop-testing: Remove redundant tearDown() in hook
The main() Thread will call tearDown() itself. It appears this
redundancy has existed since e813eaae2f, where the normal error handling
was enhanced at the same time as cleaning up resource management. The
cleanup should have made it obvious the hook was no longer needed, but
alas. Technically, it did originally provide a purpose if setup()
failed, but it would have been better to just move setup() into the
try-catch instead. Today it doesn't even provide that purpose.
2020-10-13 16:34:57 -05:00
ST-DDT b7355052c4
Add implementation note regarding server interceptors and thread locals 2020-10-13 13:11:16 -07:00
sanjaypujare b08ce410f8
xds: fix the transport-socket-name to match what control plane sends (#7508) 2020-10-12 14:47:47 -07:00
Chengyuan Zhang 46290ef900
xds: gate xDS timeout with env variable (#7504) 2020-10-12 14:13:02 -07:00
sanjaypujare f9b428ab40
xds: implement XdsChannelCredentials (#7497) 2020-10-09 09:21:39 -07:00
Chengyuan Zhang 7dbf6a2c1c
xds: clarify required and optional fields in config selector result (#7496) 2020-10-09 01:04:34 -07:00
Chengyuan Zhang df95acda2f
xds: eliminate target name dependency in XdsClient and LRS client (#7498) 2020-10-08 17:23:46 -07:00
Eric Anderson 0203256171 interop-testing: Avoid alts incompatibility with netty
alts requires netty-shaded, not netty.
2020-10-08 12:59:26 -05:00
Chengyuan Zhang 5c59fd2b1a
xds: delete ConfigWatcher API (#7494) 2020-10-08 10:15:00 -07:00
Chengyuan Zhang 18e7e2ddca
xds: promote XdsClientImpl2 (#7484)
Replace the old XdsClient implementation with the new one that supports watching multiple LDS/RDS resources separately.
2020-10-08 00:57:26 -07:00
Chengyuan Zhang 460ca75684
xds: migrate xDS resolver to use XdsClient APIs for watching individual LDS/RDS resources (#7469) 2020-10-07 23:33:41 -07:00
ZHANG Dapeng 6cdd537f0e
grpclb: enhance grpclb logging 2020-10-07 16:22:52 -07:00
ZHANG Dapeng cc5403c4c9
rls: allow defaultTarget in RouteLookupConfig unset
The `default_target` field can be unset per the [spec](http://go/grpc-rls-lb-policy-design)

Also fixed a synchronization bug (related to #7460) that `createOrGet()` should be guarded by lock.
2020-10-07 15:36:57 -07:00
ZHANG Dapeng f59cd0a599
rls: add logging for rls lb 2020-10-07 15:36:14 -07:00
Eric Anderson a547e23f5e Migrate users of ManagedChannelBuilder.{forTarget,forAddress} to ChannelCredentials 2020-10-07 13:58:37 -05:00
Eric Anderson 5a687e3da8 alts: Expose ChannelCredentials for the various negotiators
AltsChannelBuilder could be improved a bit more by removing the call to
InternalNettyChannelBuilder.setProtocolNegotiatorFactory. However, to do
that cleanest would require reworking how port is plumbed in
NettyChannelBuilder and potentially AbstractManagedChannelImplBuilder to
move getDefaultPort() to ProtocolNegotiator from ClientFactory. Saving
that for another day.
2020-10-07 13:58:37 -05:00
Eric Anderson e595779047 okhttp: Add ChannelCredentials 2020-10-07 13:58:37 -05:00
Eric Anderson 1ffde15471 netty: Add ChannelCredentials 2020-10-07 13:58:37 -05:00
Eric Anderson 5733cd481a core: Add ChannelCredentials 2020-10-07 13:58:37 -05:00
Eric Anderson c8a94d1059 api: Add ChannelCredentials 2020-10-07 13:58:37 -05:00
ZHANG Dapeng 9b73e2365d
Start 1.34.0 development cycle 2020-10-06 16:10:51 -07:00
Eric Anderson 0e0bcdfe2a repositories.bzl: Remove Maven repositories, in favor of maven_install
Manually specifying individual Maven artifacts is very verbose and
error-prone. It also does not properly handle transitive dependencies.
It greatly increases the amount of effort to update dependencies.

v1.27.0 introduced support for maven_install and encouraged users to
migrate. I fully expect some users haven't migrated, but it's not clear
that an additional 8 months would help much. Users that don't want to
use maven_install are still free to do so, but would need to maintain
the verbose repository list themselves.

At some point we may begin using the @maven workspace which would
require maven_install, but are not doing so now (except in the examples)
and don't have immediate plans to start.
2020-10-06 16:26:36 -05:00
Chengyuan Zhang 0913dd2769
xds: fix lint (#7487) 2020-10-06 13:51:33 -07:00
Eric Anderson cdeda50758 netty: Fix Javadoc for ShadingTest 2020-10-05 15:49:07 -05:00