Commit Graph

23 Commits

Author SHA1 Message Date
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 d26af8e391
admin: implement admin services (#4274) 2021-03-22 15:14:11 -07:00
Menghan Li 930c79186c
csds: update xds_client to populate update metadata (#4226) 2021-03-03 18:06:50 -08:00
Doug Fawley 29bf29e0ed
xds: add HTTP filter is_optional support (gRFC A39) (#4221) 2021-03-02 09:11:35 -08:00
Doug Fawley 60843b1066
xds: add support for HTTP filters (gRFC A39) (#4206) 2021-02-25 14:04:15 -08:00
Menghan Li c8cef768c7
csds: update client resource cache to keep and dump metadata (#4217) 2021-02-25 12:57:45 -08:00
Doug Fawley 7b8d65a7bc
xds: rename internal/client files to remove client prefix (#4188) 2021-02-04 14:11:50 -08:00
Menghan Li ff40ef4227
xds: refactor xds_client (#3477)
This PR refactors xds_client to support multiples watches. Those watches can be for the same type and same resource_name.

There's upper level `Client` and lower level `v2client`. Before this change, all logic was in `v2client`, and `Client` was a thin wrapper.

This PR moves some of the functionality from `v2client` to `Client`. New layers:

- Upper level `Client`
  - keeps a list of watchers
    - provides method `func WatchXXX() (cancel func())`
    - has `WatchService()` which involves `LDS` and `RDS`
  - handles resources from the xDS responses and dispatch to the watchers
    - including multiple watchers for the same resource_name
  - keeps cache
    - and checks cache for new watches

- Lower level `v2client`
  - is a dumb client that
    - manages ADS stream
    - sends a new xDS request when add/remove watch
    - parses xDS responses
      - It doesn't call watchers, but forwards all parsed results to upper Client
    - handles ACK/NACK
  - supports `addWatch(type, name)` and `removeWatch(type, name)`
    - instead of `func watchCDS() func()`, which is now moved up to upper `Client`

Also includes other changes:
 - Corresponding test changes (some tests for `v2client` were moved to `Client`)
 - Method and type renaming
   - CDS/EDS -> Cluster/Endpoints
 - callback functions all accept updates as non-pointers
2020-04-15 14:32:31 -07:00
Menghan Li d3b2eefd21
xds: include port in VirtualHost domain matching (#3413) 2020-03-03 12:53:47 -08:00
Easwar Swaminathan c0d37940ad
xds: Eliminate calls to reflect.DeepEqual from xds code. (#3414) 2020-03-02 15:49:25 -08:00
Menghan Li e139b475f3
xds: support wildcard domain matching for RDS response (#3397) 2020-02-28 09:44:04 -08:00
Menghan Li 7f5ddc8aee
xds: improve logging (#3386)
- More logs in xds bootstrap/resolver/cds/eds
  - Bootstrap file content/error
  - Request/response on ADS stream
  - Actions by client/resolver/balancer
  - Content of updates
- Logs prefixed with component name and id
  - `[xds-bootstrap]`
  - `[xds-client <address>]`
  - `[cds-lb <address>]`
  - `[eds-lb <address>]`
2020-02-26 17:50:07 -08:00
Garrett Gutierrez 132187f04c
Modified tests to use tlogger. (#3343)
* Modified tests to use tlogger.

* Fail on errors, with error expectations.

* Added expects and MixedCapsed grpclb_config tests

* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go

* Added ExpectErrorN()

* Removed redundant leak checks

* Fixed new test

* Made tlogger globals into tlogger methods

* ErrorsLeft -> EndTest

* Removed some redundant lines

* Fixed error in test and empty map in EndTest
2020-02-06 13:03:20 -08:00
Easwar Swaminathan 8a65b8453b
xds: client test cleanup. (#3284) 2019-12-27 15:00:59 -08:00
Menghan Li aa428f8ea4
xds: fix RDS flaky tests due to ACK (#3279)
Clear ACK request before starting the real RDS tests. This should only be necessary for RDS tests because RDS needs an existing LDS.
2019-12-23 15:08:16 -08:00
Menghan Li d14c83465f
xds: client test cleanup (#3267) 2019-12-23 15:06:49 -08:00
Menghan Li a281b506e1
xds test: read ACK to clear req chan (#3266)
The real test relies on req chan to know when the fake xds server
receives the request. Without this, req chan may unblock for the ack,
before the real watch handler is ready.
2019-12-18 12:35:58 -08:00
Menghan Li 3a4f66e0ed
xds: small fixes (#3238)
- install cds balancer by importing package cdsbalancer
 - `net.SplitHostPort` fails when target doesn't have port, but we want to use the original string instead
2019-12-10 12:49:47 -08:00
Easwar Swaminathan a4e9d9553d
xds: Update the check for match field when handling an RDS response. (#3239)
The client will look only at the last route in the list (the default
route), whose match field must contain a prefix field whose value is the
empty string and whose route field must be set.
2019-12-10 10:47:05 -08:00
Easwar Swaminathan 1c4070c2e9
xds: CDS implementation in v2Client. (#3203) 2019-11-25 09:14:33 -08:00
Easwar Swaminathan 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
Menghan Li 71ba135a58
xds: handle EDS in xds client (#3181) 2019-11-18 15:17:21 -08:00
Easwar Swaminathan 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