Commit Graph

125 Commits (cbc84bc70ef9e8445909521e9e1bb300e0387cb9)

Author SHA1 Message Date
Yicheng Qin cbc84bc70e etcdserver: minimize input info 2014-10-01 11:47:17 -07:00
Yicheng Qin a40a270e19 etcdserver: publish self info when start 2014-10-01 11:47:17 -07:00
Brandon Philips 04bd48fef3 etcdserver: stop worrying about scheme
Stop worrying about the scheme. This puts a TODO on adding validation to
the schemes if TLS is specified. But we can worry about that later.
2014-09-30 17:05:20 -07:00
Brandon Philips c2f96631d3 etcdserver: stop using addScheme
This standardizes the flags to use a list of URLs everywhere. The next
step is to enforce the scheme based on TLS settings and support compat
flags.
2014-09-30 16:40:32 -07:00
Brandon Philips aa5b6cdc9e etcdserver: have newMember take an optional time field
This will be used by members joining an existing cluster or joining
using discovery.
2014-09-30 14:57:04 -07:00
Yicheng Qin 34547229a6 etcdserver: fix left Id -> ID 2014-09-29 14:14:45 -07:00
Yicheng Qin 0e8345aa73 Merge pull request #1143 from unihorn/136
*: Id -> ID for protobuf types
2014-09-29 13:58:02 -07:00
Yicheng Qin 08e5f39d8a Merge pull request #1192 from unihorn/140
etcdserver: add publish func
2014-09-29 10:20:39 -07:00
Yicheng Qin 89077167c3 etcdserver: add publish func 2014-09-29 10:13:06 -07:00
Yicheng Qin 5784693a39 etcdserver: Cluster.Endpoints() -> Cluster.PeerURLs() 2014-09-28 14:39:47 -07:00
Yicheng Qin e83f851995 etcdserver: move cluster test from etcdhttp to etcdserver 2014-09-28 14:35:48 -07:00
Yicheng Qin 15798a73d9 etcdserver: return client urls for /v2/machines 2014-09-26 16:50:15 -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
Brandon Philips 5e3fd6ee3f etcdserver: introduce the cluster and member
This introduces two new concepts: the cluster and the member.

Members are logical etcd instances that have a name, raft ID, and a list
of peer and client addresses.

A cluster is made up of a list of members.
2014-09-25 18:04:10 -07:00
Jonathan Boulle 9b3478218e etcdserver: add RaftIndex and RaftTerm 2014-09-25 16:46:24 -07:00
Xiang Li aab41f06d0 elog: remove elog 2014-09-25 11:33:10 -07:00
Xiang Li 45f71af33e pkg: move testutil to pkg 2014-09-25 10:40:40 -07:00
Jonathan Boulle 2da1010cf7 etcdhttp: make TTL= equivalent to unset, and TTL=0 expire 2014-09-24 17:41:44 -07:00
Jonathan Boulle fa762e6b25 etcdhttp: process dir parameter in request 2014-09-24 17:11:28 -07:00
Jonathan Boulle 98561f6b5d Merge pull request #1158 from jonboulle/1158_unset_ttl
"unsetting" a TTL fails
2014-09-24 17:01:50 -07:00
Jonathan Boulle 20ac7d6732 Merge pull request #1157 from jonboulle/1019_etcdserver
etcdserver: extend storeRecorder to test parameters
2014-09-24 16:58:57 -07:00
Jonathan Boulle 2b52384e7e etcdhttp: allow empty values for TTL parameter 2014-09-24 16:44:55 -07:00
Jonathan Boulle c2ced7dc70 etcdserver: add tests for Set and Dir=true/false 2014-09-24 15:57:06 -07:00
Jonathan Boulle ef0ba361df etcdhttp: add test for expiration time 2014-09-24 15:46:40 -07:00
Jonathan Boulle 2e2cd12407 etcdhttp: disallow empty prevValue fields 2014-09-24 15:21:18 -07:00
Jonathan Boulle c28fd92d10 etcdserver: extend storeRecorder to test parameters 2014-09-24 14:33:51 -07:00
Jonathan Boulle c8c55aa378 scripts: consolidate and standardize protobuf generation 2014-09-24 13:45:00 -07:00
Jonathan Boulle a9caa24f8a etcdhttp: add test for streaming watches 2014-09-24 11:27:36 -07:00
Jonathan Boulle ddc30c0a33 etcdserver: use Context to communicate timeout, and add tests 2014-09-24 11:27:36 -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
Jonathan Boulle e97134e767 etcdserver: eliminate race in sync test 2014-09-23 15:49:20 -07:00
Jonathan Boulle b85ad9bbc2 Merge pull request #1082 from jonboulle/1082_x_etcd_index
X-Etcd-Index returns the node's modifiedIndex
2014-09-23 15:14:21 -07:00
Yicheng Qin dcdc7913c0 Merge pull request #1100 from unihorn/129
raft: add Configure
2014-09-23 13:50:10 -07:00
Yicheng Qin c6cb635e01 etcdserver: refine comments of config change tests 2014-09-23 13:03:30 -07:00
Yicheng Qin bc7b0108dc raft: ConfigChange -> ConfChange 2014-09-23 12:02:44 -07:00
Brian Waldon 99e9f561ee etcdserver: add Peers.Addrs 2014-09-23 10:56:41 -07:00
Brian Waldon 10220335f7 etcdserver: determine scheme based on TLSClientConfig 2014-09-23 10:14:12 -07:00
Brian Waldon e19b0442f8 etcdserver: pass scheme into send 2014-09-23 10:14:11 -07:00
Brian Waldon fb7968d704 etcdserver: Peers.Pick returns just an addr 2014-09-23 10:09:34 -07:00
Brian Waldon 5470a6d3d6 etcdserver: pass http client into Sender 2014-09-23 10:02:23 -07:00
Yicheng Qin d92931853e raft: Config -> ConfigChange
Configure -> ProposeConfigChange
AddNode, RemoveNode -> ApplyConfigChange
2014-09-22 23:39:53 -07:00
Jonathan Boulle 5441c6aa54 etcdserver: correct X-Etcd-Index header
This adds an EtcdIndex field to store.Event and uses that as the header
instead of the node's modifiedIndex. To facilitate this in a non-racy
way, we set the EtcdIndex while holding the lock.
2014-09-22 18:56:12 -07:00
Yicheng Qin ec8f493fde raft: refine comments for Configure 2014-09-22 15:44:47 -07:00
Yicheng Qin dc36ae7058 raft: use pb.Config instead of []byte for Configure 2014-09-22 15:44:47 -07:00
Yicheng Qin 4203569da2 etcdserver: use ConfigType in protobuf 2014-09-22 15:44:46 -07:00
Yicheng Qin b82d70871f raft: use EntryType in protobuf 2014-09-22 15:44:46 -07:00
Yicheng Qin abdb2cad15 etcdserver: Config.Id -> Config.ID 2014-09-22 15:44:46 -07:00
Yicheng Qin aaffb9eb78 etcdserver: add AddNode, RemoveNode
AddNode and RemoveNode is used to propose config change to the cluster.
If succeeds, it will add/remove node from the cluster.
2014-09-22 15:44:46 -07:00
Brian Waldon 7d1126fb35 etcdserver: init time.Time only if Expiration > 0
golang's concept of "zero" time does not align with the zero value of
a unix timestamp. Initializing time.Time with a unix timestamp of 0
makes time.Time.IsZero fail. Solve this by initializing time.Time only
if we care about the time.
2014-09-22 15:31:31 -07:00
Jonathan Boulle e08df4c8d2 store: fix recursive/dir arguments 2014-09-22 14:44:01 -07:00