Hitoshi Mitake
6c91766490
*: move "auth" to "internal/auth"
2018-01-29 14:57:35 +09:00
Gyuho Lee
2c91007591
*: regenerate proto
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:21:40 -08:00
Gyuho Lee
80d15948bc
*: move "mvcc" to "internal/mvcc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:14:41 -08:00
Gyuho Lee
349a377a67
*: move "lease" to "internal/lease"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:09:29 -08:00
Gyuho Lee
880835c02c
*: move "store" to "internal/store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:06:22 -08:00
Gyuho Lee
0365a9dee8
etcdserver: clarify warnings on backend open taking >10 seconds
...
If db file is 10 GiB, it can take more than 1-second.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 10:19:21 -08:00
Gyuho Lee
432581c7d0
*: move "discovery" to "internal/discovery"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 15:41:17 -08:00
Gyuho Lee
46b9844ca5
*: move "alarm,compactor" to "internal/*"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 15:26:21 -08:00
Gyuho Lee
ce45c83f29
etcdserver: add detailed errors in "ValidateClusterAndAssignIDs"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 11:22:10 -08:00
Gyuho Lee
2b10bcccee
etcdserver: add error details on DNS resolution failure on advertise URLs
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-25 10:35:36 -08:00
dvonthenen
db822ed38f
*: add alarm/health information in endpoint status
...
Update to remove raftIndex and document the Alarms() interface
Fix formatting
Fix typo
2018-01-24 13:12:48 -08:00
Gyuho Lee
dee39bf786
internal/raftsnap: move "raftsnap" to internal
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:36:04 -08:00
Gyuho Lee
6a70a931d3
etcdserver: rename "snap" to "raftsnap" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:26:07 -08:00
dvonthenen
25cdf4ed92
*: expose Raft Applied Index through to "etcdctl endpoint status"
...
Fixed based on feedback
Fixed spacing
Fix gofmt
2018-01-22 07:37:21 -08:00
Gyuho Lee
d0eff45256
etcdserver/api/v3rpc: debug-log client disconnect on TLS, http/2 stream CANCEL
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-19 12:26:56 -08:00
Gyuho Lee
1b4502114f
etcdserver/api/etcdhttp: remove "errors" field in /health
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-17 15:18:32 -08:00
Jordan Liggitt
f77e54eb13
api/etcdhttp: change /health type back to string for backwards compatibility
2018-01-15 01:57:55 -05:00
Sahdev P. Zala
3b7e2ce0ca
StatusFromError: handle return value of the function
...
status.FromError can return nil, false. We are handling the return values
most places in code but some places we aren't. Fixing it herewith.
Fixes #9117
2018-01-08 22:28:20 -05:00
Xiang Li
44e1f6f019
Merge pull request #9105 from spzala/getrevision
...
etcdserver/api/v3rpc: debug user cancellation and log warning for rest
2018-01-08 10:07:57 -08:00
Sahdev P. Zala
a66d7c3ba5
etcdserver/api/v3rpc: debug user cancellation and log warning for rest
...
The context error with cancel code is typically for user cancellation which
should be at debug level. For other error codes we should display a warning.
Fixes #9085
2018-01-08 11:03:13 -05:00
Gyuho Lee
65464838ba
Merge pull request #9065 from gyuho/watch-id-2
...
*: allow user-provided watch ID to mvcc
2018-01-05 15:08:10 -08:00
Gyuho Lee
5b2f5150d9
etcdserver/api/v3rpc: set grpclog once
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-02 10:12:49 -08:00
Gyuho Lee
9e11ef3ad5
etcdserver,embed: discard gRPC info logs when debug is off
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-02 09:29:07 -08:00
Gyuho Lee
9a50255515
etcdserver/api/v3rpc: log stream error with debug level
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-02 07:44:07 -08:00
Gyuho Lee
33c732b97c
api/v3rpc: add watch ID to "watchStream.Watch"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-31 13:20:41 -08:00
Gyuho Lee
652841c411
*: regenerate proto
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-31 13:20:40 -08:00
Gyuho Lee
9bbfa23183
etcdserverpb: add "watch_id" to "WatchCreateRequest"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-31 13:20:40 -08:00
Gyuho Lee
b3ec44ca99
etcdserver/api: add 3.3.0 as compatible server capability
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 13:34:12 -08:00
Sam Batschelet
eb65f26182
Documentation/dev-guide: Update TimeToLive documentation.
2017-12-20 15:39:37 -05:00
Gyuho Lee
497412c588
clientv3: call other APIs with default gRPC call options
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee
f87760998b
clientv3: call KV/Txn APIs with default gRPC call options
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee
85af65eca9
etcdserver: log lease revoke error
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-14 21:45:20 -08:00
Gyuho Lee
bcd5390b35
*: regenerate protobuf, grpc-gateway
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-07 21:31:13 -08:00
Joe Betz
4cacbf19dd
metrics: Add server_version metric
2017-12-01 15:25:46 -08:00
Gyu-Ho Lee
6bd41f36ff
api/v3rpc: log grpc stream send/recv errors in server-side
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-29 17:34:05 -08:00
Gyu-Ho Lee
e0dfc4368f
etcdserver: CheckInitialHashKV when "InitialCorruptCheck==true"
...
etcdserver: only compare hash values if any
It's possible that peer has higher revision than local node.
In such case, hashes will still be different on requested
revision, but peer's header revision is greater.
etcdserver: count mismatch only when compact revisions are same
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-22 21:20:14 -08:00
Gyu-Ho Lee
3db5ad8d57
embed,etcdmain: add "--experimental-initial-corrupt-check"
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-22 15:27:14 -08:00
Hitoshi Mitake
f649132a5a
auth, etcdserver: follow the correct usage of context
...
The keys of context shouldn't be string. They should be a struct of
their own type.
Fix https://github.com/coreos/etcd/issues/8826
2017-11-21 15:31:19 +09:00
Gyu-Ho Lee
08434d0665
etcdserver/corrupt: document data corrupt checking in checkHashKV
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-20 15:04:50 -08:00
Gyu-Ho Lee
1ce3a41e69
etcdserver/corrupt: add "getPeerHashKVs" method
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-20 15:04:45 -08:00
Gyu-Ho Lee
f6f0fb12e0
etcdserver/corrupt: set dial timeout for peer clientv3
...
Preliminary commit for initial hash checking.
Dial timeout when other nodes have not been booted.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-20 15:02:57 -08:00
Gyu-Ho Lee
cbe8c7eda7
Merge pull request #8880 from gyuho/v3beta-endpoint
...
*: replace grpc-gateway endpoint with /v3beta
2017-11-16 09:42:19 -08:00
Frederic Branczyk
627cffd6f8
*: initialize gRPC server metrics with zero values
2017-11-15 11:21:29 +01:00
Gyu-Ho Lee
ab526e8814
*: regenerate proto, swagger specs
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-15 01:22:09 -08:00
Gyu-Ho Lee
ce6bb4f1c9
etcdserver: replace /v3alpha with /v3beta in proto definitions
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-15 01:19:53 -08:00
Gyu-Ho Lee
75110dd839
*: fix naked returns
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-10 18:46:15 -08:00
tylerauerbeck
527d03e0d2
etcdserver: update metrics to use promhttp
...
Update api/etcdhttp/metrics.go to use promhttp.Handler() instead of prometheus.Handler()
fixes #8729
2017-11-10 09:47:49 -08:00
tamal
c0c19465fc
*: upgrade grpc-gateway to v1.3
2017-11-08 18:38:41 -08:00
Gyu-Ho Lee
f48fe8ecda
api/v3rpc: do not convert server context error to grpc/*status.statusError
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-06 17:32:23 -08:00
Gyu-Ho Lee
ba233e2f4d
etcdserver: preallocate slice in apply
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-06 09:13:12 -08:00
Gyu-Ho Lee
5d98710b2e
api/v3rpc: deprecate grpc.Errorf
...
It's been deprecated as of grpc/grpc-go v1.6.x.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-04 22:08:17 -07:00
Gyu-Ho Lee
2feb8ba545
v3rpc/rpctypes: use codes.FailedPrecondition for ErrGRPCNotLeader
...
Changes ErrGRPCNotLeader error code to FailedPrecondition,
to disable retry with unavailable.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-20 14:28:17 -07:00
Gyu-Ho Lee
1109c6c321
etcdserver/api/etcdhttp: document package in doc.go
...
It was missing from godoc.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-06 10:47:47 -07:00
Gyu-Ho Lee
0199bdc266
*: fix 'ineffassign' issues
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-03 10:14:33 -07:00
fanmin shi
bcef78c665
Merge pull request #8563 from fanminshi/make_auto_compaction_granular
...
*: support auto-compaction with finer granularity
2017-09-29 11:18:51 -07:00
fanmin shi
733de98cfb
*: modify etcd flags to support finner compaction retention
2017-09-28 17:22:44 -07:00
Gyu-Ho Lee
32e15d790f
api/rpc: accept grpc.ServerOption's for keepalive policy
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 10:55:00 -07:00
Xiang Li
554298d429
Merge pull request #8594 from mitake/auth-priority
...
RFC: etcdserver: swap priority of cert CN and username + password
2017-09-26 08:41:30 -07:00
Xiang
35e285674b
etcdserver: make tick duration calculation clear
2017-09-23 15:43:12 -07:00
Xiang
230323255a
etcdserver: make dial timeout longer
2017-09-22 14:56:41 -07:00
Hitoshi Mitake
1296281b27
etcdserver: swap priority of cert CN and username + password
2017-09-22 15:53:47 +09:00
Gyu-Ho Lee
9553afbb24
Merge pull request #8533 from gyuho/grpc
...
*: upgrade grpclog to LoggerV2
2017-09-12 03:53:04 -07:00
Gyu-Ho Lee
18ba4d60ec
v3rpc/rpctypes: use grpc.status for errors
...
grpc.Code, grpc.ErrorDesc, grpc.Errorf have been deprecated.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 09:20:03 -07:00
Gyu-Ho Lee
0b2d8a6c96
*: fix minor typos
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 07:33:35 -07:00
Gyu-Ho Lee
f37ff4a4e2
v3rpc: use grpclog.LoggerV2 for grpc logs
...
grpclog.Logger has been deprecated.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-08 15:25:36 -07:00
Gyu-Ho Lee
9a726b424d
*: fix leaky context creation with cancel
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
8091be6e97
v2v3: ServerV2 backed by clientv3
2017-08-31 11:47:40 -07:00
Anthony Romano
758c3c09fd
etcdserver: refactor v2 request processing
...
Makes interfaces more reusable.
2017-08-31 11:47:40 -07:00
Anthony Romano
1d3afd4bb5
etcdhttp, v2http, etcdserver: use etcdserver.{Server,ServerV2} interfaces
2017-08-31 11:47:40 -07:00
fanmin shi
d2ca782277
v3rpc: limit recv size using MaxRecvMsgSize and send using MaxSendMsgSize
...
grpc 1.3 uses MaxMsgSize() to limit received message size. However, grpc 1.4 introduces a 4mb default limit on send message size. In etcd, server shouldn't be limit size of message that it can be sent. Hence, set maximum size of send message using MaxSendMsgSize().
2017-08-22 14:31:01 -07:00
Anthony Romano
31381da53a
etcdserver: raise alarm on cluster corruption
...
Fixes #7125
2017-08-22 09:59:59 -07:00
Anthony Romano
35dffc7bc1
rpctypes,v3rpc: add Corrupt error code
2017-08-22 09:59:59 -07:00
Anthony Romano
b8bcc891a6
*: regenerate gRPC assets
2017-08-22 09:59:59 -07:00
Anthony Romano
6be5f9a841
etcdserverpb: add corrupt alarm
2017-08-22 09:59:59 -07:00
Gyu-Ho Lee
d25ae50c02
etcdserver: implement LeaseLeases API
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:56 -07:00
Gyu-Ho Lee
8005f00bcf
*: regenerate proto
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:56 -07:00
Gyu-Ho Lee
a7413bbf28
etcdserverpb: define LeaseLeases API
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:56 -07:00
Gyu-Ho Lee
e0843c691b
Merge pull request #8322 from gyuho/health-grpc-proxy
...
*: add /health endpoint to grpc-proxy
2017-07-31 15:45:42 -07:00
Gyu-Ho Lee
cd37ef2c1b
*: expose etcdhttp.Health, define proxy health handler
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-31 14:07:54 -07:00
Anthony Romano
ec4ca4408f
etcdserver: support lease txn comparison
2017-07-31 13:00:04 -07:00
Anthony Romano
71e56a44b7
*: regenerate protobuf assets
2017-07-31 13:00:04 -07:00
Anthony Romano
d8ca2bbffb
etcdserverpb: add lease to txn comparison targets
...
Also shifts down fields following target_union in case there's any more
reason to expand. OK since range_end is still pre-release.
2017-07-31 13:00:04 -07:00
Gyu-Ho Lee
4267d368df
api/etcdhttp: serve error information in '/health', marshal health in JSON
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-27 15:36:59 -07:00
Xiang Li
2a348fb8e9
Merge pull request #8263 from fanminshi/hash_by_rev
...
api: hash by rev
2017-07-26 11:22:33 -07:00
Gyu-Ho Lee
74c8050adc
*: use etcdhttp.Handle* for health, prometheus handlers
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-26 06:23:55 -07:00
Gyu-Ho Lee
78432e3bd2
etcdhttp: add metrics.go for metrics, health handler
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-26 06:23:55 -07:00
Anthony Romano
16943f04e2
Merge pull request #8283 from heyitsanthony/cancel-compact-rpc
...
v3rpc: set Canceled=true on compacted watch
2017-07-25 19:15:18 -07:00
Anthony Romano
478ba2c4f2
etcdserver: consolidate error checking for v3_server functions
...
Duplicated error checking code moved into raftRequest/raftRequestOnce.
2017-07-25 14:28:39 -07:00
Anthony Romano
6fb08672d8
v3rpc: set canceled=true when stream is compacted
...
Fixes #8231
2017-07-25 12:36:01 -07:00
Gyu-Ho Lee
61a736a068
etcdserver: check alarms in health handler
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-07-18 15:51:28 -07:00
fanmin shi
fbb75d24a4
v3rpc: add HashKV to server rpc
2017-07-14 16:44:00 -07:00
fanmin shi
ed052ce9a3
proto: add HashKV grpc
...
HashKV rpc hash of all MVCC keys up to a given revision for a given node.
2017-07-14 16:41:23 -07:00
Xiang Li
0a2b580f73
Merge pull request #8238 from yudai/allow_more_streams
...
v3rpc: Let clients establish unlimited streams
2017-07-11 18:21:09 -07:00
Iwasaki Yudai
52101e6e93
v3rpc: Let clients establish unlimited streams
...
From go-grpc v1.2.0, the number of max streams per client is set to 100
by default by the server side. This change makes it impossible
for third party proxies and custom clients to establish many streams.
2017-07-11 13:02:01 -07:00
Anthony Romano
e29db923bc
*: move v2http handlers without /v2 prefix to etcdhttp
...
Lets --enable-v2=false configurations provide /metrics, /health, etc.
Fixes #8167
2017-07-07 18:35:57 -07:00
Gyu-Ho Lee
a57405a958
Merge pull request #8153 from gyuho/leadership-transfer
...
*: expose Leadership Transfer API to clients
2017-07-06 13:00:08 -07:00
Hitoshi Mitake
e0c33ef881
auth, etcdserver: allow users to know their roles and permissions
...
Current UserGet() and RoleGet() RPCs require admin permission. It
means that users cannot know which roles they belong to and what
permissions the roles have. This commit change the semantics and now
users can know their roles and permissions.
2017-06-26 22:20:41 -07:00
Gyu-Ho Lee
403ba1dfa7
etcdserver: expose 'transferLeadership' as 'MoveLeader'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-23 12:51:28 -07:00
Gyu-Ho Lee
b1a0ae3a3e
etcdserver/api/v3rpc: add 'MoveLeader' to 'maintenanceServer'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-23 12:51:24 -07:00