Commit Graph

4140 Commits

Author SHA1 Message Date
ZHANG Dapeng 9922382698
xds: parse RDS response to ConfigUpdate for path matching 2020-03-13 17:39:21 -07:00
Eric Gribkoff 1acde4604f
buildscripts: checkout matching grpc/grpc branch for xds test (#6828) 2020-03-13 15:32:13 -07:00
Jihun Cho b72477e282
rls: fix RlcProto parsing issues (#6822) 2020-03-12 18:46:05 -07:00
Jihun Cho a680c982f5
rls: adaptive throttler (#6749) 2020-03-12 18:45:36 -07:00
ZHANG Dapeng 6e0748da6f
xds: refactor XdsConfig to use PolicySelection 2020-03-11 21:38:14 -07:00
Eric Gribkoff 99b6d0156e
buildscripts,interop-testing: Increase logging for xDS tests (#6818) 2020-03-11 20:34:26 -07:00
ZHANG Dapeng 5e7b8c672f
xds: implement WeightedTargetLoadBalancer 2020-03-11 15:35:31 -07:00
Eric Gribkoff 3b8e36358c
buildscripts: update xds test server arg (#6816) 2020-03-11 13:20:30 -07:00
sanjaypujare 46eac47efc
xds: add support for server side Listener watcher in XdsClient (#6801) 2020-03-11 08:27:26 -07:00
Jihun Cho 111e348def
Update README etc to reference 1.28.0 (#6815) 2020-03-10 16:10:04 -07:00
Eric Anderson 47d545ad70 api: Fix MethodType documentation overspecification
The server does not _have_ to wait until half close in CLIENT_STREAMING, and
commonly wouldn't in error cases. {client,server}SendsOneMessage were way
over-specifying the behavior and included unnecessary and incorrect words like
"immediately." Those methods shouldn't be the defining the behavior in that
much precision anyway; that would be the job of the individual enum values, if
anything.
2020-03-09 12:16:01 -07:00
ZHANG Dapeng b348479ac8
interop-testing: set the right classpath for startscripts
Currently the classpath for all startscripts in interop-testing includes alpnagent and grpc-xds, even if a lot of startscripts don't need them. Made a change to only include alpnagent or grpc-xds when a startscript really needs it.
2020-03-06 11:55:45 -08:00
Chengyuan Zhang ef44795594
xds: treat target server authority opaquely for resolving cluster name (#6767)
Fixes usage of target hostname:port in xDS plugin.

The target hostname:port used to construct gRPC channel should be treated opaquely. XdsNameResolver should not try to split it and should use it opaquely for sending LDS requests. In received RouteConfiguration messages, do not stripe off port (if any) for finding the virtual host with domain name matching the requested LDS resource name.
2020-03-06 10:05:08 -08:00
Kun Zhang 4a2c5d6e9c
core: fix a bug in health check config propgation. (#6804)
The condition "effectiveServiceConfig != validServiceConfig" should
have been deleted in commit 2162ad0436.

The condition was there before that commit because
NAME_RESOLVER_SERVICE_CONFIG was already in "attrs", thus it needed to
be re-added only if "effectiveServiceConfig" differs from the original
"validServiceConfig".

In contrast, ATTR_HEALTH_CHECKING_CONFIG is not in the original
"attrs" and always needs to be added.
2020-03-05 09:27:55 -08:00
ZHANG Dapeng 7be75a0bcb
all: let interop test use shaded dependency correctly take 2
First rolls forward #6791, then fixes the issue of missing transitive dependency for the shadow configuration.
2020-03-04 16:10:46 -08:00
Chengyuan Zhang f85843bb88
benchmark: clean up jmh plugin configurations (#6803)
Bump jmh plugin to version 0.5.0. Put junit and mockito to test dependency. Eliminated jmh plugin config workaround for the known issue in previous version.
2020-03-04 16:04:09 -08:00
Chengyuan Zhang 5ba663bcf6
android: add grpc-android into main build (#6793)
Add grpc-android into main build. grpc-android will be built if Gradle option skipAndroid is false. This change also migrates deprecated Robolectric methods to androidx.test methods.
2020-03-04 15:40:39 -08:00
Kun Zhang a57f1a9636
services: fix a local variable name (#6802) 2020-03-04 14:31:09 -08:00
ZHANG Dapeng 6d3ffc7892
all: refactor select lb policy from a list of raw configs
Refactor to reuse `PolicySelection` and the implementation in `AutoConfiguredLoadBalancerFactory.parseLoadBalancerPolicy()`.
2020-03-03 11:24:59 -08:00
Chengyuan Zhang ec25beb660
grpclb: clean up usage of raw load balancing config attributes in tests (#6798) 2020-03-03 09:52:12 -08:00
markb74 fd5f4aac63
Enable use of InProcessTransport outside of InProcessServer
This allows an InProcessTransport instance to be created via a new
internal accessor class InternalInProcess. We effectively just expose a
method to create an InProcessTransport with a existing ServerListener
instance.

This will be used for in-process channels to an under-development
on-device server.
2020-03-02 16:02:17 -08:00
Chengyuan Zhang afc1f2e567
core, grpclb: clean up grpclb specific attributes in core (#6790)
Move ATTR_LB_ADDR_AUTHORITY and ATTR_LB_PROVIDED_BACKEND attributes definition in GrpcAttributes to GrpclbConstants. grpc-alts will have a compile dependency on grpc-grpclb.
2020-03-02 10:27:57 -08:00
ZHANG Dapeng 1df7d7ea8e
Revert "all: let interop test use shaded dependency correctly (#6780)"
This reverts commit c5f48b8e38.  (#6780)

Revert because caused a regression in the ALTS tests. https://source.cloud.google.com/results/invocations/691d9965-fea1-487d-b606-352a5234039e/targets/grpc%2Fcore%2Fpull_request%2Flinux%2Fgrpc_interop_toprod/log

2020-03-01 20:02:12,491 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemUtils
at io.grpc.alts.CheckGcpEnvironment.isRunningOnGcp(CheckGcpEnvironment.java:69)
at io.grpc.alts.CheckGcpEnvironment.isOnGcp(CheckGcpEnvironment.java:44)
at io.grpc.alts.ComputeEngineChannelBuilder.(ComputeEngineChannelBuilder.java:62)
at io.grpc.alts.ComputeEngineChannelBuilder.forTarget(ComputeEngineChannelBuilder.java:72)
at io.grpc.alts.ComputeEngineChannelBuilder.forAddress(ComputeEngineChannelBuilder.java:77)
at io.grpc.testing.integration.TestServiceClient$Tester.createChannel(TestServiceClient.java:399)
at io.grpc.testing.integration.AbstractInteropTest.setUp(AbstractInteropTest.java:309)
at io.grpc.testing.integration.TestServiceClient.setUp(TestServiceClient.java:198)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:56)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 9 more
2020-03-02 10:22:50 -08:00
Chengyuan Zhang 6a7e47b8a5
core, grpclb: change policy selection strategy for Grpclb policy (take two: move logic of querying SRV into Grpclb's own resolver) (#6723)
Eliminated the code path of resolving Grpclb balancer addresses in grpc-core and moved it into GrpclbNameResolver, which is a subclass of DnsNameResolver. Main changes:

- Slightly changed ResourceResolver and its JNDI implementation. ResourceResolver#resolveSrv(String) returns a list of SrvRecord so that it only parse SRV records and does nothing more. It's gRPC's name resolver's logic to use information parsed from SRV records.

- Created a GrpclbNameResolver class that extends DnsNameResolver. Logic of using information from SRV records to set balancer addresses as ResolutionResult attributes is implemented in GrpclbNameResolver only.

- Refactored DnsNameResolver, mainly the resolveAll(...) method. Logics for resolving backend addresses and service config are modularized into resolveAddresses() and resolveServiceConfig() methods respectively. They are shared implementation for subclasses (i.e., GrpclbNameResolver).
2020-03-02 01:03:25 -08:00
Jihun Cho 8f6ad67429
all: remove deprecated internal attribute NAME_RESOLVER_SERVICE_CONFIG (#6705) 2020-02-28 22:31:53 -08:00
Jihun Cho 0fd4975d4c
rls: add proto and converter (#6743) 2020-02-28 21:41:19 -08:00
ZHANG Dapeng 37b231348e
xds: implement XdsRouting config parser
Implement xds_routing config part of go/grpc-xds-traffic-splitting-and-path-matching
2020-02-28 17:50:17 -08:00
Jihun Cho 2162ad0436
service: HealthCheckingLoadBalancerFactory using its own attribute (#6704) 2020-02-28 17:11:20 -08:00
ZHANG Dapeng e29561fbca
core: fix javadoc warnings
Fixes #6755

```
> Task :grpc-core:javadoc
core/src/main/java/io/grpc/util/GracefulSwitchLoadBalancer.java:43: warning - Tag @link: can't find switchTo(Factory) in io.grpc.util.GracefulSwitchLoadBalancer
1 warning
```
2020-02-28 13:07:22 -08:00
Elliotte Rusty Harold 3aa27b69c7
Upgrade guava to 8.2-android (#6772) 2020-02-28 10:51:38 -08:00
ZHANG Dapeng 9cb277d7af
bom: publish grpc-xds to bom 2020-02-28 10:46:15 -08:00
ZHANG Dapeng c5f48b8e38
all: let interop test use shaded dependency correctly (#6780) 2020-02-28 10:04:46 -08:00
Ran 3cd59c0b02
android: Annotate tests to use Robolectric's LEGACY LooperMode. bump roboletric to 4.3.1, truth to 1.0.1 and sdk to 28. (#6773) 2020-02-27 17:00:15 -08:00
Chengyuan Zhang 67397042b9
xds: set disable overprovisioning client feature and user agent in node identifier (#6766)
Add "envoy.lb.does_not_support_overprovisioning" to xDS node identifier client features. Set the new user_agent_name and user_agent_version fields for build version.
2020-02-27 13:19:21 -08:00
ZHANG Dapeng 5677a0b723
api,netty: fix MethodDescriptor and InternalKnownTransport for netty-shaded
Resolves #6765
2020-02-27 12:53:11 -08:00
chrisschek bf2a66c8a2
okhttp: fix incorrect connection-level flow control handling at beginning of connection
Specifically, this addresses bugs that occur when the `OkHttpChannelBuilder.flowControlWindow(int)` setting is increased from its default value.

Two changes:
1. On starting a connection, ensure the value of `OkHttpChannelBuilder.flowControlWindow(int)` is sent via Settings.INITIAL_WINDOW_SIZE. Also send a WINDOW_UPDATE after Settings to update the connection-level window.
2. Always initialize the `OutboundFlowController` with an initialWindowSize of 65335 bytes per the [http2 spec](https://http2.github.io/http2-spec/#InitialWindowSize) instead of using the inbound window size.

Fixes #6685
2020-02-27 12:34:23 -08:00
Jihun Cho 2eab291928
RELEASING.md: update mac build version (#6770) 2020-02-27 09:22:12 -08:00
Chengyuan Zhang 3ccf32ff29
xds: update envoy proto and udpa proto (#6764)
Update envoy proto to c0ab3a4374144728c1e193fc2d43951ed36ccdb7 and udpa proto to edbea6a78f6d1ba34edc69c53a396b1d88d59651.
2020-02-26 16:51:03 -08:00
Chengyuan Zhang 3955e4e184
api: fix Javadoc warnings. (#6763) 2020-02-26 11:51:01 -08:00
Elliotte Rusty Harold 159632c234
Update truth version to 1.0.1 (#6754) 2020-02-26 11:17:42 -08:00
Jihun Cho 3e9f3964c4 Start 1.29.0 development cycle 2020-02-26 09:37:27 -08:00
Jihun Cho df1b678698
Update readme to v1.27.2 (#6758) 2020-02-25 18:32:32 -08:00
Chengyuan Zhang e8066ccf4a
xds: improve logging for xDS workflow (#6748)
This PR tries to improve observability of xDS workflow for some extent. Users can configure Java logger `io.grpc.xds` (or `io.grpc.xds.XdsLogger`) level to enable different verbosities of log messages.

Verbosity of logging:
- FINE: mostly nothing useless there is something abnormal happens such xDS RPC stream closed.
- FINER: informative log messages showing the main xDS workflow happening under the hood.
- FINEST: verbose log messages for debugging purposes, original RPC messages and data types are printed.
2020-02-25 18:04:28 -08:00
Chengyuan Zhang 5b36caa4c2
xds: clean up xDS fallback balancer's logic for filtering out grpclb balancer addresses. (#6752)
Previously, the internal prod test name resolver will give grpclb balancer addresses in `ResolutionResult.addresses`. So we have this filtering code to avoid those addresses being used. We've changed the internal resolver, it will never mix grpclb balancer addresses with normal backend addresses. Therefore, we no longer need this piece of code.
2020-02-25 17:00:16 -08:00
ZHANG Dapeng 936515d2a7
xds: Improve grpc-xds javadoc and make it publishable
- Improve package-info.java and make minor changes to other javadoc.
- Make Orca API non-public for the moment.
- Make grpc-xds publishable.
2020-02-25 15:45:43 -08:00
Jihun Cho 4b201267c6
grpclb: add description to lb sends no backends status (#6751) 2020-02-25 11:05:36 -08:00
Jihun Cho 47c0b0b792
complier: fix typo in comment (#6747) 2020-02-24 14:32:26 -08:00
Sourabh Sarvotham Parkala e5d1244004
okhttp: updating okhttp version from 2.5.0 to 2.7.4 2020-02-24 12:23:11 -08:00
Jihun Cho 3b1af27073
compiler: add std:: qualifications to all references to std::string 2020-02-24 11:34:19 -08:00
Chengyuan Zhang a98db126e2
xds: update LRS protocol and fix usage of cluster name in ClusterStats (#6737)
Fixes load reporting integration due to LRS design flaws.

- Updated LRS protocol. The Node sent in LRS requests use a special metadata "PROXYLESS_CLIENT_HOSTNAME" with value being the hostname (including port) for creating the gRPC channel. Management server is able to infer clusters that the gRPC client potentially sends load to. LRS initial request does not need to populate clusters it wants to report load for.

- Each ClusterStats message in LRS requests represents the loads for each (cluster, cluster_service), where cluster_service field is optional. EDS LB policy should track loads per (cluster, cluster_service) and populate cluster name from upstream CDS policy.

- Modified CdsUpdate, which is the converted data of a CDS response. edsServiceName field can be null when an CDS response does not give it. We want to preserve the null value for LRS requests.
2020-02-21 15:32:27 -08:00