11098 Commits

Author SHA1 Message Date
Anthony Romano
b694cfc69f Merge pull request #7702 from heyitsanthony/rpc-swagger
v3lock, v3election: generate and serve grpc-gateway endpoints
2017-04-10 16:48:11 -07:00
Anthony Romano
d26bdbaf81 Merge pull request #7701 from heyitsanthony/cov-strip-generated
test: remove generated files from coverage statistics
2017-04-10 16:22:15 -07:00
Anthony Romano
2030c85071 test: ignore v3electionpb and v3lockpb for static checks 2017-04-10 15:21:07 -07:00
Anthony Romano
93594006df embed: register grpc-gateway endpoints for v3lock and v3election 2017-04-10 15:21:07 -07:00
Anthony Romano
78a5eb79b5 *: add swagger and grpc-gateway assets for v3lock and v3election 2017-04-10 15:21:07 -07:00
Anthony Romano
b5dd41e625 test: remove generated files from coverage statistics
client/keys.generated.go has poor coverage but it's generated; other
generated files (e.g., pb stuff) are ignored, so this should be ignored too.
2017-04-10 14:30:15 -07:00
Xiang Li
a1a72202ff Merge pull request #7666 from calebamiles/aws-platform-guide
Adds AWS platform guide
2017-04-10 14:14:52 -07:00
caleb miles
2a074523a4
Documentation: Adds AWS platform guide
Add guide for deployed etcd on AWS discussing resource planning and cluster design
2017-04-10 13:09:33 -07:00
Anthony Romano
25acdbf41b Merge pull request #7634 from heyitsanthony/election-rpc
Election RPC service
2017-04-07 20:03:09 -07:00
Anthony Romano
55e2355326 Merge pull request #7695 from heyitsanthony/upgrade-grpc-gateway
vendor: upgrade grpc-gateway to v1.2.0
2017-04-07 19:04:00 -07:00
Anthony Romano
5f366db7d1 etcd-runner: update election command to use new Leader() interface 2017-04-07 16:36:38 -07:00
Anthony Romano
78422eaa17 embed: add Election service 2017-04-07 16:36:38 -07:00
Anthony Romano
bf047ed9d5 integration: v3 election rpc tests 2017-04-07 16:36:38 -07:00
Anthony Romano
dc8115a534 v3election: Election RPC service
Fixes #7589
2017-04-07 16:36:38 -07:00
Anthony Romano
9ba69ff317 scripts: update genproto.sh to include v3election 2017-04-07 16:36:38 -07:00
Anthony Romano
135a40751e v3rpc: force RangeEnd=nil if length is 0
gRPC will replace empty strings with nil, but for the embedded case it's
possible for []byte{} to slip in and confuse the single key / >= key
watch logic.
2017-04-07 16:36:38 -07:00
Anthony Romano
4b4f5be74a concurrency: don't skip leader updates in Observe()
The Get for the leader key will fetch based on the latest revision
instead of the deletion revision, missing leader updates between
the delete and the Get.

Although it's usually safe to skip these updates since they're
stale, it makes testing more difficult and in some cases the
full leader update history is desirable.
2017-04-07 16:36:38 -07:00
Anthony Romano
80c1b9c13a concurrency: support resuming elections if leadership already held
If a client already knows it holds leadership, let it create an
election object with its leadership information.
2017-04-07 16:36:38 -07:00
Anthony Romano
d1ae4cd5bd concurrency: only delete on election resignation if create revision matches
Addresses a case where two clients share the same lease. A client resigns but
disconnects / crashes and doesn't realize it. Another client reuses the
lease and gets leadership with a new key. The old client comes back and
tries to resign again, revoking the new leadership of the new client.
2017-04-07 16:36:37 -07:00
Anthony Romano
4b5bb7f212 concurrency: return v3.GetResponse for Election.Leader()
The full information about the leader's key is necessary to
safely use elections with transactions. Instead of returning
only the value on Leader(), return the entire GetResposne.
2017-04-07 16:36:37 -07:00
Anthony Romano
a6cab69c88 concurrency: expose leader revision and proclaim headers for election 2017-04-07 16:36:37 -07:00
Anthony Romano
2769cae6bd vendor: upgrade grpc-gateway to v1.2.0 2017-04-07 16:36:14 -07:00
Anthony Romano
c0560be98a Merge pull request #7692 from heyitsanthony/upgrade-grpc
vendor: upgrade grpc to 1.2.1
2017-04-07 16:04:50 -07:00
Anthony Romano
9ba435d902 vendor: upgrade grpc to 1.2.1 2017-04-07 14:32:00 -07:00
Anthony Romano
63bb560820 Merge pull request #7688 from heyitsanthony/short-mask
test: fix fmt pass, shorten warnings, clear SA1016
2017-04-07 12:33:57 -07:00
Anthony Romano
88d4e7ebeb netutil: fix unused err staticcheck failure
Clears SA4006
2017-04-07 10:52:54 -07:00
Anthony Romano
7e05b33aa0 *: remove os.Kill from signal.Notify
Clears SA1016 in staticcheck
2017-04-07 10:52:54 -07:00
Anthony Romano
d31701bab5 test: fix fmt pass and shorten suppression warnings
If gosimple or staticcheck had no output, it no other passes would be
applied because they were using `continue`. Similarly, the suppression
check never worked at all since it wasn't the result data into egrep.

Fixes #7685
2017-04-06 21:33:03 -07:00
Gyu-Ho Lee
25ed908c18 Merge pull request #7684 from gyuho/a
clientv3/integration: fix minor typo in Fatalf
2017-04-06 19:15:51 -07:00
Gyu-Ho Lee
369d561350 clientv3/integration: fix minor typo in Fatalf
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-06 18:26:42 -07:00
fanmin shi
7c5991c2e6 Merge pull request #7676 from fanminshi/add_dns_srv
etcdmain: support SRV discovery for gRPC proxy
2017-04-06 12:32:40 -07:00
Anthony Romano
bea4c62965 Merge pull request #7677 from heyitsanthony/fix-waitsubstream
clientv3: register waitCancelSubstreams closingc goroutine with waitgroup
2017-04-06 11:10:06 -07:00
fanmin shi
2bc1dfd921 etcdmain: support SRV discovery for gRPC proxy
FIX #7562
2017-04-06 10:45:19 -07:00
Gyu-Ho Lee
e1cf766695 Merge pull request #7674 from gyuho/debug
ctlv3: add '--debug' flag (to enable grpclog)
2017-04-05 17:39:37 -07:00
Gyu-Ho Lee
7388911e0c ctlv3: add '--debug' flag (to enable grpclog)
By default, grpclog is disabled. It should be configurable
for debugging purposes, as we did in v2.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-05 17:11:31 -07:00
Anthony Romano
aab2eda7df clientv3: register waitCancelSubstreams closingc goroutine with waitgroup
Fixes #7598
2017-04-05 16:06:53 -07:00
Gyu-Ho Lee
408de4124b Merge pull request #7675 from gyuho/tls-min-version
clientv3/yaml: use TLS 1.2 in min version
2017-04-05 12:58:16 -07:00
Gyu-Ho Lee
dee467dc24 clientv3/yaml: use TLS 1.2 in min version
To be consistent with 'pkg/transport'

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-05 11:50:35 -07:00
Anthony Romano
83577a5d08 Merge pull request #7670 from heyitsanthony/fix-lease-be-race
lease: acquire BatchTx lock in fakeDeleter
2017-04-05 11:08:15 -07:00
Anthony Romano
d42c1f5131 Merge pull request #7646 from andelf/fix-unix-socket-url
*: fix a bug in handling unix socket urls
2017-04-05 09:24:38 -07:00
Gyu-Ho Lee
43f795a485 Merge pull request #7659 from gyuho/aaa
pkg/transport: remove port in Certificate.IPAddresses
2017-04-05 04:29:44 -07:00
andelf
4f27981c46 *: fix a bug in handling unix socket urls
Now use url.Host + url.Path as unix socket path

Fixes #7644
2017-04-05 14:33:13 +08:00
Hitoshi Mitake
c7bdd7e2c5 Merge pull request #7669 from mitake/byte-affine
auth, adt: introduce a new type ByteAffineComparable
2017-04-05 15:19:08 +09:00
Hitoshi Mitake
c4a45c5713 auth, adt: introduce a new type BytesAffineComparable
It will be useful for avoiding a cost of casting from string to
[]byte. The permission checker is the first user of the type.
2017-04-05 13:17:24 +09:00
Anthony Romano
42d56d5ef7 lease: acquire BatchTx lock in fakeDeleter
Revoke expects the BatchTx lock to be held when holding the TxnDeleter
because it updates the lease bucket. The tests don't hold the lock so
it may race with the backend commit loop.

Fixes #7662
2017-04-04 20:52:23 -07:00
Gyu-Ho Lee
d51d381eca Merge pull request #7656 from gyuho/more-adapter
*: add cluster API adapter
2017-04-04 20:10:24 -07:00
Hitoshi Mitake
63355062dc Merge pull request #7649 from mitake/range-open-ended
etcdctl: add a new option --open-ended for unlimited range permission
2017-04-05 11:03:52 +09:00
Xiang Li
f7c99208b5 Merge pull request #7667 from ElijahCaine/relative-links-1
Docs: replace absolute links with relative ones.
2017-04-04 18:33:02 -07:00
Anthony Romano
c0fc389c98 Merge pull request #7661 from heyitsanthony/cov-fail-report
test: generate coverage report even if some tests fail
2017-04-04 16:46:46 -07:00
Elijah C. Voigt
31c1931b7b Docs: replace absolute links with relative ones. 2017-04-04 15:21:42 -07:00