Commit Graph

256 Commits

Author SHA1 Message Date
Menghan Li da6ef0055c
xds/clusterresolver: reuse child policy names for the same locality (#5367) 2022-05-25 17:03:33 -07:00
Zach Reyes ed7522591b
Don't call cmp in non testing file (#5370)
* Don't call cmp in non testing file
2022-05-23 15:14:50 -04:00
Menghan Li 459729d667
xds/priority: avoid sending duplicate updates to children (#5374) 2022-05-20 15:17:13 -07:00
Menghan Li 333a441e27
xds/ringhash: update connectivity state aggregation, and make sure at least one SubConn is connecting in TF (#5338) 2022-05-18 10:58:39 -07:00
Menghan Li db79903af9
xds/priority: start the init timer when a child switch to Connecting from non-transient-failure state (#5334) 2022-05-10 16:56:41 -07:00
Zach Reyes 462d867696
xds: Add Outlier Detection configuration and CDS handling (#5299)
xds: Add Outlier Detection configuration and CDS handling
2022-05-09 16:13:07 -04:00
Zach Reyes ee67b3d8e9
xds: Handle loops and ignore duplicates in aggregated cluster handling (#5317)
xds: Handle loops and ignore duplicates in aggregated cluster handling
2022-05-05 16:08:24 -04:00
Zach Reyes 99aae3442d
cluster manager: Add Graceful Switch functionality to Cluster Manager (#5265)
* cluster manager: Add Graceful Switch functionality to Cluster Manager
2022-03-30 18:01:37 -04:00
Zach Reyes 8078d1d541
balancergroup: Switched subBalancerWrapper to wrap a gracefulswitch.Balancer (#5245)
* balancergroup: Switched subBalancerWrapper to wrap a gracefulswitch.Balancer
2022-03-21 16:34:32 -04:00
Easwar Swaminathan a73725f42d
channelz: include channelz identifier in logs (#5192) 2022-02-23 07:30:06 -08:00
Menghan Li 91967153f5
xds/priority: log warnings instead of errors (#5185) 2022-02-04 13:01:27 -08:00
Easwar Swaminathan 980790869b
rls: support `routeLookupChannelServiceConfig` field (#5176) 2022-01-31 12:49:45 -08:00
Menghan Li 0a68f8aff0
xds/federation: support federation in LRS (#5128) 2022-01-26 11:39:10 -08:00
Menghan Li b49c0c99e4
xds/clusterresolver: set ClusterName for DNS child (#5119) 2022-01-12 11:01:29 -08:00
Shihao Xia 46935b9650
fix possible nil before casting (#5017) 2021-12-01 15:10:13 -08:00
Menghan Li 52d9416739
xds/client: move transport_helper from xdsclient to a separate struct (#4968) 2021-11-10 15:03:10 -08:00
Easwar Swaminathan 714ba8d517
xds: move balancergroup and weightedtarget our of xds directory (#4966) 2021-11-09 11:59:10 -08:00
Ryan Leung 14ebd917f2
lint: fix some unused parameter issues (#4956) 2021-11-09 11:18:21 -08:00
Menghan Li 59e024e4c7
xds/client: move watchers from xdsclient to a separate struct (#4963) 2021-11-09 10:32:16 -08:00
Menghan Li 79e9c9571a
xds/client: move unmarshal functions and types to a separate package (#4904) 2021-11-08 11:11:24 -08:00
Easwar Swaminathan 5841c8c783
xds/balancergroup: remove xds dependency from balancergroup (#4955) 2021-11-05 09:30:57 -07:00
Menghan Li 0d5030755c
xds/priority: handle new low priority when high priority is in Idle (#4889) 2021-10-20 10:51:48 -07:00
Doug Fawley 36d87572db
attributes: add Equal method; resolver: add AddressMap and State.BalancerAttributes (#4855) 2021-10-15 10:39:56 -07:00
Menghan Li 3db1cb09ea
xds/clusterimpl: fix SubConn wrapper returned by picker during race (#4876) 2021-10-15 10:15:34 -07:00
Easwar Swaminathan 3bae5f5b65
xds: use protos from cncf/xds instead of cncf/udpa (#4866) 2021-10-14 16:51:55 -07:00
Menghan Li d623accd30
xds: fix parent balancers to handle Idle children (#4801) 2021-09-22 16:01:18 -07:00
Menghan Li 4f093b9a5a
ringhash: the balancer (#4741) 2021-09-15 14:47:18 -07:00
Menghan Li 98ccf472da
priority: handle Idle children the same way as Ready (#4769) 2021-09-15 13:35:51 -07:00
Menghan Li 2d4e44a0cd
xds/affinity: fix bugs in clusterresolver and xds-resolver (#4744) 2021-09-14 16:11:03 -07:00
Menghan Li 973e7cb9a1
ringhash: the picker (#4730) 2021-09-07 10:41:26 -07:00
Menghan Li c99a9c19b0
priority: forward the first IDLE state and picker (#4731) 2021-09-07 10:10:36 -07:00
Menghan Li d6a5f5f4f3
ringhash: the ring (#4701) 2021-09-02 10:49:35 -07:00
Easwar Swaminathan 85b9a1a0fa
xds: pass empty balancer.BuildOptions in clusterresolver_test (#4711) 2021-08-27 08:18:29 -07:00
Easwar Swaminathan 712e8d4f57
Remove support for Go 1.13 and older (cont) (#4706) 2021-08-25 14:51:41 -07:00
Doug Fawley 8ab16ef276
balancer: add ExitIdle optional interface (#4673) 2021-08-18 15:04:35 -07:00
Menghan Li a42567fe92
xds: support picking ringhash in xds client and cds policy (#4657) 2021-08-12 11:12:02 -07:00
Aliaksandr Mianzhynski 9c668aeab8
all: preallocate slices where possible (#4609) 2021-08-11 09:17:59 -07:00
Easwar Swaminathan 574137db7d
xds: fix flaky test (TestPickerUpdateAfterClose) (#4658) 2021-08-06 10:56:44 -07:00
Menghan Li fc30d5b571
xds/cluster_resolver: support RING_HASH as a child of cluster_resolver balancer (#4621)
1. merge endpoint picking and localility picking policy to one field in cluster_resolver's balancer config
   - This field only supports ROUND_ROBIN or RING_HASH.
   - This is to support RING_HASH policy, which is responsible both endpoint picking and locality picking.
   - If policy is RING_HASH, endpoints in localities will be flattened to a list of endpoints, and passed to the policy.
1. support building policy config with RING_HASH as a child
   - The config tree has one less layer comparing with ROUND_ROBIN
   - This also need to define RING_HASH's balancer config config
1. Deleted test `TestEDS_UpdateSubBalancerName` because now the balancer doesn't support updating child to a custom policy.
2021-08-05 14:30:04 -07:00
raymonder jin 61c704607b
fix typo (#4616) 2021-07-28 14:02:38 -04:00
Menghan Li 582ef458c6
cluster_resolver: move balancer config types into cluster_resolver package and unexport (#4607) 2021-07-22 16:12:30 -07:00
Menghan Li 0300770df1
xds: support cluster fallback in cluster_resolver (#4594) 2021-07-21 10:22:02 -07:00
Menghan Li b586e92158
xds/client: notify the resource watchers of xDS errors (#4564) 2021-07-14 13:10:19 -07:00
Menghan Li ebfe3be62a
cluster_resolver: implement resource resolver to resolve EDS and DNS (#4531) 2021-07-12 16:42:02 -07:00
Menghan Li b3f274c2ba
xds/cluster_impl: fix cluster_impl not correctly starting LoadReport stream (#4566) 2021-06-29 11:45:16 -07:00
Menghan Li e24ede5936
xds: delete LRS policy and move the functionality to xds_cluster_impl (#4528)
- (cluster_resolver) attach locality ID to addresses
- (cluster_impl) wrap SubConn
- (lrs) delete
2021-06-24 16:20:11 -07:00
Menghan Li 4440c3b830
cluster_resolver: fix DiscoveryMechanismType marshal JSON (#4532) 2021-06-22 14:57:05 -07:00
Menghan Li 14c7ed60ad
xds/circuit_breaking: counters should be keyed by {cluster, EDS service name} pair (#4560) 2021-06-22 11:03:12 -07:00
Menghan Li 1c1e3f88d3
xds: fix test race in cluster_resolver (#4555)
There's a race between update sub-balancer and the first EDS resp. If
sub-balancer is updated after the first EDS resp, the old balancers
(round_robin) will create two lingering SubConns that are not handled,
which will mess up the following SubConn state updates.
2021-06-17 11:29:17 -07:00
Menghan Li 151c8b770a
xds/clusterimpl: fix race between picker update and ClientConn state update (#4551) 2021-06-17 11:14:00 -07:00
Zach Reyes 633fbe4dfe
xds: generate per-request hash config selector (#4525)
* xds: generate per-request hash in config selector
2021-06-17 09:00:05 -04:00
Menghan Li 4c651eda23
xds: move eds package to cluster_resolver (#4545) 2021-06-16 11:04:33 -07:00
Menghan Li 549c53a90c
xds/eds: rewrite EDS policy using child policies (#4457) 2021-06-15 14:03:10 -07:00
Menghan Li cd9f53ac49
xds/cds: update CDS balancer to partially handle aggregated cluster (#4539) 2021-06-15 11:09:10 -07:00
Doug Fawley 6351a55c38
xds: remove env var protetion of advanced routing features (#4529) 2021-06-10 09:33:06 -07:00
Menghan Li b1418a6e74
xds: export XDSClient interface and use it in balancer tests (#4510)
- xdsclient.New returns the interface now
- xdsclient.SetClient and xdsclient.FromResolverState take and return the interface now
- cleanup xds balancer tests to pass xds_client in resolver state
2021-06-08 16:05:50 -07:00
Doug Fawley 656cad9ae5
xds: standardize xds client field name (xdsClient) (#4518) 2021-06-04 12:00:13 -07:00
Doug Fawley 7f9eeeae36
xds: standardize builder type names (bb) and balancer receiver names (b) (#4517) 2021-06-04 11:40:23 -07:00
Doug Fawley 7beddeea91
cleanup: remove "Interface" as suffix of (almost all) interface names (#4512) 2021-06-04 08:58:26 -07:00
Doug Fawley 5c164e2b8f
xds: rename xds/internal/client package to xdsclient (#4511) 2021-06-03 16:10:21 -07:00
Menghan Li e7b12ef3b1
cluster_resolver: add functions to build child balancer config (#4429) 2021-06-02 15:58:39 -07:00
Doug Fawley 3508452162
xds: add test-only injection of xds config to client and server (#4476) 2021-06-02 10:48:18 -07:00
Menghan Li 584fa41822
xds/testing: export variables for testing (#4449)
The exported variables will be used by tests (to be added in a future
PR, in another package) that use these balancers as child balancer.
2021-05-18 10:30:43 -07:00
Zach Reyes b759b408e8
xds: moved shared matchers to internal/xds (#4441)
* Moved shared matchers to internal/xds
2021-05-14 17:02:10 -04:00
Menghan Li a712a73889
xds/cds: add separate fields for cluster name and eds service name (#4414) 2021-05-12 16:25:07 -07:00
Menghan Li 9cb99a5211
xds: pretty print xDS updates and service config (#4405) 2021-05-12 15:48:16 -07:00
Zach Reyes 45e60095da
xds: add support for aggregate clusters (#4332)
Add support for aggregate clusters in CDS Balancer
2021-05-12 17:28:49 -04:00
Easwar Swaminathan 40b25c5b2c
xds: set correct order of certificate providers in handshake info (#4350) 2021-05-05 12:34:15 -07:00
Easwar Swaminathan 0fc0397d77
xds: actually close stuff in cds/eds `Close()` (#4381) 2021-05-04 16:54:57 -07:00
Menghan Li ebd6aba675
Revert "xds/cds: add separate fields for cluster name and eds service name" (#4382)
This reverts PRs #4352 (and two follow up fixes #4372 #4378).
Because the xds interop tests were flaky.

Revert before the branch cut.
2021-05-03 15:16:49 -07:00
Menghan Li b418de839e
xds/eds: restart EDS watch after previous was canceled (#4378) 2021-04-30 11:53:31 -07:00
Menghan Li c3b66015bd
xds/circuit_breaking: use cluster name as key, not EDS service name (#4372) 2021-04-29 11:56:50 -07:00
Menghan Li 24d03d9f76
xds/priority: add ignore reresolution boolean to config (#4275) 2021-04-27 15:22:25 -07:00
Menghan Li 7c5e73795d
xds/cds: add separate fields for cluster name and eds service name (#4352) 2021-04-27 13:37:48 -07:00
Menghan Li e158e3e82c
xds/lrs: server name is not required to be non-empty (#4356) 2021-04-23 13:15:21 -07:00
Doug Fawley 74fe6eaa41
github: testing action workflow improvements and update to test Go1.16 (#4358) 2021-04-22 14:59:51 -07:00
Menghan Li 671707bdf3
internal: fix symbol undefined build failure (#4353)
Caused by git merge
2021-04-21 14:06:54 -07:00
Menghan Li 970aa09283
xds/balancers: export balancer names and config structs (#4334) 2021-04-21 10:11:28 -07:00
Menghan Li 1a870aec2f
xds/clusterimpl: trigger re-resolution on subconn transient_failure (#4314) 2021-04-15 15:08:03 -07:00
Doug Fawley 87eb5b7502
credentials/google: remove unnecessary dependency on xds protos (#4339) 2021-04-13 16:19:17 -07:00
Menghan Li 950ddd3c37
xds/google_default_creds: handshake based on cluster name in address attributes (#4310) 2021-04-12 09:56:37 -07:00
Menghan Li 1d1bbb55b3
weightedtarget: handle updating child policy name (#4309) 2021-04-08 16:11:44 -07:00
Menghan Li 004ef8ade6
xds/clusterimpl: fix picker update race after balancer is closed (#4318) 2021-04-06 13:47:15 -07:00
Menghan Li 9a10f35787
balancergroup: fix leak child balancer not closed (#4308) 2021-04-06 13:11:49 -07:00
Menghan Li d26af8e391
admin: implement admin services (#4274) 2021-03-22 15:14:11 -07:00
Menghan Li 967933baf5
xds/cdsbalancer: move xds client close to run() (#4273)
Otherwise client may be used by run() after closed.
2021-03-16 14:50:07 -07:00
Easwar Swaminathan 1e7119b136
xds: support all matchers for SANs (#4246) 2021-03-15 14:13:13 -07:00
Easwar Swaminathan c949703b4b
xds/cdsbalancer: Override UpdateAddresses() (#4227) 2021-02-26 08:45:26 -08:00
Menghan Li 26c143bd5f
circuit breaking: update picker inline when there's a counter update (#4212) 2021-02-18 10:12:25 -08:00
Menghan Li 1b75f7144d
circuit breaking: keep max_count per picker, instead of globally, and add support in cluster_impl balancer (#4203)
Also changed circuit breaking counter implementation to move max_count into the
picker, because this is how cluster_impl is designed. Implementation in EDS is
also modified to keep max_count in picker.
2021-02-17 10:46:07 -08:00
Menghan Li 9f3606cd0f
xds: xds_cluster_impl_balancer part 1 (#4154)
Part of C2P fallback. To support fallback to a DNS cluster.

This PR adds implementation of xds_cluster_impl_balancer, which will be responsible for circuit breaking and rpc dropping.

This PR only added RPC dropping. Circuit breaking will be done in a followup PR, after some necessary refactoring.
2021-02-11 15:03:39 -08:00
Menghan Li c9217c7195
priority: pass build options to balancergroup (#4202) 2021-02-11 14:30:32 -08:00
Menghan Li ad24ab52b1
priority: the implementation (#4070) 2021-02-10 10:38:04 -08:00
Easwar Swaminathan 9280052d36
balancergroup: Propagate balancer.BuildOptions to child policies (#4184) 2021-02-07 19:55:33 -08:00
Menghan Li 0bc741730b
xds: report drops by circuit breaking (#4171) 2021-01-28 16:47:07 -08:00
Menghan Li 0bd76be2bb
lrs: use JSON for locality's String representation (#4135) 2021-01-07 14:53:43 -08:00
Easwar Swaminathan d79063fdde
credentials/xds: Move non-user facing functionality to an internal package (#4117) 2020-12-16 15:46:56 -08:00
Doug Fawley 4cd551eca7
xds: split routing balancer into config selector + cluster manager (#4083) 2020-12-15 14:01:04 -08:00
Garrett Gutierrez ff16195790
xds: Implement circuit breaking support. (#4050) 2020-12-08 14:33:48 -08:00
Menghan Li bce1fdfad9
eds/lrs: handle nil when LRS is disabled (#4086) 2020-12-07 15:10:33 -08:00