Commit Graph

5399 Commits

Author SHA1 Message Date
Chengyuan Zhang 7dc8ab1c6e
xds: print xDS request messages with JsonFormat (#7679)
Currently xDS response messages are printed with protobuf JsonFormat as they may contain Any-typed messages. JsonFormat internally uses Gson for generating human-readable message representations. The default Gson instance escapes HTML characters, which causes characters like '=' to be printed as '\u003d'. There is nothing can be done on our side to disable this as it is protobuf's internal implementation.

To make the same content consistent in both request and response messages consistent, we use JsonFormat to print both.
2020-12-01 15:57:18 -08:00
Chengyuan Zhang 9b276aa73a Update README etc to reference 1.34.0 2020-12-01 15:47:37 -08:00
Chengyuan Zhang 05048cf3e2
interop-testing: update proto generated service files (#7682) 2020-11-30 22:49:00 -08:00
sanjaypujare a6c3df2f24
xds: fix text in the readme and the comment about the --secure flag (#7676) 2020-11-30 14:58:52 -08:00
ZHANG Dapeng ac2327deb7
api,core: interceptor-based config selector (#7610)
Interceptor-based config selector will be needed for fault injection.

Add `interceptor` field to `InternalConfigSelector.Result`. Keep `callOptions` and `committedCallback` fields for the moment, because it needs a refactoring to migrate the existing xds config selector implementation to the new API.
2020-11-30 09:16:22 -08:00
sanjaypujare 3811ef3d22
xds: fix the new server API for ServerXdsClient (#7666) 2020-11-25 16:52:09 -08:00
Chengyuan Zhang 192614bf51
Revert "netty: create adaptive cumulator" (#7669)
This reverts commit 729175c783.
2020-11-25 14:37:48 -08:00
Eric Anderson f0223eb8e3 alts: Migrate java proto map getter from get<field> to get<field>Map
This is part of a proto-wide cleanup of its map APIs.

cl/344096880
2020-11-25 13:45:21 -08:00
Sergii Tkachenko fd59f1de0c buildscripts: Add xDS GKE interop tests buildscript placeholder 2020-11-25 16:24:07 -05:00
Eric Anderson 902cc019fa example-xds: Change arg from --secure to --xds-creds
The xds creds don't actually guarantee anything is secure. We don't want
to give new users a false impression.
2020-11-25 13:16:48 -08:00
Eric Anderson 0be12b40c3 example-xds: Prefix class names with Xds, instead of suffix
This aligns with normal naming practice.
2020-11-25 11:12:12 -08:00
Eric Anderson 7480dade0f example-xds: Mirror helloworld and hostname example
--secure was moved to front since many languages need flags to precede
positional parameters, and we'd like other languages to use the same
flags when feasible.

:8000 was removed from xds: target in the README, as it isn't all that
useful and is confusing as xDS itself provides the backend port numbers.
2020-11-25 11:12:12 -08:00
Sergii Tkachenko 9211bd1914 interop-testing: rename XdsTestClient secure_mode argument 2020-11-24 20:39:53 -05:00
sanjaypujare f0915e7619
xds: fix xds example to be consistent with hello world example (#7659) 2020-11-24 09:08:27 -08:00
Chengyuan Zhang f2e71a69b6
xds: clean up MessagePrinter (#7658)
In v3, UpstreamTlsContext and DownstreamTlsContext messages are not transitively type-referenced by Cluster and Listener. So the message printer is not able to print them without adding them into the registry manually.
2020-11-24 01:03:14 -08:00
ZHANG Dapeng ca12e7a339
grpclb: improve log for SRV lookup failure (#7647) 2020-11-23 11:09:28 -08:00
Aman Khalid fa1f900856 Remove deprecated javadoc options 2020-11-23 11:09:09 -08:00
Chengyuan Zhang e136d8bdeb
gradle, README: Bump protobuf-gradle-plugin version to 0.8.14 (#7640) 2020-11-23 11:01:34 -08:00
Chengyuan Zhang 1ca8bda17f
xds: fix mistake of taking wrong argument in log message (#7653) 2020-11-20 23:17:03 -08:00
sanjaypujare a7530efd6e
interop: create PSM security xDS interop tests - server & client (#7609)
Co-authored-by: Sergii Tkachenko <hi@sergii.org>
2020-11-20 18:31:40 -08:00
Chengyuan Zhang 40b54079ce
xds: obtain the global SharedCallCounterMap in the xDS resolver only (#7646)
Making the global map for holding atomics that aggregates cluster's outstanding requests an explicit dependency is easier for maintaining the architecture.
2020-11-20 12:02:19 -08:00
wanyingd1996 2bf5ef54da
api: Added documentation for Call onClose hanging problem 2020-11-19 12:45:16 -08:00
sanjaypujare 99df22a7a6
xds: remove temporary APIs and update xds example to use new ServerCreds (#7644) 2020-11-19 10:00:42 -08:00
Chengyuan Zhang 3a10392e4e
RELEASING.md: only project admin can create Cron jobs (#7642) 2020-11-18 16:24:55 -08:00
Chengyuan Zhang f5bbe12c9f
Start 1.35.0 development cycle (#7641) 2020-11-18 13:59:40 -08:00
sanjaypujare 620d266677
xds: implement XdsServerCredentials (#7636)
Co-authored-by: Eric Anderson <ejona@google.com>
2020-11-18 12:46:29 -08:00
Sergii Tkachenko 79d2e0c326 core: fix typos in Forwarding* classes 2020-11-18 15:36:56 -05:00
Chengyuan Zhang 7554e971e3
xds: gate xDS circuit breaking feature with environment variable (#7632)
Use GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING environment variable to enable xDS circuit breaking feature. Otherwise, it is disabled by default.
2020-11-18 11:34:56 -08:00
Eric Anderson 980956d503 api: Expose ForwardingServerBuilder for XdsServerBuilder
This reduces ABI issues caused by returning the more precise
XdsServerBuilder in the API. See
https://github.com/grpc/grpc-java/issues/7552.
2020-11-18 11:31:24 -08:00
Eric Anderson bde8bda273 xds: Filter Javadoc of "private" classes
The xds package is not at all pretty. There's lots of stuff leaking that
shouldn't. For the moment accept that and just clean up the javadoc.

This is a bit more important now because XdsChannelCredentials and
XdsServerBuilder will be exposed, so users will start noticing stuff
here. Unfortunately this change doesn't fix IDEs auto-suggesting classes
that users shouldn't use.
2020-11-18 09:15:14 -08:00
Jiangtao Li 24e4d68282
alts: create handshaker RPC lazily (#7630)
* alts: create handshaker RPC lazily

* alts: address review comments
2020-11-17 17:36:09 -08:00
sanjaypujare d7a00e6047
xds: implement cert instance override in case needed (#7628) 2020-11-17 16:12:53 -08:00
Chengyuan Zhang b3429ec2d9
android: make Channel always enterIdle upon network recover (#7611)
On Android, there is a race between making new RPCs and reconnecting after network comes back. If the former happens first, RPCs fail immediately. This is because resetConnectBackoff() does not update the picker before trying to reconnect and new RPCs are sent with the old picker, which fails RPCs immediately.

In this change, we move to use enterIdle(), which updates the channel picker to cause new RPCs being buffered (while subchannels are in reconnecting), at the moment network recovers. Hopefully, this can avoid RPCs being dropped prematurely in network recovery.
2020-11-17 15:27:25 -08:00
Sergii Tkachenko 729175c783
netty: create adaptive cumulator 2020-11-17 18:05:18 -05:00
Eric Anderson d9927ffe99 xds: Use eagAttributes to propagate XdsClientWrapperForServerSds
This is preparation for XdsServerCredentials, which must be created
without knowledge of the server listening port.
2020-11-17 12:26:01 -08:00
Eric Anderson 172869e31e netty: Add plumbing for eagAttributes on server-side
This is to be used for xDS to inject configuration for the
XdsServerCredentials. We'd like a cleaner approach, but they mostly seem
to be more heavy-weight. We will probably address this at the same time
we handle the Executor being passed for TLS. In the mean time this is
easy, doesn't hurt much, and can easily be changed in the future.
2020-11-17 12:26:01 -08:00
sanjaypujare 149ba3db6e
xds: move XdsServerBuilder out of internal.sds to the main xds package (#7627) 2020-11-17 12:00:05 -08:00
Chengyuan Zhang f27a8f26a8
xds: use GC finalization predicate to avoid race between ref enqueued and calling cleanQueue() (#7629)
GcFinalization.awaitClear() only guarantees the reference is cleared but no guarantee for the ref is enqueued. This could cause race for calling cleanQueue() in the test.
2020-11-17 02:05:48 -08:00
Chengyuan Zhang c850840342
buildscripts: enable xDS circuit breaking test (#7615) 2020-11-16 19:27:57 -08:00
Erik Johansson 19923df1b5 xds: add support for setting bootstrap file with java system property
While most languages support setting environment variables during runtime,
Java does not. In Java, the preferred approach is to use Java System Properties
in order so specify configuration options. By checking for the existence
of the io.grpc.xds.bootstrap property if GRPC_XDS_BOOTSTRAP is not found,
it is possible to either supply the bootstrap location during runtime or as
a Java argument. The environment variable still takes precedence in order
to not break any existing documentation.
2020-11-16 15:45:28 -08:00
sanjaypujare 0781d2ca75
xds: use 0.0.0.0 in the resource query for LDS (#7624) 2020-11-16 09:25:18 -08:00
Chengyuan Zhang a43ae54c59
xds: implement a global map for holding circuit breaker request counters (#7588)
Circuit breakers should be applied to clusters in the global scope. However, the LB hierarchy might cause the LB policy (currently EDS, but cluster_impl in the future) that applies circuit breaking to be duplicated. Also, for multi-channel cases, the circuit breaking threshold should still be shared across channels in the process.

This change creates a global map for accessing circuit breaking atomics that used to count the number of outstanding requests per global cluster basis. Atomics in the global map are held by WeakReferences so LB policies/Pickers/StreamTracers do not need to worry about counter's lifecycle and refcount.
2020-11-13 12:12:32 -08:00
Eric Anderson ddd5dea7e9 Migrate callers to ServerCredentials 2020-11-13 11:13:33 -08:00
Eric Anderson ed290cc78a alts: Add ServerCredentials 2020-11-13 11:13:33 -08:00
Eric Anderson edcc6854a6 netty: Add ServerCredentials 2020-11-13 11:13:33 -08:00
Eric Anderson 60319dad2d api: Add ServerCredentials 2020-11-13 11:13:33 -08:00
Chengyuan Zhang 76ad953c36
interop-testing: fix wrong semantics for RPC failure stats in xDS test client (#7618)
The proto field is named as num_failures but its comment is saying it is for number of RPCs that failed to record a remote peer. RPC failed == RPC failed to record a remote peer was true previously (so no existing tests should be affected by this changed) as server completed RPCs immediately. It is no longer true with server capability to keep the call open/delayed.

This change clarifies the proto definition for stats RPC. rpcs_by_peer is for recording RPCs succeeded and num_failures is for RPCs failed. RPCs in the flight when the stats call times out are not counted towards any of the stats.
2020-11-13 10:28:44 -08:00
sanjaypujare 2c935e3766
xds: implement new bootstrap config value for grpc-server-resource-id and use on server side (#7617) 2020-11-12 08:24:32 -08:00
Attila 8062b69a0a
all: update google auth libraries 2020-11-11 16:51:18 -08:00
Chengyuan Zhang bf191cb5ea
interop-testing: aggregate accumulated stats by RPC methods in xDS test client (#7603)
Update xDS interop test proto to aggregate accumulated stats based on RPC methods (mirroring 643e5bcd1e8db931cf76a3be19cd9bba223ee987 in C-core's change). Updated the xDS interop test client to support querying accumulated stats aggregated to RPC methods.
2020-11-10 23:58:09 -08:00