Commit Graph

4451 Commits

Author SHA1 Message Date
Chengyuan Zhang bc8c758a3c
xds: log raw response messages in sync context (#7441) 2020-09-22 17:28:45 -07:00
Chengyuan Zhang b434df25cd
xds: generate EDS LB config with hardcoded locality picking policy (#7443) 2020-09-22 16:08:41 -07:00
Sergii Tkachenko ef7846496c
core: Inline AbstractManagedChannelImplBuilder 2020-09-22 10:48:31 -04:00
Chengyuan Zhang a5ae55e984
xds: sync Envoy proto to commit fd28e42f31730f5ed6f13f52999692a4885dd312 (2020-09-15) (#7445)
Sync Envoy proto to commit fd28e42f31730f5ed6f13f52999692a4885dd312 (2020-09-15, internal Envoy import CL: cl/332279092). Suppressed warning for using listening_addresses in Node and added TODO for cleaning it up.
2020-09-21 18:16:28 -07:00
Chengyuan Zhang d333304a2b
xds: promote EdsLoadBalancer2 (#7444)
Effectively migrate to the new codepath of hierarchical LB policies.
2020-09-21 16:44:09 -07:00
Chengyuan Zhang da100e8e49
build, examples, README.md: Update protobuf gradle plugin version to 0.8.13 (#7355)
Updated protobuf gradle plugin version to 0.8.13. Fixed Android Kokoro's memory issue by forcing to use a new Gradle daemon for building the previous commit.
2020-09-21 10:42:06 -07:00
Chengyuan Zhang b31d6830a2
xds: fail to create xDS channel if no server with supported channel creds found (#7400)
Create the xDS channel outside the XdsClient. Throw an XdsInitializationException if the provided server list (parsed from the bootstrap file) can not be used to create such a channel. The exception is caught by the xDS resolver and propagated to the Channel gracefully as a name resolution error.
2020-09-18 17:55:29 -07:00
Chengyuan Zhang e6b61ea207
xds: reimplement EDS LB policy with downstream LB config generations that migrate to hierarchical LB tree codepath (#7391)
Implemented the new EDS LB policy, which generates a LB config for instantiating a hierarchical load balancing subtree. The subtree includes downstream LB policies: 

- priority LB policy, which load balances individual priorities separately
- weighted-target LB policy, which load balances individual localities within the same priority separately
- lrs LB policy, which applies load recording that aggregates load stats for each locality
- leaf LB policy (round_robin)

The EDS LB policy is the place that receives endpoint information from traffic director and organizes the data into a model for hierarchical load balancing for the cluster.
2020-09-18 16:37:55 -07:00
Sergii Tkachenko b571f23ad2
core: Inline AbstractServerImplBuilder 2020-09-18 16:31:08 -04:00
Chengyuan Zhang bf7a42dbd1
api, core: delete io.grpc.LoadBalancer.loadBalancingConfig attribute (#7440) 2020-09-18 12:54:48 -07:00
sanjaypujare 04871dcc2a
xds: bootstrapper fixes: remove extra readBootstrap & avoid parseConfig (#7436) 2020-09-17 21:25:19 -07:00
Chengyuan Zhang 92cbc578a2
xds: remove logging in data path (#7437) 2020-09-17 21:08:54 -07:00
ZHANG Dapeng 3abdb2859f
grpclb: cache requestConnection if no subchannel created
An issue was found during CBT RLS client testing: The RLS lb creates grplb child balancer, calls `grpclb.handleResolvedAddress()` then immediately calls `grpclb.requestConnection()`. The subchannel in `GrpclbState.currentPicker.pickList` contains only `GrpclbState.BUFFER_ENTRY` at the moment `grpclb.requestConnection()` is called, and therefore the `requestConnection()` is no-op, and RPC is hanging.
2020-09-16 16:48:22 -07:00
Chengyuan Zhang 80f6d874cf
core: lint remove redundant field (#7433) 2020-09-16 15:32:20 -07:00
Chengyuan Zhang f04f33efe8
xds: resource (with version info) should persist across ADS streams along with XdsClient lifetime (#7427)
The version_info in the xDS protocol represents the client's knowledge for the state of that resource type. It should persist across ADS stream recreation. Even if the ADS stream is recreated, the XdsClient should persist its knowledge for resources it has received. With this implementation, client and server are stateful across the xDS communication. With persisted version_info, the management server knows resources that the client currently knows even after the stream is recreated. So it does not need to re-send resources that the client received with the previous stream.
2020-09-16 10:51:38 -07:00
Chengyuan Zhang eb871698e3
Revert "SECURITY.md: add instruction for disabling Conscrypt's default TrustManager (#6962)" (#7428)
This reverts commit e089ceaadc.
2020-09-16 10:07:52 -07:00
Sergii Tkachenko cccd940e43
okhttp: cleanup channel in channel builder tests 2020-09-16 11:38:55 -04:00
Russell Shaw 5879b53c57
netty: Add support for IBMJSSE2 (#7422)
This is a very simple change to test for IBMJSSE2 security provider in addition to the others. IBM JRE does not support the Sun provider, but instead has IBMJSSE2 which supports the same API calls.

I tested this on Z/OS machine as now it works when before it couldn't find a security provider
2020-09-16 08:07:52 -07:00
ZHANG Dapeng ee5b5929d5
api,netty: Fix TruthIncompatibleType 2020-09-15 11:22:44 -07:00
Chengyuan Zhang 9dd56a7f0f
xds: throw XdsInitializationException when reading bootstrap file encounters error (#7420)
Introduce XdsInitializationException, which is thrown when gRPC fails to read the xDS bootstrap information, or fails to create the XdsClient object with loaded bootstrap configurations. gRPC components (e.g., the XdsNameResolver) is expected to propagate such exceptions gracefully to the channel.
2020-09-14 16:26:28 -07:00
Sergii Tkachenko af6fbf6b74 okhttp: make OkHttpChannelBuilder final 2020-09-11 19:54:31 -04:00
Sergii Tkachenko d5dcfa737a
all: remove deprecated internal OverrideAuthorityChecker 2020-09-11 19:14:25 -04:00
Chengyuan Zhang 69e8204066
xds: promote XdsNameResolver2 (#7416) 2020-09-11 14:56:03 -07:00
Sergii Tkachenko b927278f22 core: cleanup AbstractManagedChannelImplBuilderTest 2020-09-11 17:07:45 -04:00
Chengyuan Zhang 8ac63626c3
xds: make channel creds required in bootstrap file (#7396) 2020-09-11 10:08:52 -07:00
ZHANG Dapeng 234125ee39
core: re-organize RealChannel with updateConfigSelector()
As mentioned in https://github.com/grpc/grpc-java/pull/7413#issuecomment-690756200 `RealChannel` did not manage `configSelector`, and therefore `configSelector.get()`, `configSelector.set()` and `drainPendingCalls()` were scattered everywhere in `ManagedChannelImpl`. This PR re-organizes `RealChannel` to manage `configSelector`.
2020-09-11 09:35:18 -07:00
ZHANG Dapeng 73dd3672fc
core: fix drainPendingCalls might be called twice
Fixing the bug: if two consecutive name resolution updates are queued together in SynchronizationContext, drainPendingCalls() might be called twice and be broken.
2020-09-10 15:11:19 -07:00
Eric Anderson 49e47a4089 Update README etc to reference 1.32.1 2020-09-10 14:50:48 -05:00
ZHANG Dapeng f3a1a3ff10
core: refactor handle config update with ConfigSelector
Get rid of `ServiceConfigInterceptor` and handle config update with `ConfigSelector` inside `ClientCallImpl`.
2020-09-10 10:32:46 -07:00
Esun Kim dca74af870 Upgrade Conscrypt to 2.5.1 2020-09-10 12:12:11 -05:00
Esun Kim 2f60c0a66c Revert "Call Cipher APIs with non-direct ByteBuffers and perform copies in the ALTS code. (cl/308901367)"
This reverts commit a7bca23053.
2020-09-10 12:12:11 -05:00
ZHANG Dapeng 1411e6f61e
core: fix pending call not drained when shutdown
There was bug that new pending calls were not drained after channel is shutdown. The bug was worked around by #7354 .

Fixing by making sure new calls fail immediately if the channel is already shutdown.
2020-09-09 17:47:10 -07:00
sanjaypujare 7c7c4a7daa
xds: accept all forms of gkeClusterUrl and fix the 'x-goog-request-params' value (#7403) 2020-09-09 16:22:34 -07:00
Eric Anderson c919594962 netty-shaded: Fix publish regression for javadoc and sources
96ad6338 accidentally caused the javadoc and sources jars to no longer
be published for grpc-netty-shaded. It would appear to be due to the
jars being empty. This commit causes them to be published again.
2020-09-09 17:39:19 -05:00
Chengyuan Zhang 431df72d2b
xds: eliminate cluster name change logic in CDS LB policy and reimplement tests (roll forward #7356) (#7395)
Eliminated the logic in CDS LB policy that handles CDS config change (aka, cluster name change). A CDS LB policy should be used for a single cluster, the cluster should be effectively final. If the upstream LB policy needs to change routing cluster, it should create separate CDS LB policies, one for each cluster.

This change also reimplemented the unit tests for CDS LB policy.
2020-09-09 12:14:03 -07:00
Chengyuan Zhang c88feeffe8
xds: always generate xds_routing LB policy as the top-level LB policy in legacy xDS resolver (to be deprecated) (#7401)
Now that routing is enabled by default, we should always generate a load balancing config that uses xds_routing as the top-level LB policy. This change is made to the legacy xDS resolver, which will soon be replaced by XdsNameResolver2. But this change allows us to merge split codepath for CDS LB policy.
2020-09-08 18:25:28 -07:00
sanjaypujare b110cf32a0
xds: add server start semantics as per the server api design (#7371) 2020-09-08 17:23:57 -07:00
Sergii Tkachenko e610637440
okhttp: Keep ChannelBuilder.checkAuthority() for backward compatibility 2020-09-08 14:33:53 -04:00
sanjaypujare 5f9d000a61
xds: implement SslContextProviderSupplier to prevent creds leakage (#7364) 2020-09-08 10:12:55 -07:00
Sergii Tkachenko 88634ee0d5 okhttp: allow disable check authority via internal channel builder 2020-09-03 18:02:32 -04:00
Philipp Kern 07012421ad
core: add accessor for bare method name in MethodDescriptor (#7339)
Added getBareMethodName and extractBareMethodName for accessing the unqualified method name.
2020-09-03 14:27:18 -07:00
Sergii Tkachenko 3493347581 okhttp, testing: remove server builder accessor hacks 2020-09-03 16:26:04 -04:00
Sergii Tkachenko b03f148ed9 core, netty: server builders extend a public API class 2020-09-03 16:26:04 -04:00
Sergii Tkachenko 07b812b1f5 api, core: create ForwardingServerBuilder and ServerImplBuilder 2020-09-03 16:26:04 -04:00
Sergii Tkachenko 522e70d1d7 api: remove incomplete sentence in javadoc 2020-09-03 11:02:47 -04:00
Sergii Tkachenko c29ad76dae Explain test value for flow control window 2020-09-02 14:51:39 -04:00
Sergii Tkachenko e335cb3618 testing: remove channel setStatsEnabled accessor hack 2020-09-02 13:28:52 -04:00
Sergii Tkachenko 5d1304c33c okhttp: OkHttpChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Sergii Tkachenko c056979671 netty: NettyChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00
Sergii Tkachenko b0f0ed080e core: InProcessChannelBuilder extends a public API class 2020-09-02 13:28:52 -04:00