Commit Graph

175 Commits (83dd121bae2c24803ae4eabce74029def2571774)

Author SHA1 Message Date
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
Anthony Romano c438310634 v3rpc: make watcher wait for its send goroutine to finish 2016-05-27 16:54:26 -07:00
Anthony Romano fc7da09d67 *: add missing godoc package descriptions
Fixes #4074
2016-05-27 15:15:26 -07:00
Xiang Li 1c544c3ba5 api: add v3rpc capability 2016-05-23 14:45:08 -07:00
Anthony Romano ac2e3e43bf v3rpc: add sha trailer to snapshot 2016-05-16 11:15:03 -07:00
Gyu-Ho Lee abb4cd5646 etcdserver: update LICENSE header 2016-05-12 20:49:40 -07:00
Xiang Li 9c103dd0de *: cancel required leader streams when memeber lost its leader 2016-05-12 19:42:21 -07:00
Xiang Li 19221b33cc *: etcd member rejects unary call with leader requirement when it does not have leader 2016-05-11 16:34:34 -07:00
Xiang Li 0d43a2b7e7 Merge pull request #5295 from ajityagaty/auth_disable
auth: Adding support for "auth disable" command.
2016-05-07 23:09:37 -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 74ea9ea5cd *: bump to 3.0.0-beta.0 2016-05-06 13:09:50 -07:00
Gyu-Ho Lee 3c2d0a229c v2http: allow empty role for GET /users
Fix https://github.com/coreos/etcd/issues/5246.
2016-05-06 11:39:38 -07:00
Xiang Li 98031a3b6e Merge pull request #5249 from xiang90/metrics
*: add metrics for grpc api
2016-05-05 14:19:46 -07:00
Xiang Li 063307ec0a *: add metrics for grpc api 2016-05-05 13:45:52 -07:00
Gyu-Ho Lee a288188001 *: typo, remove string type assertions 2016-05-03 10:59:57 -07:00
Gyu-Ho Lee 064c1ff0f3 etcdserver/api/v3rpc: use Revision from Hash API 2016-05-02 15:06:39 -07:00
Gyu-Ho Lee 506cf1f03f etcdserver/api/v3rpc: use new errors 2016-04-29 12:00:26 -07:00
Gyu-Ho Lee 2b361cf06b rpctypes: define a new error interface 2016-04-29 12:00:22 -07:00
Gyu-Ho Lee f613052435 rpctypes: Error function to convert clientv3 error 2016-04-28 12:16:13 -07:00
Anthony Romano 06ea8aee11 v3rpc: only fill lease grant header if no error
Was panicking under cluster fault injection.
2016-04-27 16:28:40 -07:00
Xiang Li afd2cc7373 Merge pull request #5206 from xiang90/lease_header
v3rpc: fill lease header
2016-04-27 11:18:00 -07:00
Xiang Li c3de53c23c v3rpc: fill lease header 2016-04-27 10:30:23 -07:00
Anthony Romano af1a0b60e2 etcdserver: respond with ttl=0 for revoked lease keep alive
Fixes #5172
2016-04-26 13:53:20 -07:00
Anthony Romano b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -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
Gyu-Ho Lee 86f580fa8f v3rpc: bytes-key map look-up gc optimization
This change
f5f5a8b620
just got merged to go1.6.1 where Go does special optimization for x =
m[string(k)] where k is []byte.
2016-04-17 10:52:19 -07:00
Gyu-Ho Lee 641a1a66e1 *: fix govet -shadow in go tip 2016-04-15 07:39:52 -07:00
Gyu-Ho Lee b78886239e *: remove IsLeader field in Member API server side 2016-04-13 16:23:33 -07:00
Gyu-Ho Lee 89f8e66682 *: fixes based on ineffassign 2016-04-13 10:41:58 -07:00
mqliang a9a06438f9 etcdctlv3: expose db size and raft status in server side 2016-04-12 22:49:15 +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
Gyu-Ho Lee 953a08d841 *: clean up from gosimple 2016-04-08 11:55:03 -07:00
Anthony Romano 2b7ad35fa0 v2http: only report capabilities on update 2016-04-07 20:14:30 -07:00
Gyu-Ho Lee d78345244b *: log, expect by capability check 2016-04-07 17:18:51 -07:00
Anthony Romano c91c7ca3bf Merge pull request #4961 from heyitsanthony/rename-lease-create
*: rename lease Create to Grant
2016-04-07 14:51:22 -07:00
Xiang Li bf2289ae00 etcdserver: move membership related code to membership pkg 2016-04-07 14:21:37 -07: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
Xiang Li 030865abe3 *: move Cluster interface to api 2016-04-07 08:05:47 -07:00
Gyu-Ho Lee 6e6d64fb9b *: clean up unused vars, functions
With help from https://github.com/dominikh/go-unused.
IsNetTimeoutError seems useful, so moved to pkg/netutil.
2016-04-06 21:33:55 -07:00
Xiang Li c3bca3739f Merge pull request #4926 from mitake/auth-role-add
*: support adding role in auth v3
2016-04-04 18:44:16 -07:00
Xiang Li 21096bf27f Merge pull request #4963 from xiang90/ht
*: mv etcdhttp into api pkg
2016-04-04 18:40:29 -07:00
Hitoshi Mitake 2b17a3919c *: support adding role in auth v3 2016-04-05 09:28:17 +09:00
Hitoshi Mitake 88306c9fa7 etcdserver, clientv3: let progressReportIntervalMilliseconds be private
progressReportIntervalMilliseconds (old
ProgressReportIntervalMilliseconds) is accessed by multiple goroutines
and it is reported as race.

For avoiding this report, this commit wraps the variable with
functions. They access the variable with atomic operations so the race
won't be reported.
2016-04-05 09:12:17 +09:00
Xiang Li 2c50eb240e *: mv etcdhttp into api pkg 2016-04-04 16:31:35 -07:00
mqliang 1d5d2494ed etcdctlv3: implement status rpc in server side 2016-04-03 13:46:01 +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 cd02cef5e9 etcdserver: only warn on new and disarmed alarms
listing alarms was generating warning output
2016-03-30 13:33:52 -07:00
Hitoshi Mitake 8ee8d755bb etcdserver: return internal error in a case of not auth specific errors 2016-03-30 23:44:22 +09:00
Hitoshi Mitake 443c677357 etcdserver: extract togRPCError() to a separated file
It is used from multiple files in v3rpc package.
2016-03-30 22:53:20 +09:00
Anthony Romano 96ee00a322 etcdserverpb: make alarm memberId uint64
To be consistent with Cluster API
2016-03-29 20:15:39 -07:00
Xiang Li b0956d5dbf Merge pull request #4891 from mitake/auth-prefix
*: add Auth prefix to auth related requests and responses
2016-03-29 17:24:12 -07:00
Anthony Romano d533c14881 Merge pull request #4876 from heyitsanthony/integration-races
*: fix races from clientv3/integration tests
2016-03-29 09:10:53 -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 5ee85bea7c v3rpc: fix race on watch progress map
Found in TestElectionWait
2016-03-28 16:08:18 -07:00
Anthony Romano 91dc6b29a6 clientv3/integration: fix race when setting progress report interval 2016-03-28 16:08:18 -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
Anthony Romano 9c8253c543 etcdserver, v3rpc: space quotas 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
Xiang Li 900a61b023 *: http and https on the same port 2016-03-23 10:28:38 -07:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Gyu-Ho Lee dae7e009b0 *: godoc clean up 2016-03-19 14:19:23 -07:00
Anthony Romano 44753594ec v3rpc: move errors to v3rpc/rpctypes
Fixes #4771
2016-03-17 11:52:34 -07:00
Xiang Li 2f12ea893b etcdserver: add maintain service to support defrag 2016-03-09 22:29:21 -08:00
Xiang Li 036ed87c6d *: support watch from future revision 2016-03-07 10:57:30 -08:00
Xiang Li d84811aecf *: fix watch full key range 2016-03-05 14:45:43 -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
Anthony Romano c0eac7ab72 storage: support watch on ranges 2016-02-29 15:20:41 -08: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 4a0a83380e *: return -1 for canceled watch request 2016-02-26 14:26:46 -08:00
Gyu-Ho Lee a78604dacb *: watch true cancel, created for wrong rev
This sets Created and Cancel true in pb.WatchResponse
when it has received wrong start revision instead of
panic. So that clientv3 can set 'Canceled' in WatchResponse
as well.

Fix https://github.com/coreos/etcd/issues/4610.
2016-02-24 20:56:17 -08:00
Anthony Romano af225e7433 v3rpc: don't race on current watcher header revision 2016-02-17 14:03:52 -08:00
Anthony Romano 59e7be4a2a v3api: send watch events only after sending watchid creation
If events show up before the watch id, the client won't be able
to match the event with the requested watcher.
2016-02-17 01:06:55 -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
Gyu-Ho Lee a56287b9b4 etcdserver: include IsLeader in etcdserverpb.Member 2016-02-11 13:04:03 -08:00
Xiang Li 35567221a7 *: limit request size for v3 2016-02-08 12:54:03 -08:00
Xiang Li bc3fc4ea33 *: add etcdserver namespace for rpc error 2016-02-05 15:13:24 -08:00
Gyu-Ho Lee 2d197ac9e8 *: add kv Hash method (for testing purpose) 2016-02-03 12:52:39 -08:00
Xiang Li 3ed404633a v3rpc: add compacted field from wresp 2016-02-02 23:24:15 -08:00
Xiang Li 6f72b31316 integration: add test promote and move lease tests to lease_test.go 2016-02-02 13:45:11 -08:00
Anthony Romano c5c5063efe etcdserver: reject v3 txns with duplicate put keys
An API check to support PR #4363; bad requests didn't return an error.
2016-02-02 12:32:33 -08:00
Xiang Li bef7887c0d clientv3/integration: add basic lease test 2016-02-01 12:59:44 -08:00
Xiang Li f2c24dec05 clientv3: initial lease 2016-02-01 09:55:32 -08:00
Anthony Romano 4634874d99 etcdmain, integration, v3rpc: consolidate grpc server setup 2016-01-29 16:38:11 -08:00
Xiang Li a3b7876a3c clientv3: use retryConnection 2016-01-27 22:31:15 -08: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 c8bf77c722 v3rpc: check max ops in txn 2016-01-25 21:04:19 -08:00
Anthony Romano 2e157530a0 etcdhttp, lease, v3api: forward keepalives to leader
keepalives don't go through raft so let follower peers announce
keepalives to the leader through the peer http handler
2016-01-22 12:40:40 -08:00
Xiang Li 59bf83c7f4 *: now lease keepAlive works on leader 2016-01-09 22:12:02 -08:00
Xiang Li 99bee2fd29 Merge pull request #4162 from xiang90/lease
*: add support for lease create and revoke
2016-01-07 16:58:59 -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