Граф коммитов

2582 Коммитов

Автор SHA1 Сообщение Дата
dfawley 2106e3b393
credentials: cleanup version-specific files (#2178) 2018-06-27 15:49:04 -07:00
lyuxuan 5ea5eec711
Restrict channelz service test to x86 architecture (#2179) 2018-06-27 11:58:54 -07:00
mmukhi 3ec535a269
client, server: update dial/server buffer options to support a "disable" setting (#2147) 2018-06-27 11:16:33 -07:00
lyuxuan f1ab7acf3f
credentials: add more appengine build tags (#2177) 2018-06-26 14:01:50 -07:00
Menghan Li b39aa9e037
Revert stickiness (#2175)
Stickiness will be reimplemented as part of a balancer/resolver redesigning/extending.
2018-06-26 10:02:54 -07:00
lyuxuan 4f70de23e6
minor fix: remove redundant channelz files (#2176) 2018-06-25 18:23:40 -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
mmukhi 8e18752766
Update flow control test to have multiple concurrent streams. (#2170) 2018-06-22 16:02:44 -07:00
Carl Mastrangelo 92d38b03b1 balancer/grpclb: update to latest lb proto (#2172) 2018-06-22 15:31:54 -07:00
dfawley 0c16dc1c74
resolver/dns: error if target ends with a colon instead of assuming the default port (#2150)
Technically this is a behavior change, but any usage of "host:" or ":" should be considered invalid, since dialing a target with a trailing ":" attempts to dial port zero, which is never valid (and we always used to pass the target directly to `net.Dial`).

In https://github.com/grpc/grpc/pull/15618, the target format will be defined as: `host[:port]` -- not: `host[:[port]]`.  (This is potentially subject to change.)
2018-06-22 15:23:03 -07:00
Carl Mastrangelo ba63e52faf grpclb: remove old grpclb generated code (#2143) 2018-06-21 13:10:52 -07:00
lyuxuan cd69bb2707
testing: run test in simulated appengine environment (#2145) 2018-06-21 13:09:46 -07:00
apolcyn b519e3d28d interop: set dns as default scheme in interop client (#2165)
this is to allow use of grpclb-in-DNS in the interop client
2018-06-20 12:19:01 -07:00
Menghan Li 2ab07fd5cb
Change version to 1.14.0-dev (#2163) 2018-06-19 17:32:50 -07:00
Krzysztof Dryś 536e74e045 Don't log grpclb server ending connection as error (#2162)
Fixes https://github.com/grpc/grpc-go/issues/2161

I introduced `serverTerminatedConnectionErr `, because I wanted `callRemoteBalancer` to still returns error on a terminated connections. Its client, which is function `watchRemoteBalancer` can decide how to log this error.

When remote grpclb-server terminates the connection, don't log it as
error. Instead, log it as info.

It is natural for servers to terminate long lived grpc streaming
connections. Two sample reasons to do this are: load balancing and
deployment of a new version. Therefore client of grpclb-server shouldn't
recognise this situation as an error.
2018-06-19 14:54:40 -07:00
lyuxuan b28608a9db
channelz: move APIs to internal except channelz service (#2157) 2018-06-18 17:59:08 -07:00
dfawley 3b3ed4f509
transport: notify controlbuf that transport is gracefully closing to ensure proper cleanup (#2158) 2018-06-18 15:39:16 -07:00
mmukhi fd9db51e64
Register incoming stream with loopy as soon as it gets created. (#2144) 2018-06-18 10:52:49 -07:00
apolcyn 7e6dc36bea Import grpclb package in the interop client (#2155)
This can allow the interop client to start running in scenarios in which the target is grpclb balanced.
2018-06-15 15:00:04 -07:00
lyuxuan d2f8e5a29d
fix: do not percent encode character tilde (#2139) 2018-06-14 16:03:11 -07:00
Menghan Li 692f13ae39
grpclb: backoff for RPC call if init handshake was unsucessful (#2077) 2018-06-14 14:31:41 -07:00
Menghan Li e218c924aa
status: handle invalid utf-8 characters (#2109) (#2134)
fixes #2078

A status with invalid utf-8 characters could still be created, but invalid characters will be replaced with [Unicode replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) before being sent out. Those bytes will still be percent encoded.

All details added to this invalid status will be dropped.
2018-06-14 13:53:31 -07:00
mmukhi e074afe740
Don't do extra work for keepalive when it's disabled. (#2148) 2018-06-14 13:36:28 -07:00
Menghan Li 24f3cca1ff
internal: move backoff to internal (#2141)
So other components such as grpclb can reuse the backoff implementation.
2018-06-13 16:07:37 -07:00
mmukhi 107f19369e
Fix flaky tests in transport. (#2120)
* Fix flaky tests in transport.

* Post-review update
2018-06-12 17:52:44 -07:00
dfawley fb845db15c
internal: Change Lock to RLock since no mutation is performed (#2142) 2018-06-12 12:50:43 -07:00
Menghan Li aa30531d2b
grpclb: remove redundent testing struct (#2126)
Remove `rpcStatsForTest` and reuse `rpcStats` in tests.

Also fix races: https://travis-ci.org/grpc/grpc-go/jobs/388477002
2018-06-12 11:29:05 -07:00
Carl Mastrangelo dc86fffc26
Normalize gRPC LB 2018-06-11 17:52:20 -07:00
mmukhi 6d55ae1afe
Fix test: Account for the fact that Dial can return successfully before Accept. (#2123) 2018-06-11 14:33:42 -07:00
apolcyn 10a4999db0
Add some debug info (#2136) 2018-06-11 10:38:41 -07:00
dfawley 49c8c81756
Documentation: create doc describing grpc-go's log levels and their usages (#2033) 2018-06-11 09:31:41 -07:00
Menghan Li 39a411827d
internal: Update proto generated code (#2133) 2018-06-08 17:54:26 -07:00
Gyuho Lee 6f35246b2a resolver_conn_wrapper.go: fix minor typo (#2135) 2018-06-08 15:37:41 -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
Menghan Li 26ac8d285c
Revert "status: handle invalid utf-8 characters" (#2127)
Reverts grpc/grpc-go#2109

Test failure:
https://travis-ci.org/grpc/grpc-go/builds/388898555

Possible reason: `proto.Marshal` doesn't always return error even if message contains invalid utf8 char.
2018-06-06 17:58:36 -07:00
Menghan Li 9c658603f0
status: handle invalid utf-8 characters (#2109)
fixes #2078

A status with invalid utf-8 characters could still be created, but invalid characters will be replaced with [Unicode replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) before being sent out. Those bytes will still be percent encoded.

All details added to this invalid status will be dropped.
2018-06-06 10:58:32 -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
Menghan Li 629f6bc5e5
grpclb: minor fixes on comments and tests (#2122)
* modify noimport.go panic message
* package level comments
* remove useless error check at grpclb_test.go:343
2018-06-05 13:52:07 -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
mmukhi 35085cc92d
Reduce error logs in transport. (#2117) 2018-06-04 15:25:35 -07:00
Jacob Hoffman-Andrews 2c5843ebfd DNS resolver: Throw an error for non-default DNS authority. (#2067) 2018-06-04 10:43:01 -07:00
Menghan Li 70e9c28461
grpclb: sync messages.proto and update client load reporting (#2101) 2018-06-04 10:02:09 -07:00
Menghan Li 130c87fa0d
alts: copy handshake address in Clone() (#2119) 2018-06-01 15:33:31 -07:00
Fabian Holler b94ea975f3 codes: fix: marshal/unmarshal a Code to JSON fails (#2116)
Marshalling a Code to JSON and unmarshalling it failed with an
"invalid code" error message.

Code is of type uint32. It has no custom MarshalJson() implemented
therefore it is marshalled into an JSON integer value.
The UnmarshalJSON() function expected that the marshalled Code is a
String type, unmarshalling failed.

Check in UnmarshalJSON() if the value is an uint32 in the range of the
defined Code values. If it is, unmarshal it.

This commit also adds an Marshal/Unmarshal testcase.
2018-06-01 10:56:55 -07:00
mmukhi 590da37e2d
Account for user configured small io write buffer. (#2092) 2018-05-29 14:11:52 -07:00
Jean de Klerk bfe419798a
clarify CloseSend vs CloseAndRecv; better formatting (#2071)
clarify CloseSend vs CloseAndRecv; better formatting
2018-05-29 11:35:11 -07:00
dfawley bd7f82c7b1
internal/grpcrand: New package for concurrency-safe randoms (#2106) 2018-05-29 09:06:35 -07:00
Günther Noack 1fa3750c9a Clarify newCCResolverWrapper documentation. (#2100)
I think the goroutine does not get started any more (this used to be the case in an earlier version).
2018-05-24 10:21:01 -07:00
Menghan Li d33a923190
Revert "channelz: stage 4 - add security and socket option info" (#2096)
This reverts commit 7cc2837209.

The PR breaks darwin builds

src/google.golang.org/grpc/channelz/types_unix.go:35:15: undefined: unix.TCPInfo
2018-05-22 15:31:57 -07:00