Commit Graph

196 Commits (7cb2bb67bfc75feed2bc8a78cdbbf05a6c2dbf47)

Author SHA1 Message Date
Anthony Romano 84a487f723 Revert "etcdserverpb: make RangeResponse.More an int64"
This reverts commit 84e1ab8765.
2016-06-02 13:43:40 -07:00
Hitoshi Mitake 5609fdb9a8 *: support getting user in etcdctl v3
This commit adds a new subcommand "user get" to etcdctl v3. It will
list up roles that are granted to a given user.

Example:
$ ETCDCTL_API=3 bin/etcdctl user get u1
User: u1
Roles: r1 r2 r3

This commit also modifies the layout of InternalRaftRequest for
frequent update of auth related members.
2016-06-02 12:10:19 +09:00
Anthony Romano 84e1ab8765 etcdserverpb: make RangeResponse.More an int64 2016-06-01 17:10:23 -07:00
Hitoshi Mitake 8e821cdc70 *: do permission check in raft log apply phase
This commit lets etcdserver check permission during its log applying
phase. With this change, permission checking of operations is
supported.

Currently, put and range are supported. In addition, multi key
permission check of range isn't supported yet.
2016-05-29 00:05:48 +09:00
Gyu-Ho Lee 8a718f3e56 etcdserverpb: document prefix, range query
Fix https://github.com/coreos/etcd/issues/5401.
2016-05-25 16:53:36 -07:00
Gyu-Ho Lee b1f95c314b *: fix protodoc, consistent casing in api doc
There was a bug in protodoc.
This changes git SHA to use the latest protodoc.
And make the letter casing consistent with original
Protocol Buffer. Go capitalizes the member variables,
but the protocol buffer documentation should be same as
original proto files.
2016-05-12 16:23:29 -07:00
Ajit Yagaty adc981c53d auth: Adding support for "auth disable" command.
Added support for the auth disable command in the server, added the
etcdctl command and a respective testcase.
2016-05-07 19:21:49 -07:00
Gyu-Ho Lee 015acabdbb *: rerun genproto -g 2016-05-02 23:02:31 -07:00
Anthony Romano b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
Gyu-Ho Lee 4b31acf0e0 *: update generated Proto 2016-04-25 14:08:33 -07:00
Hitoshi Mitake 131e3806bb *: support authenticate in v3 auth
This commit implements Authenticate() API of the auth package. It does
authentication based on its authUsers bucket and generate a token for
succeeding RPCs.
2016-04-21 12:32:19 +09:00
Anthony Romano 42245a5518 storagepb, etcdserverpb: improve documentation for RPC message fields 2016-04-17 23:33:00 -07:00
Anthony Romano d72bcdc156 storage: have Range on rev=0 work even if compacted to current revision 2016-04-13 21:00:35 -07:00
Gyu-Ho Lee 7a2ef3eb00 *: regenerate proto buffers 2016-04-13 16:24:07 -07:00
Gyu-Ho Lee b78886239e *: remove IsLeader field in Member API server side 2016-04-13 16:23:33 -07:00
mqliang 1044fbce2c etcdctlv3: update aunto generated files 2016-04-12 22:48:47 +08:00
mqliang c3da2631bf etcdctlv3: add db size and raft status in protobuffer 2016-04-12 22:47:27 +08:00
Anthony Romano be822b05d2 Merge pull request #5012 from heyitsanthony/snap-api
*: snapshot RPC
2016-04-11 13:00:18 -07:00
Anthony Romano a6b6fcf1c4 etcdserverpb, v3rpc: add Snapshot to Maintenance RPC service 2016-04-11 09:51:16 -07:00
Hitoshi Mitake 7ba2646d37 *: support granting a role to a user in v3 auth 2016-04-11 15:53:30 +09:00
Hitoshi Mitake 02033b4c47 *: support granting key permission to role in v3 auth 2016-04-11 12:23:19 +09:00
Anthony Romano dc17eaace7 *: rename Lease Create to Grant
Creating a lease through the client API interface union looked like
"c.Create(...)"-- the method name wasn't very descriptive.
2016-04-07 12:28:14 -07:00
Hitoshi Mitake 2b17a3919c *: support adding role in auth v3 2016-04-05 09:28:17 +09:00
mqliang bbca61252f etcdctlv3: update aunto generated files 2016-04-03 13:45:17 +08:00
mqliang 3c62bfb7a3 etcdctlv3: add status rpc in protbuffer file 2016-04-03 13:44:45 +08:00
Hitoshi Mitake 73166b41e9 *: support changing password in v3 auth
This commit adds a functionality for updating password of existing
users.
2016-03-31 15:28:15 +09:00
Hitoshi Mitake d8888ded12 *: support deleting user in v3 auth
This commit adds a functionality of user deletion. It can be invoked
with the new user delete command.

Example usage:
$ ETCDCTL_API=3 etcdctl user delete usr1
2016-03-31 13:18:51 +09:00
Anthony Romano 7ce5c2b9ff Merge pull request #4902 from heyitsanthony/alarm-ctl
etcdctl: alarm command
2016-03-30 13:55:29 -07:00
Anthony Romano 4b35cb9462 etcdserver, storage: optionally wait for Compaction completion in RPC 2016-03-30 09:45:30 -07:00
Anthony Romano 96ee00a322 etcdserverpb: make alarm memberId uint64
To be consistent with Cluster API
2016-03-29 20:15:39 -07:00
Hitoshi Mitake 987568c65c *: add Auth prefix to auth related requests and responses 2016-03-29 14:32:19 +09:00
Anthony Romano 3fbacf4be2 v3rpc: move Hash RPC to Maintenance service 2016-03-28 17:15:58 -07:00
Anthony Romano 9e7f47c490 etcdserver: Alarm RPC
Alarms are events that nodes can use to relay health information to
the rest of the cluster. A node may Activate an alarm and that alarm
will stay set until Deactivated.
2016-03-28 14:56:26 -07:00
Hitoshi Mitake 8874545a1e *: support adding user in v3 auth
This commit adds a new subcommand "user add" to etcdctlv3. With the
command users can create a user for the authentication.

Example of usage:
$ etcdctlv3 user add user1
Password of user1:
Type password of user1 again for confirmation:
2016-03-27 18:11:42 +09:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Xiang Li 2f12ea893b etcdserver: add maintain service to support defrag 2016-03-09 22:29:21 -08:00
Xiang Li b1521570b6 v3api: support progress 2016-03-03 13:58:15 -08:00
Hitoshi Mitake 7a78c1ef1d etcdserver: AuthServer for auth related RPCs
Currently AuthEnable() is connected to etcdserver for experimental
purpose.
2016-03-02 15:17:59 +09:00
Hitoshi Mitake 286d96284e etcdserver: update rpc.proto for v3 authentication 2016-03-01 17:11:50 +09:00
Anthony Romano 8dbc6cfd43 etcdserver: ranges in watcher rpc protocol
protocol change so watch requests are ranges; server rejects non-prefix ranges
2016-02-29 14:03:27 -08:00
Gyu-Ho Lee fc86e1ded1 *: return the number of deleted keys
For https://github.com/coreos/etcd/issues/4576.
2016-02-21 17:59:21 -08:00
Gyu-Ho Lee 93f2a4487a Merge pull request #4507 from gyuho/better_hash
etcdserver: populate ResponseHeader in Hash method
2016-02-12 14:36:26 -08:00
Gyu-Ho Lee 2710e4eed1 etcdserver: populate ResponseHeader in Hash method 2016-02-12 14:26:18 -08:00
Anthony Romano ee1a03167d storage, v3: pass compaction revision through watchresponse 2016-02-12 14:06:59 -08:00
Xiang Li 30c11c1bca *: support local range request 2016-02-12 12:04:06 -08:00
Anthony Romano 4854d7f69d storage: support ranges for >= key
If end == "", range(key, end) will give all keys >= key.
2016-02-12 09:45:43 -08:00
Gyu-Ho Lee a56287b9b4 etcdserver: include IsLeader in etcdserverpb.Member 2016-02-11 13:04:03 -08:00
Caleb Champlin 82778ed478 Add refresh parameter to allow TTL refreshes without firing watch/wait responses 2016-02-08 10:37:37 -07:00
Gyu-Ho Lee 2d197ac9e8 *: add kv Hash method (for testing purpose) 2016-02-03 12:52:39 -08:00
Hitoshi Mitake f7d35a1ef8 etcdserver: update comments in a generated file
On the latest master branch, etcdserver/etcdserverpb/etcdserver.pb.go
is changed when scripts/genproto.sh is executed. The content only has
changes for comment. Therefore it is not important but the change is
annoying when we update the proto file.
2016-02-04 00:45:16 +09:00
Xiang Li 36cc8446c7 *: finish member api implementation 2016-01-26 18:09:14 -08:00
Gyu-Ho Lee ad15bdcb07 etcdserver: update gRPC, proto interface 2016-01-26 17:41:19 -08:00
Xiang Li 864fc197c1 etcdserver: initial member api proto 2016-01-26 09:56:50 -08:00
Anthony Romano 9113a27bde lease: grant consistent lease IDs
When raft broadcasts a Grant to all nodes, all nodes must
agree on the same lease ID. Otherwise, attaching a key to
a lease will fail since the lease ID is node-dependent.
2016-01-22 09:43:39 -08:00
Anthony Romano 82eeffbd58 etcdserver: support sorted range requests in v3 api
Fixes #4166
2016-01-12 10:08:30 -08:00
Xiang Li 59bf83c7f4 *: now lease keepAlive works on leader 2016-01-09 22:12:02 -08:00
Xiang Li d9ca929a33 *: add support for lease create and revoke
Basic support for lease operations like create and revoke.
We still need to:
1. attach keys to leases in KV implmentation if lease field is set
2. leader periodically removes expired leases
3. leader serves keepAlive requests and follower forwards keepAlive
requests to leader.
2016-01-07 16:39:39 -08:00
Gyu-Ho Lee 366e7a879f *: fill in WatchResponse.Header
Related to coreos#3848.
2016-01-06 15:12:53 -08:00
Xiang Li ac330bb7c9 *: update watch related proto
1. Add watch/cancel request
2. Add necessary fields in response to return watch error
3. Add watch_id into watch response
2016-01-01 10:22:21 -08:00
Gyu-Ho Lee 8da6e76588 etcdserver/etcdserverpb: rpc WatchResponse with events slice 2015-12-31 19:24:46 -08:00
Xiang Li 1dc0e664f0 *: fix proto and regenerate all go files 2015-12-30 20:11:19 -08:00
Xiang Li 9d9680121c etcdserver/etcdserverpb: make rpc.proto updated 2015-12-29 12:58:14 -08:00
Xiang Li 1a0201a31a *: update api proto 2015-12-29 12:31:53 -08:00
Xiang Li 1a3f7f7fa4 *: rename etcd service to kv service in gRPC 2015-11-04 10:05:49 -08:00
Xiang Li c160085f44 *: add v3 watch service 2015-11-03 14:21:24 -08:00
Xiang Li 94f784826a *: support v3 compaction 2015-09-14 19:59:36 -07:00
Xiang Li 7183387110 etcdserver: use gRPC error instead of error message in header 2015-09-14 16:11:13 -07:00
Xiang Li 600456f4ba etcdserverpb: update proto file for raftInternalRequest
We needs to assign each raftInternalRequest an ID for getting
the response after it goes through raft.

We also needs an empty response for error case.
2015-09-13 08:28:10 -07:00
Xiang Li 3f18ded10a *: v3api index->revision 2015-09-04 10:41:20 -07:00
Xiang Li 2ac9af4924 *: replace consistent token with revision in v3 api 2015-09-03 15:41:33 -07:00
Xiang Li ef7cf058a2 *: update gogoproto 2015-09-03 15:32:25 -07:00
Tamir Duberstein 45390b9fb8 *: regenerate proto to use local import path
Using Go-style import paths in protos is not idiomatic. Normally, this
detail would be internal to etcd, but the path from which gogoproto
is imported affects downstream consumers (e.g. cockroachdb).

In cockroach, we want to avoid including `$GOPATH/src` in our protoc
include path for various reasons. This patch puts etcd on the same
convention, which allows this for cockroach.

More information: https://github.com/cockroachdb/cockroach/pull/2339#discussion_r38663417

This commit also regenerates all the protos, which seem to have
drifted a tiny bit.
2015-09-03 13:38:28 -04:00
Xiang Li 1cccbb5ebd etcdserverpb: add comments for compaction 2015-08-24 10:52:54 -07:00
Xiang Li 4a5b94478e etcdserverpb: update comment for txn request 2015-08-24 10:40:05 -07:00
Xiang Li 98ceb3cdbd etcdserverpb: add more field into rangeResponse 2015-08-24 10:33:20 -07:00
Xiang Li 46865fa5a5 etcdserverpb: update proto 2015-08-14 11:45:07 -07:00
Xiang Li 82afadbcc6 etcdserverpb: update proto 2015-08-08 05:31:35 -07:00
Xiang Li 845c51fedd *: fix typos vaild->valid 2015-08-07 10:57:11 -07:00
Xiang Li 58503817ec etcdserver: internal request union 2015-08-05 07:47:10 -07:00
Xiang Li 53a77fa519 *: tnx -> txn 2015-07-24 23:21:09 +08:00
Xiang Li 2fb8347d36 etcdserver: add rpc proto 2015-06-29 20:00:09 -07:00
Xiang Li 581ef05bab *: resolve proto warnings 2015-06-29 18:39:46 -07:00
Xiang Li 13f44e4b79 *: update generated proto code 2015-06-29 16:45:25 -07:00
Xiang Li 05e240b892 *: update protobuf 2015-03-25 10:14:35 -07:00
Xiang Li ea6bcacfe4 *: generate clusterid 2014-10-20 15:00:54 -07:00
Xiang Li f98fbbfc14 *: proto refactoring 2014-10-14 21:07:23 +08:00
Jonathan Boulle 4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00
Xiang Li 3516cc3ee5 *: change all ID to uint64 2014-10-12 08:38:48 +08:00
Yicheng Qin 447caf1afc etcdserver/wal: record info at the head of WAL file 2014-10-10 11:57:09 -07:00
Yicheng Qin 1d5d2e3726 *: Id -> ID for protobuf types
We use ID instead of Id in this project based on golang conventions.
2014-09-26 11:49:30 -07:00
Jonathan Boulle c8c55aa378 scripts: consolidate and standardize protobuf generation 2014-09-24 13:45:00 -07:00
Jonathan Boulle 172a32e5e3 etcdserver: correct timeout and streaming handling
This reintroduces the 'stream' parameter to support long-lived watch
sessions. These sessions respect a server timeout (set to 5 minutes by
default).
2014-09-24 11:27:36 -07:00
Brian Waldon 91003cb994 *: s/prevExists/prevExist/ 2014-09-18 21:25:08 -07:00
Yicheng Qin 023dc7cba2 etcdserver: add SYNC request 2014-09-16 13:42:03 -07:00
Blake Mizerany 99c7371337 etcdserver: use vendored gogoproto 2014-09-03 19:47:05 -07:00
Xiang Li 2ba57ee75d *: remove unused pkgs 2014-09-03 09:20:20 -07:00