3350 Commits

Author SHA1 Message Date
7e7050be6a xds: Minor refactoring, prep for CDS LB policy (#3211) 2019-11-26 11:11:54 -08:00
d8e3da36ac xds: in EDS balancer, use xds_client from attibutes (#3205) 2019-11-25 14:50:28 -08:00
1c4070c2e9 xds: CDS implementation in v2Client. (#3203) 2019-11-25 09:14:33 -08:00
e5e980f276 dns: stop polling for updates; use UpdateState API (#3165) 2019-11-22 15:48:45 -08:00
cb47f381a7 dns: do not call NewServiceConfig when lookups are disabled (#3201) 2019-11-22 13:38:04 -08:00
da649b3624 xds: use the shared xds client in eds balancer (#3197)
This PR removes the xds_client implementation from eds balancer, and replaces it with a xds_client wrapper. (The xds_client wrapper has very similar API as the old xds_client implementation, so the change in the eds balancer is minimal).

The eds balancer currently doesn't look for xds_client from attributes, and always creates a new xds_client. The attributes change will be done in a following up change.
2019-11-21 14:10:04 -08:00
0e8c6a3281 github: make stalebot monitor PRs, too (#3202) 2019-11-21 12:37:51 -08:00
dc49de8acd balancer: add V2Picker, ClientConn.UpdateState, SubConnState.ConnectionError (#3186)
Also implement V2 versions of base.*, xds, pickfirst, grpclb, and round robin balancers.
2019-11-21 10:27:29 -08:00
7c1d326729 benchmark: Enable server keepalive in benchmarks (#3196) 2019-11-20 09:06:10 -08:00
24b653e8cc xds: Don't override dialFunc in xdsClient in tests. (#3191)
* Add a helper to the fakexds package to return a ClientConn talking to
  the fake server.
* Tests will make use of this ClientConn wherever required, or they will
  directly pass the fake server's address as the balancerName to the
  xdsclient.New() function, thus exercising that code path as well.
* Add grpc.WithTimeout to list in vet.sh
2019-11-20 09:02:53 -08:00
d720ab346f server: Keepalive pings should be sent every [Time] period (#3172)
This PR contains the server side changes corresponding to the client
side changes made in https://github.com/grpc/grpc-go/pull/3102.

Apart from the fix for the issue mentioned in
https://github.com/grpc/grpc-go/issues/2638, this PR also makes some
minor code cleanup and fixes the channelz test for keepalives count.
2019-11-19 14:43:22 -08:00
24f6331d7e server: correct doc regarding unknown handlers and interceptors (#3195) 2019-11-19 14:30:36 -08:00
5d4cc8affe xds: Implementation of xds_resolver using LDS/RDS (#3183)
xds: Implementation of xds_resolver using LDS/RDS
2019-11-18 17:46:14 -08:00
71ba135a58 xds: handle EDS in xds client (#3181) 2019-11-18 15:17:21 -08:00
967379b15b client: set grpc-accept-encoding header based on outgoing compressor (#3139) 2019-11-18 09:44:48 -08:00
347a6b4db3 stats: attach metadata to In/Out Headers/Trailers (#3169) 2019-11-14 15:22:36 -08:00
448c8c628c xds: replace eds proto message with xdsclient defined struct in eds balancer (#3174)
The xds client will parse the EDS response, and give the parse result to eds balancer, so the balancer doesn't need to deal with proto directly.

Also moved `ClusterLoadAssignmentBuilder` to another pacakge to be shared by tests in different packages.
2019-11-14 10:11:01 -08:00
0b3a5cc266 Move bootstrap functionality to a new package. (#3176) 2019-11-13 09:58:04 -08:00
2cb07fcd90 resolver: rename Option to Options, leaving type aliases for now (#3175) 2019-11-12 15:23:46 -08:00
dc9615bb06 xds: Initial implementation of a client using the v2 API (#3144)
This object will be used by a higher level xdsClient object, which will
provide the watch API used by the xds resolver and balancer
implementations.
2019-11-12 10:31:11 -08:00
460b1d2ced dns: disable SRV record lookups unless grpclb is imported (#3149) 2019-11-11 10:12:40 -08:00
51ac07fb67 vet: revise staticcheck strategy (#3152) 2019-11-08 14:46:57 -08:00
95c3759457 examples: change wait into job polling loop after killing tests (#3168) 2019-11-08 14:46:36 -08:00
d903dd74ec interop: add grpclb fallback test (#2994) 2019-11-08 13:14:23 -08:00
4717e3b570 resolver: add deprecation note to AddressType and its values (#3156) 2019-11-08 10:38:45 -08:00
f691f3524e resolver: re-add dns and passthrough packages as references to internal versions (#3162) 2019-11-08 09:53:51 -08:00
caaa764950 examples: enable debugging to help determine why tests are hanging (#3166) 2019-11-08 09:53:16 -08:00
6071e7015f more detailed log message (#3117) 2019-11-07 13:12:57 -08:00
c2b74f7468 xds: set client node.BuildVersion to gRPC version (#3140) 2019-11-07 09:59:00 -08:00
2548a2203d internal: fix EDS test race in cmp/sort (#3154) 2019-11-06 19:38:51 -08:00
0aa47d32da resolver: introduce attributes package and use it for Address and State (#3151) 2019-11-06 16:53:23 -08:00
2d2f65684c cleanup: fix generic comparisons on protobuf messages (#3153)
Generated protobuf messages contain internal data structures
that general purpose comparison functions (e.g., reflect.DeepEqual,
pretty.Compare, etc) do not properly compare. It is already the case
today that these functions may report a difference when two messages
are actually semantically equivalent.

Fix all usages by either calling proto.Equal directly if
the top-level types are themselves proto.Message, or by calling
cmp.Equal with the cmp.Comparer(proto.Equal) option specified.
This option teaches cmp to use proto.Equal anytime it encounters
proto.Message types.
2019-11-06 14:25:07 -08:00
dd568c0669 xds: support priority (#3066)
Each priority maps to a balancer group.

When a priority is in use, its balancer group is started, and it will close the balancer groups with lower priorities. When a priority is down (no connection ready), it will start the next priority balancer group.
2019-11-06 13:09:11 -08:00
76e6ad37f4 Change version to 1.26.0-dev (#3148) 2019-11-05 14:14:16 -08:00
6dac020480 test: add test of malformed gzip payload (#3141) 2019-11-05 11:11:34 -08:00
6c48774ffb travis: move example tests to a separate run (#3143)
The example tests were causing travis timeout.
2019-11-05 10:34:44 -08:00
b09352fc84 xds: add new fields to XDSConfig (#3100)
Fields are added in: https://github.com/grpc/grpc-proto/pull/64

Other changes:
 - Move XDSConfig from internal to balancer
   - Later we will add a separate config for CDS balancer
 - generate service_config.pb.go and test with json generated from proto message
2019-11-05 09:17:10 -08:00
bbd4b7ae28 eds: skip unhealthy endpoints (#3137)
Unknown and healthy are both considered healthy.

https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/health_check.proto#envoy-api-enum-core-healthstatus
2019-11-05 09:03:22 -08:00
583401aac5 Add a general purpose unbounded buffer implementation (#3099)
This PR moves the unbounded buffer implementation found in
`scStateUpdateBuffer` to the internal package. It also makes the buffer
work with `interface{}` type.

This addresses a TODO in the existing code. This will also help with the
eventual `BalancerManager` implementation which will supersede the
`ccBalancerWrapper` implementation found in balancer_conn_wrappers.go.
2019-11-04 14:22:16 -08:00
88bf070301 resolver: Add new fields to resolver.BuildOption struct to support dialing a remote name resolver (#3098)
These fields will be used by resolver implementations which need to talk
to a remote name resolver.
2019-11-04 08:41:14 -08:00
7c97d1d53c docs: fix reflection doc (#3138)
added `git submodule update --init` to readme instructions to pull in missing dependencies.
2019-11-04 08:32:18 -08:00
da2bec01b9 test & testutils: prevent goroutine leaks in test functions (#3133) 2019-11-01 14:51:58 -07:00
0f32486dd3 transport: minor code simplification (#3136) 2019-11-01 11:11:23 -07:00
8988da6e70 examples: add examples regression test script (#3118) 2019-10-31 13:11:53 -07:00
8eafb5b7d5 xds: remove cds from the current xds balancer (#3085)
cds will be done in a separate cds balancer.
2019-10-31 09:44:09 -07:00
459a38a0e3 grpclb: enter fallback if no balancer addresses are available (#3119)
This is necessary because there's another way to select grpclb (by specifying grpclb in service config's balancing policy field). So it's possible that grpclb is picked, but resolver doesn't have any balancer addresses.

When an update without balancer address is received, grpclb closes the underlying ClientConn to remote balancer, and enters fallback mode.

Note that grpclb waits until the ClientConn and the RPC goroutines are actually closed to do the fallback work. This can avoid race caused by async close.
2019-10-31 09:43:18 -07:00
ff5f0e93f5 xds: add script to regenerate orca (#3131) 2019-10-30 10:14:39 -07:00
ee90cbdad7 stalebot: only update one issue per run to prepare for re-enabling it (#3129) 2019-10-29 13:24:38 -07:00
5367efb805 cleanup: no x/net/context (#3120)
Manual change + mockgen
2019-10-29 13:06:26 -07:00
a8f166a036 xds: use generated files from go-control-plane (#3083)
validate needs to be removed, otherwise build fails due to duplicate
proto type registered.
2019-10-29 11:14:20 -07:00