13005 Commits

Author SHA1 Message Date
Davanum Srinivas
ad7c2cddb0 vendor: add missing files
Change-Id: I53b30e9317de6cd058833d743bc88c46686cea20
2019-04-25 15:45:49 -04:00
Davanum Srinivas
6499c14cb6 vendor: Run scripts/updatedeps.sh to cleanup unused code 2019-04-25 15:45:49 -04:00
Davanum Srinivas
6e91e3559c client: Switch to case sensitive unmarshalling to be compatible with ugorji
Using lessons learned from k8s changes:
https://github.com/kubernetes/kubernetes/pull/65034

Change-Id: Ia17a8f94ae6ed00c5af2595c2b48d3c9a0344427
2019-04-25 15:45:49 -04:00
Davanum Srinivas
7ff7e0aadd *: update bill-of-materials
Change-Id: Ibfa24e28cacd58388f7606a945c8ac35e1c34580
2019-04-25 15:45:49 -04:00
Davanum Srinivas
02ccf2013d vendor: Add json-iterator and its dependencies
Change-Id: I1f3fc00f95efadd6da9b4c248156f8460ae0ff97
2019-04-25 15:45:49 -04:00
Davanum Srinivas
20bd0c064c scripts: Remove generated code and script
Change-Id: Iac4601443bcad71920fd96b97bfe21c16116577a
2019-04-25 15:45:49 -04:00
Davanum Srinivas
69e0daf809 client: Replace ugorji/codec with json-iterator/go
We need to use the stdlib-compatible one that is case-sensitive, etc

Change-Id: Id0df573a70e09967ac7d8c0a63d99d6a49ce82f1
2019-04-25 15:45:49 -04:00
Joe Betz
5f4a45596e
Merge pull request #10656 from jpbetz/automated-cherry-pick-of-#10646-release-3.3
Automated cherry pick of #10646
2019-04-18 14:10:02 -07:00
Yingnan Zhang
38bf1bdbe0
mvcc: fix db_compaction_total_duration_milliseconds 2019-04-17 16:31:06 -07:00
Shreyas Rao
e206a8b495 wal: Add test for Verify
Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
2019-04-12 06:56:08 -04:00
shreyas-s-rao
cf4836fb2c wal: add Verify function to perform corruption check on wal contents
Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
2019-04-12 06:56:08 -04:00
Sam Batschelet
43386ac29b *: Change gRPC proxy to expose etcd server endpoint /metrics
This PR resolves an issue where the `/metrics` endpoints exposed by the proxy were not returning metrics of the etcd members servers but of the proxy itself.

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-04-11 17:07:40 -04:00
Sam Batschelet
332e995ccd travis: fix tests by using proper code path
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-04-11 16:19:36 -04:00
Gyuho Lee
ad5e169dcf
Merge pull request #10597 from purpleidea/3.3/fatal-corruption
etcdserver: Use panic instead of fatal on no space left error
2019-03-29 14:54:46 -07:00
James Shubin
7814718c73 etcdserver: Use panic instead of fatal on no space left error
When using the embed package to embed etcd, sometimes the storage prefix
being used might be full. In this case, this code path triggers, causing
an: `etcdserver: create wal error: no space left on device` error, which
causes a fatal. A fatal differs from a panic in that it also calls
os.Exit(1). In this situation, the calling program that embeds the etcd
server will be abruptly killed, which prevents it from cleaning up
safely, and giving a proper error message. Depending on what the calling
program is, this can cause corruption and data loss.

This patch switches the fatal to a panic. Ideally this would be a
regular error which would get propagated upwards to the StartEtcd
command, but in the meantime at least this can be caught with recover().

This fixes the most common fatal that I've experienced, but there are
surely more that need looking into. If possible, the errors should be
threaded down into the code path so that embedding etcd can be more
robust.

Fixes: https://github.com/etcd-io/etcd/issues/10588

This is a cherry-picked version of upstream: 368f70a37cf25b432f01921d3f05a3bc0357297a
2019-03-29 17:45:48 -04:00
Gyuho Lee
c6964428ff travis.yml: update Go 1.10.8
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-07 10:45:15 -08:00
Gyuho Lee
d57e8b8d97 version: 3.3.12
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.3.12
2019-02-07 10:41:58 -08:00
Iskander Sharipov
e634184dc6 etcdctl: fix strings.HasPrefix args order
Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-07 10:41:44 -08:00
Gyuho Lee
410a879601 version: 3.3.11+git
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-07 10:41:33 -08:00
Gyuho Lee
2cf9e51d2a version: 3.3.11
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.3.11
2019-01-11 11:12:25 -08:00
Sam Batschelet
15903736d5 auth: fix cherry-pick
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-01-09 13:10:32 -05:00
Sam Batschelet
c7f744d6d3 auth: disable CommonName auth for gRPC-gateway
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-01-08 21:01:25 +00:00
Gyuho Lee
e6b2f00047
Merge pull request #10335 from gyuho/release-3.3-patch
[Cherry pick 3.3] grpcproxy: fix memory leak
2018-12-17 20:37:04 -08:00
Igor German
59cc0f9ac5 grpcproxy: fix memory leak
use set instead of slice as interval value

fixes #10326
2018-12-17 19:00:57 -08:00
Gyuho Lee
3a7b8b31fd travis: use Go 1.10.7
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-12-17 19:00:22 -08:00
Gyuho Lee
6f250f9a47 version: 3.3.10+git
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-10 13:30:14 -07:00
Gyuho Lee
27fc7e2296 version: 3.3.10
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.3.10
2018-10-10 10:17:54 -07:00
Gyuho Lee
eb932c2083 travis.yml: use Go 1.10.4
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-10 10:17:36 -07:00
Gyuho Lee
957700f444 etcdserver: add "etcd_server_read_indexes_failed_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-09 18:22:02 -07:00
Gyuho Lee
b45f5306dc rafthttp: probe all raft transports
This PR adds another probing routine to monitor the connection
for Raft message transports. Previously, we only monitored
snapshot transports.

In our production cluster, we found one TCP connection had >8-sec
latencies to a remote peer, but "etcd_network_peer_round_trip_time_seconds"
metrics shows <1-sec latency distribution, which means etcd server
was not sampling enough while such latency spikes happen
outside of snapshot pipeline connection.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-09 18:18:27 -07:00
Gyuho Lee
8491137b55 etcdserver: add "etcd_server_health_success/failures"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-09 17:54:30 -07:00
Jingyi Hu
ebe950fc1c
Merge pull request #10161 from jingyih/automated-cherry-pick-of-#10153-origin-release-3.3
clientv3: automated cherry pick of #10153 to release-3.3
2018-10-08 18:37:52 -07:00
yura
20d83e405f clientv3: concurrency.Mutex.Lock() - preserve invariant
Convenient invariant:
- if werr == nil then lock is supposed to be locked at the moment.

While we could not be confident in stronger invariant ('is exactly locked'),
it were inconvenient that previous code could return `werr == nil` after
Mutex.Unlock.

It could happen when ctx is canceled/timeouted exactly after waitDeletes
successfully returned werr == nil and before `<-ctx.Done()` checked.
While such situation is very rare, it is still possible.

fixes #10111
2018-10-08 16:42:26 -07:00
Wenjia
cb57901e03
Merge pull request #10041 from wenjiaswe/automated-cherry-pick-of-#9997-upstream-release-3.3
Automated cherry pick of #9997
2018-10-03 13:52:02 -07:00
Gyuho Lee
d838e24f80 etcdserver/api/rafthttp: add v3 snapshot send/receive metrics
Distribution would be:
0.1 second or more
...
25.6 seconds or more
51.2 seconds or more

etcd_network_snapshot_send_success
etcd_network_snapshot_send_failures
etcd_network_snapshot_send_total_duration_seconds
etcd_network_snapshot_receive_success
etcd_network_snapshot_receive_failures
etcd_network_snapshot_receive_total_duration_seconds

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-03 11:12:42 -07:00
Gyuho Lee
7ec9ff62b5 etcdserver/api/snap: add v3 snapshot fsync metrics
etcd_snap_db_fsync_duration_seconds_count
etcd_snap_db_save_total_duration_seconds_bucket

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-03 11:12:41 -07:00
Gyuho Lee
dc02dc2ede tests/Dockerfile: update, fix GOPATH
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-10-01 01:30:23 -07:00
Gyuho Lee
40ed18a457
Merge pull request #10122 from jingyih/cherry-pick-of-#10109-origin-release-3.3
etcdctl: cherry pick of #10109 to release-3.3
2018-09-25 17:30:01 -07:00
Jingyi Hu
60d546e309 etcdctl: cherry pick of #10109 to release-3.3
Add snapshot file integrity verification in snapshot status.
2018-09-25 16:50:47 -07:00
Gyuho Lee
e774f7309c
Merge pull request #10093 from jingyih/remove_duplicated_import
etcdserver: remove duplicated imports
2018-09-13 20:57:09 -07:00
Jingyi Hu
9eee0b078e etcdserver: remove duplicated imports
Removed duplicated imports of package 'context' in server.go
2018-09-13 20:44:03 -07:00
Gyuho Lee
d1acb5a5c8 etcdserver: add "etcd_server_id"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-29 14:50:17 -07:00
Gyuho Lee
73c1100b04 etcdserver: clarify read index wait timeout warnings
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-29 14:38:59 -07:00
Gyuho Lee
c577335a64 rafthttp: clarify "became inactive" warning
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-29 14:34:15 -07:00
Gyuho Lee
f69413e9ee
Merge pull request #10027 from hexfusion/cherry-pick-a205cfe
etcdserver: cherry-pick #9861 to release-3.3
2018-08-20 12:54:43 -07:00
Gyuho Lee
0dc4632e28 Merge pull request #9861 from gyuho/race
etcdserver/api/v3rpc: remove duplicate gRPC logger set
2018-08-17 22:32:10 -04:00
Gyuho Lee
f8fc923fc0
Merge pull request #10004 from jingyih/automated-cherry-pick-of-#9990-origin-release-3.3
Automated cherry pick of #9990
2018-08-15 06:37:33 -07:00
Jingyi Hu
264bb51a9a etcdserver: code clean up
Code clean up in interceptor.go
2018-08-14 17:08:45 -07:00
Jingyi Hu
c6c0d03522 vendor: add go-grpc-middleware
Rebased to master PR #9994.  Fixed a Go format issue in
v3rpc/interceptor.go.  Updated vendor to include go-grpc-middleware.
2018-08-14 17:08:45 -07:00
Jingyi Hu
94f81368ae etcdserver: add grpc interceptor to log info on incoming requests to etcd server
To improve debuggability of etcd v3. Added a grpc interceptor to log
info on incoming requests to etcd server. The log output includes
remote client info, request content (with value field redacted), request
handling latency, response size, etc. Uses zap logger if available,
otherwise uses capnslog.

Also did some clean up on the chaining of grpc interceptors on server
side.
2018-08-14 16:20:13 -07:00