Commit Graph

14377 Commits (a6ddb51c8a3a470368069319fcdba8f10a1a4ced)

Author SHA1 Message Date
Gyuho Lee 3f9cce7797 CHANGELOG-3.4: highlight ETCDCTL_API=3 change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:32:51 -07:00
Gyuho Lee 356c4f17ca CHANGELOG: add "--password" flag
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:25:42 -07:00
Gyuho Lee dbb37f98fd
Merge pull request #9730 from mitake/user-w-colon
etcdctl: add --password flag to the subcommand user add
2018-05-29 11:14:46 -07:00
Gyuho Lee eeb8bcc753 Documentation/upgrades: remove "./bin"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:06:31 -07:00
Gyuho Lee b11a6aa381 Documentation/upgrades: highlight ETCDCTL_API change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:05:24 -07:00
Gyuho Lee b7d556bde5 CHANGELOG: highlight ETCDCTL_API change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-29 11:01:34 -07:00
Gyuho Lee fb43f46c0a
Merge pull request #9640 from grapeshot/monitoring-mixin
Prometheus Monitoring Mixin for etcd.
2018-05-29 09:54:35 -07:00
Tom Wilkie 13d4e1509b Documentation: add Prometheus monitoring-mixin
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-05-29 09:52:40 -07:00
Gyuho Lee 0c858dc248
Merge pull request #9784 from vimalk78/9600_ETCDCTL_API_3_default
etcdctl/ctlv3: etcd v3.4 makes ETCDCTL_API=3 by default
2018-05-29 09:38:58 -07:00
Vimal K 25bc65794f etcdctl/ctlv3: etcd v3.4 makes ETCDCTL_API=3 by default 2018-05-29 06:27:20 +05:30
Xiang Li ce918cef63
Merge pull request #9780 from vimalk78/9583_ETCDCTL_ENDPOINT_confused_trim_space
etcdctl/ctlv3 : fixes 9583. trim spaces in ETCDCTL_ENDPOINTS env variable
2018-05-27 09:38:38 -07:00
Xiang Li 357308bfcd
Merge pull request #9679 from lorneli/lorneli-raft-dev
raft: describe the purpose of lockedRand
2018-05-26 22:03:18 -07:00
lorneli a083282482 raft: describe the purpose of lockedRand
Struct lockedRand wraps rand.Rand with mutex lock because it's
accessed by multiple raft groups.
2018-05-26 21:59:24 +08:00
Vimal K 807dfcea78 etcdctl: fixes 9583. trim spaces in ETCDCTL_ENDPOINTS 2018-05-26 04:58:06 +05:30
Gyuho Lee ba10640d0b
Merge pull request #9778 from idiamond-stripe/idiamond-add-leases-metric
leases: Add metrics to etcd leases
2018-05-25 14:04:02 -07:00
Isaac Diamond 0369298b21
leases: Add metrics to etcd leases
This patch adds four metrics to the `leases` package for easier
debugging.
2018-05-25 12:57:28 -07:00
Gyuho Lee 0398ec7dcb mvcc: fix panic by allowing future revision watcher from restore operation
This also happens without gRPC proxy.

Fix panic when gRPC proxy leader watcher is restored:

```
go test -v -tags cluster_proxy -cpu 4 -race -run TestV3WatchRestoreSnapshotUnsync

=== RUN   TestV3WatchRestoreSnapshotUnsync
panic: watcher minimum revision 9223372036854775805 should not exceed current revision 16

goroutine 156 [running]:
github.com/coreos/etcd/mvcc.(*watcherGroup).chooseAll(0xc4202b8720, 0x10, 0xffffffffffffffff, 0x1)
	/home/gyuho/go/src/github.com/coreos/etcd/mvcc/watcher_group.go:242 +0x3b5
github.com/coreos/etcd/mvcc.(*watcherGroup).choose(0xc4202b8720, 0x200, 0x10, 0xffffffffffffffff, 0xc420253378, 0xc420253378)
	/home/gyuho/go/src/github.com/coreos/etcd/mvcc/watcher_group.go:225 +0x289
github.com/coreos/etcd/mvcc.(*watchableStore).syncWatchers(0xc4202b86e0, 0x0)
	/home/gyuho/go/src/github.com/coreos/etcd/mvcc/watchable_store.go:340 +0x237
github.com/coreos/etcd/mvcc.(*watchableStore).syncWatchersLoop(0xc4202b86e0)
	/home/gyuho/go/src/github.com/coreos/etcd/mvcc/watchable_store.go:214 +0x280
created by github.com/coreos/etcd/mvcc.newWatchableStore
	/home/gyuho/go/src/github.com/coreos/etcd/mvcc/watchable_store.go:90 +0x477
exit status 2
FAIL	github.com/coreos/etcd/integration	2.551s
```

gRPC proxy spawns a watcher with a key "proxy-namespace__lostleader"
and watch revision "int64(math.MaxInt64 - 2)" to detect leader loss.
But, when the partitioned node restores, this watcher triggers
panic with "watcher minimum revision ... should not exceed current ...".

This check was added a long time ago, by my PR, when there was no gRPC proxy:

https://github.com/coreos/etcd/pull/4043#discussion_r48457145

> we can remove this checking actually. it is impossible for a unsynced watching to have a future rev. or we should just panic here.

However, now it's possible that a unsynced watcher has a future
revision, when it was moved from a synced watcher group through
restore operation.

This PR adds "restore" flag to indicate that a watcher was moved
from the synced watcher group with restore operation. Otherwise,
the watcher with future revision in an unsynced watcher group
would still panic.

Example logs with future revision watcher from restore operation:

```
{"level":"info","ts":1527196358.9057755,"caller":"mvcc/watcher_group.go:261","msg":"choosing future revision watcher from restore operation","watch-key":"proxy-namespace__lostleader","watch-revision":9223372036854775805,"current-revision":16}
{"level":"info","ts":1527196358.910349,"caller":"mvcc/watcher_group.go:261","msg":"choosing future revision watcher from restore operation","watch-key":"proxy-namespace__lostleader","watch-revision":9223372036854775805,"current-revision":16}
```

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-25 12:40:02 -07:00
Gyuho Lee 86d1d3e8dc integration: enable TestV3WatchRestoreSnapshotUnsync for gRPC proxy
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-25 12:30:42 -07:00
Gyuho Lee 476c9cbeed CHANGELOG: clarify watch fix, add lease metrics changes
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-25 12:30:05 -07:00
Gyuho Lee 0ad6e5269e CHANGELOG: patch release with watch fix
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-25 11:45:45 -07:00
Gyuho Lee 1ebaeed5c1 embed: fix typo
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-25 11:15:47 -07:00
Gyuho Lee f5e52c995c
Merge pull request #9773 from gyuho/auth-test
integration: test lease revoke routine with JWT token
2018-05-24 12:16:09 -07:00
Gyuho Lee a52f16d4a6 integration: test lease revoke routine with JWT token
https://github.com/coreos/etcd/pull/9698 wasn't really testing
the panic code path when leases are expiry.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-24 11:38:31 -07:00
Xiang Li 20cf7f4d5b
Merge pull request #9671 from lorneli/raft-test
raft: merge test cases of pre-candidate with the normal one
2018-05-24 08:27:07 -07:00
Gyuho Lee b4f84f046b
Merge pull request #9765 from gyuho/watch-restore
mvcc: watcherGroup chooseAll panic (skip proxy tests for now)
2018-05-23 16:53:50 -07:00
Gyuho Lee a16576c763 CHANGELOG: update dates, upcoming patch releases
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 16:00:02 -07:00
Gyuho Lee 210c842345 mvcc: improve watcherGroup panic message
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 15:38:40 -07:00
Gyuho Lee 9cac286830 integration: move "TestV3WatchRestoreSnapshotUnsync"
When run with "-tags cluster_proxy", panic.
Need investigate more.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 15:35:59 -07:00
Gyuho Lee 83fd1c3faa
Merge pull request #9762 from gyuho/rrr
*: document all histogram metrics, add etcd_snap_fsync_duration_seconds
2018-05-23 14:42:39 -07:00
Gyuho Lee 5f2c195ee7 CHANGELOG-3.4: add "etcd_network_active_peers" and disconnected_peers_total
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:32:19 -07:00
Gyuho Lee 3821f3364d etcdserver/api/rafthttp: add "etcd_network_active_peers/disconnected_peers_total"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:23:45 -07:00
Gyuho Lee 1a102fb3f5 proxy/httpproxy: document histogram
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee b0b966c43c wal: document, clean up fsync histogram
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee 1d91698268 mvcc: document, clean up histogram variables
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee e6a113cdcd mvcc/backend: clean up histogram variables
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee afe78fbe69 etcdserver/api/v2http: document histogram
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee 973fe43b83 etcdserver/api/snap: document histograms, add "etcd_snap_fsync_duration_seconds"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee 640f5e64a9 etcdserver/api/rafthttp: document round-trip metrics, clean up
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee 5a9e48be30 etcdserver/api/rafthttp: increase bucket upperbound up-to 3-sec
From 0.8 sec to 3.2 sec for more detailed latency analysis

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:03:28 -07:00
Gyuho Lee 2b01460b4d CHANGELOG-3.4: highlight new metrics, histogram upper bound changes
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 14:00:48 -07:00
Gyuho Lee c444c1f327
Merge pull request #9761 from gyuho/mmm
etcdserver,mvcc: add more storage layer metrics
2018-05-23 13:11:29 -07:00
Gyuho Lee a1aade8c1b etcdserver: rename to "heartbeat_send_failures_total"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:11:08 -07:00
Gyuho Lee bc59f7b42f mvcc: add "etcd_mvcc_hash_(rev)_duration_seconds"
etcd_mvcc_hash_duration_seconds
etcd_mvcc_hash_rev_duration_seconds

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee 966ee9323c mvcc/backend: fix defrag duration scale
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee d326b2933c mvcc/backend: add "etcd_disk_backend_defrag_duration_seconds"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee 60a9ec8a15 mvcc/backend: document metrics ExponentialBuckets
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee 58e3ead219 mvcc/backend: clean up mutex, logging
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee dd1baf6e96 etcdserver: add "etcd_server_slow_apply_total"
{"level":"warn","ts":1527101858.6985068,"caller":"etcdserver/util.go:115","msg":"apply request took too long","took":0.114101529,"expected-duration":0.1,"prefix":"","request":"header:<ID:1029181977902852337> put:<key:\"\\000\\000...

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee 896a5e4a2b etcdserver: add "etcd_server_heartbeat_failures_total"
{"level":"warn","ts":1527101858.4149103,"caller":"etcdserver/raft.go:370","msg":"failed to send out heartbeat; took too long, server is overloaded likely from slow disk","heartbeat-interval":0.1,"expected-duration":0.2,"exceeded-duration":0.025771662}
{"level":"warn","ts":1527101858.4149644,"caller":"etcdserver/raft.go:370","msg":"failed to send out heartbeat; took too long, server is overloaded likely from slow disk","heartbeat-interval":0.1,"expected-duration":0.2,"exceeded-duration":0.034015766}

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:09:42 -07:00
Gyuho Lee 1c18f8dfb9 CHANGELOG-3.4: highlight new server, mvcc metrics
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-23 13:04:45 -07:00