Commit Graph

4050 Commits

Author SHA1 Message Date
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
Jihun Cho abed707385
grpclb: handles empty address from LB (#6734) 2020-02-21 10:55:57 -08:00
Chengyuan Zhang 88c027bac3
xds: report load stats for all clusters over a single LRS client (#6706)
Current implementation of client side load reporting is incorrect. Mainly each gRPC channel should have at most one LRS stream based on the current design of using a single management server. In this change:

- Each LoadStatsStore instance is associated with clusterName:clusterServiceName. clusterName and clusterServiceName (nullable) is required to construct an LoadStatsStore instance.
   - The semantics is that an LoadStatsStore is responsible for recording loads sent to that cluster service of the cluster.
The queried load report (via LoadStatsStore#generateLoadReport()) will have cluster_name and cluster_service_name (if not null) set.
   - A LoadReportClient is responsible for reporting loads for all clusters. Add LoadStatsStore to LoadReportClient via LoadReportClient#addLoadStatsStore(clusterName, clusterServiceName, loadStatsStore). This should be done before LoadReportClient#startLoadReporting() is called due to the above open question.

- An XdsClient contains a single LoadReportClient instance. Its APIs XdsClient#reportClientStats(clusterName, clusterServiceName, loadStatsStore) calls LoadReportClient#addLoadStatsStore(clusterName, clusterServiceName, loadStatsStore) and then starts it. XdsClient#cancelClientStatsReport(clusterName, clusterServiceName) calls LoadReportClient#removeLoadStatsStore(clusterName, clusterServiceName) and stops it. LoadReportClient#addLoadStatsStore(clusterName, clusterServiceName, loadStatsStore) cannot be called repeatedly as once the load reporting started, we cannot change the cluster to report loads for. However, we are able to do report then cancel then report then cancel and so on.

- Refactored EdsLoadBalancer a bit, to accommodate the new APIs of enabling/disabling load reporting. The ClusterEndpointsLoadBalancer instance carries its own LoadStatsStore and controls start/cancel of load reporting.

- The interface for LoadReportClient is eliminated. LoadReportClient will completely be a subcomponent of XdsClient.


Note: Currently we assume no cluster/eds service switch, which means we will report load for a single cluster/eds service. So we make the restriction to LoadReportClient#addLoadStatsStore() API that it cannot be called after load reporting has already started. This restriction will be removed after the above open question is resolved.
2020-02-19 18:07:44 -08:00
Chengyuan Zhang 19de229b7f
Update readme to specify 1.27.1 (#6730) 2020-02-19 14:36:47 -08:00
Chengyuan Zhang e6d8c27448
Revert "census: Set SpanKind on Client/Server traces (#6680)" (#6729)
This reverts commit 60bc74620f.
2020-02-19 13:59:58 -08:00
sanjaypujare 26def7f694
xds: support for xDS data types needed for server side SDS support (#6718) 2020-02-19 09:07:07 -08:00
Ziad Hatahet bb37524750
examples: Fix typo in comments (#6721) 2020-02-18 10:16:08 -08:00
Eric Gribkoff 161a26ecff
interop-testing: sync SimpleResponse definition with core and go (#6713) 2020-02-14 14:05:23 -08:00
ZHANG Dapeng 92c9237fe6
xds: have ClusterEndpointsBalancer cancel endpoint watcher only during shutdown
Previously when eds service name is changed, the old endpoint watcher is canceled immediately even it's in graceful switch period, so the old ClusterEndpointsBalancer won't receive any new updates. This behavior is not as good/clean as cancelling the old watch only once the old ClusterEndpointsBalancer is shutdown.
2020-02-14 11:11:15 -08:00
ZHANG Dapeng cd049ed48b
xds: have cluster balancer cancel cluster watcher only during shutdown
Previously when CdsConfig is changed, the old cluster watcher is canceled immediately even it's in graceful switch period, so the old cluster balancer won't receive any new updates. This behavior is not as good/clean as cancelling the old watch only once the old cluster balancer is shutdown.
2020-02-14 10:58:50 -08:00
Eric Gribkoff 5555ec9a35
buildscripts: fix url of grpc core repo (#6708) 2020-02-13 18:51:08 -08:00
Chengyuan Zhang e320b9bee5 Include xDS example's README.md when updating release tag version. 2020-02-13 14:54:11 -08:00
ZHANG Dapeng 941de0e80b
xds: refactor io.grpc.xds.sds to io.grpc.xds.internal.sds 2020-02-13 10:33:52 -08:00
Chengyuan Zhang a8bdf5cb1a
xds: support reporting loads for more than one cluster services (#6688)
Although current LRS client API takes in load stats data for multiple cluster services, it only expects the management server to ask loads for a single cluster services (the LRS response will be ignored if management server asks for more than one). This change removes that assumption/restriction, the actual loads to be reported will be the intersection of services that we have loads for and services that management server asks for.

This change also cleans up LRS client's tests.
2020-02-11 12:48:56 -08:00
Jihun Cho 659987185f
core: revert stickiness from round robin (#6698) 2020-02-11 10:58:32 -08:00
Jihun Cho 774f2763c9
grpclb: add serviceName config to grpclb policy config (#6563) 2020-02-11 10:27:47 -08:00
Eric Anderson 45bb403f8a Update README etc to reference 1.27.0 2020-02-11 10:06:58 -08:00
Chengyuan Zhang 043ab93b3b
xds: fix bug of return resolution error twice in xDS resolver (#6671) 2020-02-11 09:48:53 -08:00
Eric Anderson 255e5feb24 Sync grpc-proto to 1ff78907
This noticed that load_balancer.proto had local changes introduced
in #6549. This was not noticed by Bazel because grpclb was not using
the io_grpc_grpc_proto repository. These issues have been fixed.
2020-02-10 12:32:39 -08:00
Eric Gribkoff 84b10350eb buildscripts,interop-testing: Add xDS tests on GCP (#6662) 2020-02-09 19:43:11 -08:00
Georg Welzel 60bc74620f
census: Set SpanKind on Client/Server traces (#6680) 2020-02-07 09:48:29 -08:00
ZhenLian 557da62305
netty: Upgrade Netty (4.1.45.Final) & tcnative (2.0.28.Final) 2020-02-06 10:03:14 -08:00
ZHANG Dapeng 258fe12f02
interop-testing: fix bug of xds test missing transitive dependency
This fixes a bug introduced in #6675 .

grpc-interop-testing should have added all dependency e.g. enovy that grpc-xds needs.
2020-02-05 16:47:13 -08:00
ZHANG Dapeng cd35a8153c
interop-testing: fix bug for xds dependency not published yet
In v1.27.0 release the grpc-interop-testing artifact in maven includes grpc-xds, but grpc-xds is not yet published. It should be removed from the dependency list in maven artifact.
2020-02-04 14:53:31 -08:00
sanjaypujare 461d30adfb
netty: fix server and client handlers to check the correct alpn list (#6603) 2020-02-04 13:03:34 -08:00
Eric Anderson 5b726c07fe alts: _Actually_ use Conscrypt when available
Previously the check for Conscrypt would always fail because CONSCRYPT
was guaranteed to be null.
2020-02-03 17:38:54 -08:00
Chengyuan Zhang e0ee52cc22
grpclb: fix lint warnings (#6670) 2020-02-03 10:34:30 -08:00
Chengyuan Zhang 295b64b5ff
grpclb: expose balancer address related attributes in internal accessor (#6669) 2020-01-31 17:50:04 -08:00
Chengyuan Zhang 26bff62ff3
grpclb: internal accessor for balancer address related attribute keys (#6667)
Creates an internal accessor for attribute keys in grpclb package that is used by name resolver implementations to set balancer addresses as name resolution result attributes.
2020-01-31 15:44:30 -08:00
Chengyuan Zhang be27d0ba8b
Revert "github: add Github workflow for Gradle wrapper validation (#6634)" (#6668)
This reverts commit 6548c6ff5e.
2020-01-31 15:32:44 -08:00
Chengyuan Zhang 6548c6ff5e
github: add Github workflow for Gradle wrapper validation (#6634) 2020-01-31 15:04:20 -08:00
Chengyuan Zhang 2734e22ef5
context, stub: check result of CountDownLatch.await() in test (#6664) 2020-01-31 15:03:22 -08:00
Jihun Cho 307f7d0e09
grpclb,xds: fix lint warnings (#6666) 2020-01-31 11:32:26 -08:00
ZHANG Dapeng 66f08c71b1
core,xds: clean up xds config parsing from service config util 2020-01-31 11:31:48 -08:00
Eric Anderson 2e12b53f2f
examples: Add XDS client example 2020-01-31 11:13:44 -08:00
Chengyuan Zhang c0f37e59ab
core, grpclb: change policy selection strategy for Grpclb policy (take one: eliminate special logic for deciding grpclb policy in core) (#6637)
First take for grpclb selection stabilization: 

1. Changed DnsNameResolver to return balancer addresses as a GrpcAttributes.ATTR_LB_ADDRS attribute in ResolutionResult, instead of among the addresses.

2. AutoConfiguredLoadBalancerFactory decides LB policy solely based on parsed service config without looking at resolved addresses. Behavior changes:
  - If no LB policy is specified in service config, default to pick_first, even if there exist balancer addresses (in attributes).
  - If grpclb specified but not available and no other specified policies available, it will fail without fallback to round_robin.

3. GrpclbLoadBalancer populates balancer addresses from ResolvedAddresses's attribute (GrpclbConstants.ATTR_LB_ADDRS) instead of sieving from addresses.
2020-01-31 10:41:43 -08:00
Chengyuan Zhang 3e6a77a7ef
xds: precise logic for selecting the virtual host in RDS responses (#6661)
Implements the precise logic for choosing the virtual host in RouteConfiguration of RDS responses. Specifically, fixes logic for domain search order. Minor fix for checking match field in RouteConfiguration. See RouteConfiguration Proto section in gRPC Client xDS API Flow design doc for specification.
2020-01-30 16:24:18 -08:00
ZHANG Dapeng 06b983567e
xds: rename LookasideLb to EdsLoadBalancer and XdsLoadBalancer2 to XdsLoadBalancer
This is a follow up cleanup of #6656 .
2020-01-30 13:19:14 -08:00
Elliotte Rusty Harold b3aea8193f
all: update google auth libraries (#6652) 2020-01-30 12:59:55 -08:00
Liam Miller-Cushon 084f5bc4bd java_grpc_library: Inline find_java_toolchain and find_java_runtime_toolchain
These methods were used to migrate the Java toolchains to use toolchain
resolution. Now that the migration is complete, the toolchain providers
can be used directly.
2020-01-30 12:55:40 -08:00
Jihun Cho 2acca6ea3b
all: fix lint warnings (#6658) 2020-01-30 10:00:39 -08:00