Commit Graph

48 Commits

Author SHA1 Message Date
Easwar Swaminathan 9bc72deba4
grpc: remove mentions of WithBalancerName from comments (#5555) 2022-08-02 15:56:37 -07:00
Easwar Swaminathan 34660d1029
test: use `t.Fatal` instead of `panic` for service config parsing errors (#5266) 2022-03-22 14:37:12 -07:00
Easwar Swaminathan a73725f42d
channelz: include channelz identifier in logs (#5192) 2022-02-23 07:30:06 -08:00
Easwar Swaminathan a354b1eec3
channelz: rename NewChannelzStorage to NewChannelzStorageForTesting (#5190) 2022-02-09 14:14:44 -08:00
Doug Fawley 997ce619eb
clientconn: do not automatically reconnect addrConns; go idle instead (#4613) 2021-08-10 13:22:34 -07:00
Doug Fawley 0d6a24f68a
test: move stubServer to separate package in internal (#4081) 2020-12-04 15:56:07 -08:00
Gaurav Gahlot d7a7a304ff
testing: Avoid using context.Background (#3949) 2020-11-05 09:25:17 -08:00
Doug Fawley 02cd07d9bb
cmd/protoc-gen-go-grpc: revert to interface-based service registration (#3911) 2020-09-29 15:17:06 -07:00
Doug Fawley 15157e2664
test: remove funcServer and some uses of NewTestServiceService (#3867) 2020-09-09 13:23:46 -07:00
Easwar Swaminathan fd393c8989
testdata: Update testdata certs. (#3786)
* This will be used in certprovider tests where we would want more than one server and client certs.
* Also, updated existing usages of these certs to point to the new  files.
* Also copy over the required certs/key files. This avoids the example gomodule from depending on gRPC testdata package which should be able to change independently.
* Fix interop test's SAN.
2020-08-05 09:55:07 -07:00
Zou Nengren 4e63bcab52
test: replace manual.GenerateAndRegisterManualResolver with grpc.WithResolvers (#3700) 2020-06-23 09:49:44 -07:00
Doug Fawley 4eb418e5b2
balancer: move Balancer and Picker to V2; delete legacy API (#3431) 2020-04-28 14:52:49 -07:00
Garrett Gutierrez 6af3d372ce
Fixed channelz test flakyness. (#3417) 2020-03-03 13:25:42 -08:00
Doug Fawley cb03b9f65c
balancer/base: consider an empty address list an error (#3361) 2020-02-05 13:16:31 -08:00
Easwar Swaminathan 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
Doug Fawley ed563a02ea
resolver: add State fields to support error handling (#2951) 2019-10-04 12:59:43 -07:00
Doug Fawley a5e64ec425
test: fix channelz test for violating flow control (#3031)
- Send a message from the test server that the client can block on to know for sure the RPC's header was sent.
- Don't receive in the test server so we can violate flow control
- Set a deadline on the RPC so it can't hang forever.
2019-09-18 13:07:23 -07:00
Doug Fawley 40ed2eb467
server: set and advertise max frame size of 16KB (#3018) 2019-09-11 10:34:34 -07:00
Easwar Swaminathan 70e8b38052
test: end2end test improvements separate server and client configs. (#2877)
- Seperated and documented the options for client and server sides.
- Better support for multiple grpc.Servers. This will be used in other
  improvements that I have in the works.
- Moved some common functionality from channelz_test.go to
  end2end_test.go.
- Added an option to use the default health service implementation, instead
 of each test creating a new health.Server and passing it in. The
 inidividual tests have not been changed in this PR. I will do that in a
 follow up PR to keep the changes to a reasonable size.
- Fixed one of the tests which had to be fixed because of the separation
  of client and server configs.
2019-06-24 14:53:45 -07:00
Doug Fawley d40a995895
balancer/resolver: add loadBalancingConfig and pre-parsing support (#2732) 2019-05-30 09:12:58 -07:00
lyuxuan 42baa8b199
channelz: wait for clean up before next test (#2797) 2019-05-02 14:47:50 -07:00
lyuxuan 955eb8a3c8
channelz: cleanup channel registration if Dial fails (#2733) 2019-04-02 15:42:35 -07:00
Doug Fawley 3910b873d3
bar: add ability to update resolver state atomically and pass directly to the balancer (#2693) 2019-03-22 10:48:55 -07:00
Doug Fawley ed70822b12 keepalive: apply minimum ping time of 10s to client and 1s to server (#2642)
* keepalive: apply minimum ping time of 10s to client and 1s to server

* review fixes
2019-02-21 13:09:37 -08:00
CodeLingo Bot c2f12b83a7 Fix error formatting based on best practices from Code Review Comments (#2615) 2019-02-07 10:01:40 -08:00
Ian Lance Taylor 0e8a6f931c credentials: add TLS 1.3 cipher suites (#2596)
This lets the tests pass with Go1.12beta2.
2019-01-25 08:47:38 -08:00
Doug Fawley 59acad4c45
cleanup: more simplifications (#2574) 2019-01-16 13:07:56 -08:00
Doug Fawley 6cc789b34b
client: make handshake required 'on' by default, not 'hybrid' (#2565) 2019-01-15 09:19:32 -08:00
Masahiro Sano 8fd063a5aa channelz: Implement GetServer method for channelz (#2537) 2019-01-09 10:50:34 -08:00
Doug Fawley 0a391ff2b7
grpctest: add new package to manage tests and support per-test setup/teardown (#2523)
- Migrate `grpc` & `grpc/test` packages to use `Teardown` support to guarantee `leakcheck` is used
2019-01-07 14:24:56 -08:00
Masahiro Sano 1838dedee3 channelz: respect max_results in listing methods (#2516) 2018-12-20 13:53:39 -08:00
lyuxuan ca62c6b92c
channelz: fix GetSecurityValue function name. (#2450) 2018-11-30 06:01:10 +08:00
Doug Fawley 04ea82009c
cleanup: replace "x/net/context" import with "context" (#2439) 2018-11-12 13:30:41 -08:00
Jean de Klerk 8d75951f9b
Fix onclose state transition (#2346)
internal: fix onClose state transitions

When onClose occurs during WaitForHandshake, it should immediately
exit createTransport instead of leaving CONNECTING and entering READY.

Furthermore, when any onClose happens, the state should change to
TRANSIENT FAILURE.

Fixes #2340
Fixes #2341

Also fixes an unreported bug in which entering READY causes a
Dial call to end prematurely, instead of blocking until a READY
transport is found.
2018-10-08 16:58:54 -06:00
lyuxuan 179dc63634
testing: fix race caused by successful Accept on a shutdown server (#2321) 2018-10-04 13:26:25 -07:00
lyuxuan acd1429515
channelz: channel tracing (#2262)
* channelz: channel trancing

* add service

* update

* uuu

* better testing

* switch to single API

* fix lint

* fix review comments

* fix fix review

* uuuupdate

* switch on channel type, instead of using boolean
2018-09-12 11:15:32 -07:00
dfawley a344a35754
internal: remove TestingUseHandlerImpl (#2253) 2018-08-03 09:35:00 -07:00
lyuxuan 7268ca41d3
channelz: stage 4 - add security and socket option info with appengine build tags (#2149) 2018-06-25 10:32:20 -07:00
lyuxuan b28608a9db
channelz: move APIs to internal except channelz service (#2157) 2018-06-18 17:59:08 -07:00
Jean de Klerk 0e5a36b652
internal: move leakcheck to internal/ (#2129)
internal: move leakcheck to internal/
2018-06-07 16:57:56 -07:00
lyuxuan 96cefb43cf Revert " channelz: stage 4 - add security and socket option info" (#2124)
Reverts grpc/grpc-go#2098

Appengine will fail with the error below:
```
go-app-builder: Failed parsing input: parser: bad import "syscall" in google.golang.org/grpc/channelz/funcs.go from GOPATH
```

The root cause of it is in type_linux.go.
629f6bc5e5/channelz/types_linux.go (L21-L25)
2018-06-05 18:04:12 -07:00
lyuxuan c1a21e22a6
channelz: stage 4 - add security and socket option info (#2098) 2018-06-05 13:50:19 -07:00
Carl Mastrangelo 4344c204c9 Split grpclb out of top level grpc package (#2107)
This PR splits out grpclb from grpc.  I have made the PR in several commits so you can see more clearly the steps that happened.

There are a few possibly contentious points that I would like to make clear up front:

* grpclb will no longer autoload as a load balancer.  I think this is okay, as service config is not widely (at all?) used, and I believe this is the only way to access it.
* `internal` is used more, as a way of having code shared between packages without exposing types
* ConnectivityStateEvaluator, as used by grpclb, is no longer thread safe.  I believe there is an outer mutex that guards access, but I want to point out this subtle change up here.

All but one tests pass with this, due to another cyclic dependency.  I can fix this, but it is a little more widely scoped (such as exposing grpc.server and grpc.errorDesc in the internal package).   This PR is a nearly-passing sample of that last step to get this working. 

PTAL @menghanl @dfawley
2018-06-05 09:54:12 -07:00
lyuxuan a36d2ab501
fix flaky test caused by race in channelz test (#2051) 2018-05-07 17:46:58 -07:00
dfawley 247a5d4487
Fix typos (#2020) 2018-04-24 16:09:35 -07:00
lyuxuan 4166ea7dad
Stage 2: Channelz metric collection (#1909) 2018-04-23 11:22:25 -07:00
lyuxuan b1807c3189
Channelz: more stable tesing (#1983) 2018-04-10 14:27:42 -07:00
lyuxuan 7f73c863c0
Channelz: Entity Registration and Deletion (#1811) 2018-04-09 11:13:06 -07:00