Brandon Philips
0b493ac8d4
version: bump to alpha.2
2014-11-07 16:44:02 -08:00
Jonathan Boulle
c73d41d98b
Merge pull request #1658 from jonboulle/doc_etcdctl_backup
...
Add doc for backup and force-new-cluster
2014-11-07 16:39:45 -08:00
Jonathan Boulle
3d2f65fc0d
docs: clarify rewriting
2014-11-07 16:35:33 -08:00
Jonathan Boulle
6b283f6ea1
docs: reword failure descriptions
2014-11-07 16:34:19 -08:00
Jonathan Boulle
4367c9a1db
docs: no need to stop etcd while doing backup
2014-11-07 16:25:38 -08:00
Yicheng Qin
c9894687fc
Merge pull request #1662 from yichengq/211
...
etcdserver: fix data race in cluster
2014-11-07 16:20:59 -08:00
Jonathan Boulle
a56fa60fb4
doc: add backup/restore guide
2014-11-07 16:14:45 -08:00
Yicheng Qin
014ef0f52d
etcdserver: fix data race in cluster
...
The data race happens when etcd updates member attributes and fetches
member info in http handler at the same time.
2014-11-07 16:13:07 -08:00
Yicheng Qin
2fc47034ee
Merge pull request #1660 from yichengq/209
...
etcdserver: not add sender when it has existed
2014-11-07 16:10:50 -08:00
Yicheng Qin
46cbfbc630
etcdserver: not add sender when it has existed
2014-11-07 14:05:00 -08:00
Jonathan Boulle
d3fd10798b
Merge pull request #1656 from jonboulle/1656_sender_garbage
...
sender logs garbage
2014-11-07 13:44:18 -08:00
Jonathan Boulle
a6ba4d357c
Merge pull request #1474 from jonboulle/1474_print_peers
...
print out remote peers' information and config change in the cluster
2014-11-07 13:39:32 -08:00
Yicheng Qin
e707af7c3a
Merge pull request #1654 from yichengq/208
...
integration: use client to do requests
2014-11-07 13:37:14 -08:00
Jonathan Boulle
ca06fd0060
etcdserver: log cluster when adding/removing node
2014-11-07 13:36:41 -08:00
Jonathan Boulle
958ade86a5
etcdserver: log message after loading peers from snapshot
2014-11-07 13:34:43 -08:00
Yicheng Qin
85a4477f71
integration: use client to do requests
2014-11-07 13:34:30 -08:00
Jonathan Boulle
38ec84693f
etcdserver: clean up sender error message
2014-11-07 13:32:44 -08:00
Xiang Li
78865aa7f7
Merge pull request #1657 from xiangli-cmu/backup
...
*: add ctl backup support
2014-11-07 13:30:54 -08:00
Xiang Li
0d541e6338
*: add ctl backup support
2014-11-07 13:27:44 -08:00
Brian Waldon
5f6e536be8
Merge pull request #1639 from bcwaldon/etcdctl-tls
...
Wire up TLS flags for etcdctl
2014-11-07 13:19:36 -08:00
Jonathan Boulle
4f85a68c25
Merge pull request #1650 from jonboulle/build_release
...
scripts: clean build-release script a bit
2014-11-07 12:51:30 -08:00
Jonathan Boulle
c3aae88b0c
Merge pull request #1653 from jonboulle/server_order
...
etcdserver: re-order ServerConfig fields
2014-11-07 12:28:29 -08:00
Jonathan Boulle
32a82bb423
Merge pull request #1651 from jonboulle/discard
...
etcdserver: discard log output in tests
2014-11-07 12:05:40 -08:00
Jonathan Boulle
285cd404e3
etcdserver: print peerURLs when adding member
2014-11-07 12:00:41 -08:00
Jonathan Boulle
a607e097c6
etcdserver: re-order ServerConfig fields
2014-11-07 11:45:59 -08:00
Jonathan Boulle
55b4ff0cdf
etcdserver: discard log output in tests
2014-11-07 11:45:46 -08:00
Jonathan Boulle
82094f05e0
scripts: clean build-release script a bit
2014-11-07 11:45:40 -08:00
Jonathan Boulle
c4f273478d
Merge pull request #1652 from jonboulle/fix_tests
...
etcdserver: sort IDs and s/getIDset/getIDs/
2014-11-07 11:43:51 -08:00
Jonathan Boulle
14e1442d2d
etcdserver: sort IDs and s/getIDset/getIDs/
2014-11-07 10:57:42 -08:00
Jonathan Boulle
810a5146dd
Merge pull request #1635 from jonboulle/doc
...
etcdserver: add docstrings for confchanges
2014-11-07 10:20:05 -08:00
Jonathan Boulle
5055863e09
etcdserver: add docstrings for confchanges
2014-11-07 10:19:55 -08:00
Xiang Li
bf47fe7cac
Merge pull request #1647 from xiangli-cmu/force_cluster
...
etcdserver: force new cluster
2014-11-07 10:15:53 -08:00
Yicheng Qin
9d19429993
Merge pull request #1609 from yichengq/202
...
etcdserver: refactor sender
2014-11-07 10:12:02 -08:00
Xiang Li
142dfc7d88
etcdserver: add doc for getIDset
2014-11-07 09:00:58 -08:00
Xiang Li
0a9c6164af
etcdserver: add support for force cluster
2014-11-07 08:49:01 -08:00
Jonathan Boulle
376268391b
Merge pull request #1646 from jonboulle/1536_disco_proxy
...
discovery: add command line flag for discovery-proxy
2014-11-07 08:32:23 -08:00
Jonathan Boulle
d6f37ec9ad
Merge pull request #1648 from jonboulle/delete_member_404
...
etcdhttp: return 404 when removing nonexistent member
2014-11-06 17:24:17 -08:00
Jonathan Boulle
ca1b30db10
etcdhttp: return 404 when removing nonexistent member
2014-11-06 16:59:40 -08:00
Yicheng Qin
9454d30854
etcdserver: add sendHub tests
2014-11-06 16:49:13 -08:00
Jonathan Boulle
f75e56932a
Merge pull request #1643 from jonboulle/fix_flags
...
pkg: fix SetFlagsFromEnv behaviour
2014-11-06 16:43:21 -08:00
Jonathan Boulle
5604b4c57c
flag: split out SetFlagsFromEnvBad test; declare return error
2014-11-06 16:40:13 -08:00
Jonathan Boulle
8f1885a398
discovery: add command line flag for discovery-proxy
2014-11-06 16:35:24 -08:00
Yicheng Qin
ccded6644a
Merge pull request #1505 from yichengq/193
...
etcdserver: refactor non-blocking check for sync tests
2014-11-06 15:48:18 -08:00
Jonathan Boulle
321d65c4ac
pkg: fix SetFlagsFromEnv behaviour
...
This function was fundamentally buggy, as a panic could be trivially
triggered by setting the wrong environment variable (e.g.
ETCD_BIND_ADDR=foo). Instead, let's propagate the error and present it
to the user in a cleaner way.
2014-11-06 14:39:30 -08:00
Xiang Li
c5e6053fcd
Merge pull request #1638 from xiangli-cmu/better_logging
...
etcdserver: better logging for clusterFromPeerURLs
2014-11-06 14:33:53 -08:00
Xiang Li
eb0d80767e
etcdserver: better logging for clusterFromPeerURLs
2014-11-06 14:28:07 -08:00
Xiang Li
6fa031fa69
Merge pull request #1641 from bdarnell/remove-raftlog-reset
...
raft: remove raftLog.resetUnstable and resetNextEnts
2014-11-06 14:26:08 -08:00
Ben Darnell
21987c8701
raft: remove raftLog.resetUnstable and resetNextEnts
...
These methods are no longer used outside of tests and are redundant with
the new stableTo and appliedTo methods.
2014-11-06 17:18:00 -05:00
Yicheng Qin
457b30e585
etcdserver: add/remove sender in sendhub explicitly
2014-11-06 14:04:14 -08:00
Yicheng Qin
2138163c61
etcdserver: code clean on sender struct
2014-11-06 14:04:14 -08:00
Yicheng Qin
211c5e3e29
etcdserver: fix data race in Cluster struct
2014-11-06 14:04:14 -08:00
Yicheng Qin
c3b0de943c
etcdserver: discard messages if sender reaches max serving
...
It is the correct thing to do to ensure that the communication is full
of out-of-date messages.
It results in that integration testing is very easy to throw MsgProp away,
and makes client wait until 5 min timeout. Sync interval and heartbeat are
increased to alleviate the traffic.
2014-11-06 14:04:14 -08:00
Yicheng Qin
1e05cd75c7
etcdserver: refactor sender
...
1. restrict the number of inflight connections to remote member
2. support stop
2014-11-06 14:04:14 -08:00
Brian Waldon
2d942e970b
etcdctl: add --ca-file, --cert-file, --key-file flags
2014-11-06 12:50:38 -08:00
Xiang Li
087e0e8b62
Merge pull request #1636 from xiangli-cmu/client
...
client: add error handling for addmember
2014-11-06 12:46:15 -08:00
Jonathan Boulle
b65dd84e1a
Merge pull request #1632 from jonboulle/cs_flag
...
etcdmain: use StringsFlag for initialclusterstate
2014-11-06 12:36:22 -08:00
Xiang Li
66572561bf
client: add error handling for addmember
2014-11-06 12:31:24 -08:00
Brian Waldon
902f06c5c4
pkg/transport: generate TLS client config w/ only CAFile
2014-11-06 12:13:36 -08:00
Xiang Li
b53a98eb38
Merge pull request #1631 from xiangli-cmu/validate_doc
...
Validate doc
2014-11-06 11:45:00 -08:00
Xiang Li
a1f5df22ad
doc: document conflict case when adding a member
2014-11-06 11:16:49 -08:00
Jonathan Boulle
04f6208ace
etcdmain: use StringsFlag for initialclusterstate
2014-11-06 11:13:24 -08:00
Xiang Li
3cb885c6b2
etcdhttp: return 409 instead of 412 when there is a conflict when adding a member
2014-11-06 11:07:25 -08:00
Brian Waldon
f4ea274555
etcdctl: centralize getEndpoints logic
2014-11-06 10:54:59 -08:00
Brian Waldon
4b555dba99
client: add SyncableHTTPClient.Endpoints
2014-11-06 10:54:56 -08:00
Kelsey Hightower
9c8f9b3560
Merge pull request #1585 from coreos/clean-up-other-apis-docs
...
docs: clean up other apis
2014-11-06 10:48:02 -08:00
Xiang Li
4ed60471fe
Merge pull request #1627 from xiangli-cmu/validate_peer_url
...
etcdserver: validate peerurl when adding members
2014-11-06 10:43:22 -08:00
Jonathan Boulle
7d28d80e5a
Merge pull request #1626 from jonboulle/proxy_stuff
...
discovery: simplify interface
2014-11-06 10:09:16 -08:00
Jonathan Boulle
45d7ef99c4
Merge pull request #1629 from asmundg/x-fix-typo
...
Fix typo in docs
2014-11-06 09:58:54 -08:00
Åsmund Grammeltvedt
0d8345e0c1
Fix typo in docs
...
Suggesting that users add two nodes with the same name is probably not a
good idea.
2014-11-06 10:49:40 +01:00
Yicheng Qin
2760739ceb
Merge pull request #1625 from yichengq/205
...
docs: describe the lifetime of discovery url
2014-11-06 00:32:49 -08:00
Yicheng Qin
5d755bd54a
docs: describe the lifetime of discovery url
2014-11-06 00:31:19 -08:00
Xiang Li
bd2b18b6de
etcdserver: validate peerurl when adding members
2014-11-05 23:12:48 -08:00
Jonathan Boulle
68bca981de
discovery: simplify interface
...
There's no real need to expose a Discoverer interface/struct when the
only use of the interface (and indeed the module) is to invoke a single
function. This isn't Java, after all. So instead, simplify to Discovery
exposing just two functions: JoinCluster (i.e. what was formerly called
"discovery"), and GetCluster (hitherto "ProxyDiscovery")
2014-11-05 22:45:01 -08:00
Xiang Li
6fdbb086f4
Merge pull request #1623 from xiangli-cmu/valid_configuration
...
Valid configuration
2014-11-05 18:13:04 -08:00
Xiang Li
99b1af40c6
etcdserver: move config validation to cluster
2014-11-05 17:55:07 -08:00
Yicheng Qin
99bb479a60
Merge pull request #1618 from yichengq/203
...
etcdserver: improve panic message in Cluster
2014-11-05 17:14:26 -08:00
Xiang Li
98406af448
cluster: separate out membersFromStore from newClusterFromStore
2014-11-05 15:56:43 -08:00
Yicheng Qin
6c9169b4f4
etcdserver: improve panic message in Cluster
2014-11-05 15:39:28 -08:00
Xiang Li
3fc6f9c24f
Merge pull request #1586 from xiangli-cmu/fix_node
...
*: add Advance interface to raft.Node
2014-11-05 15:09:51 -08:00
Xiang Li
0d7c43d885
*: add a Advance interface to raft.Node
...
Node set the applied to committed right after it sends out Ready to application. This is not
correct since the application has not actually applied the entries at that point. We add a
Advance interface to Node. Application needs to call Advance to tell raft Node its progress.
Also this change can avoid unnecessary copying when application is still applying entires but
there are more entries to be applied.
2014-11-05 15:04:14 -08:00
Yicheng Qin
c5140d5c18
Merge pull request #1614 from yichengq/194
...
*: handle panic and fatal organizedly
2014-11-05 14:08:35 -08:00
Jonathan Boulle
fdb82718e0
Merge pull request #1612 from jonboulle/proxy
...
proxy: add docstrings
2014-11-05 13:56:24 -08:00
Yicheng Qin
791b2fd503
*: handle panic and fatal more consistently
...
1. etcd fatals if there is critical error in the system and operator should
do something for it
2. etcd panics if there happens something unexpected, and it should be
reported to us to debug.
2014-11-05 13:53:24 -08:00
Jonathan Boulle
3c3cae57c6
Merge pull request #1616 from jonboulle/philips-add-error-to-test
...
test: add error package
2014-11-05 13:40:58 -08:00
Brandon Philips
bdd2a0a018
test: add error package
2014-11-05 13:31:42 -08:00
Jonathan Boulle
c6104c1e2a
Merge pull request #1613 from jonboulle/proxy_clean
...
etcdmain: simplify proxy start logic
2014-11-05 11:41:15 -08:00
Jonathan Boulle
b85496922f
etcdmain: simplify proxy start logic
2014-11-05 11:41:03 -08:00
Jonathan Boulle
89eac70d09
proxy: add docstrings
2014-11-05 10:30:05 -08:00
Jonathan Boulle
58b171b3e5
Merge pull request #1610 from jonboulle/discovery_docs
...
discovery: add clarifying docstrings
2014-11-04 19:38:59 -08:00
Jonathan Boulle
bb84aaebaf
discovery: add clarifying docstrings
2014-11-04 17:02:33 -08:00
Jonathan Boulle
ab00d23cd3
Merge pull request #1608 from jonboulle/flags
...
pkg: move to more generic StringsFlag
2014-11-04 16:53:48 -08:00
Jonathan Boulle
5de9d38cc6
pkg: move to more generic StringsFlag
2014-11-04 16:52:56 -08:00
Jonathan Boulle
d36f09d643
Merge pull request #1602 from jonboulle/bump_timeout
...
integration: bump timeout for good path
2014-11-04 16:52:44 -08:00
Xiang Li
f71c247d87
Merge pull request #1604 from xiangli-cmu/fallback_proxy
...
*: support discovery fallback
2014-11-04 16:41:28 -08:00
Xiang Li
71acd0c3d0
discovery: consolidate proxyDiscover and Discover interface
2014-11-04 16:38:05 -08:00
Jonathan Boulle
288624550e
Merge pull request #1581 from jonboulle/log_changes
...
No logs when members added/removed from cluster
2014-11-04 15:13:12 -08:00
Jonathan Boulle
e4d0c25365
etcdserver: log adding and removing nodes
2014-11-04 15:05:15 -08:00
Jonathan Boulle
c628d7f412
Merge pull request #1601 from jonboulle/client
...
client: return ErrNoEndpoint when none available
2014-11-04 14:58:22 -08:00
Xiang Li
5cb13fd071
*: support discovery fallback
2014-11-04 14:30:22 -08:00
Jonathan Boulle
9e001dee29
Merge pull request #1603 from jonboulle/typo
...
etcdhttp: fix typo in test comment
2014-11-04 13:18:12 -08:00
Yicheng Qin
4d40816a90
etcdserver: refactor non-blocking check for sync tests
...
to make it much more reliable and avoid false errors.
2014-11-04 13:07:44 -08:00
Jonathan Boulle
0f7add9722
etcdhttp: fix typo in test comment
2014-11-04 12:57:59 -08:00
Jonathan Boulle
9f29545f66
integration: bump timeout for good path
...
When waiting for a watch result, we expect the good path to complete
quickly here so we don't need to time out so aggressively. (Failure
noted in #1600 )
2014-11-04 12:55:40 -08:00
Jonathan Boulle
45b7c9a4ac
client: return ErrNoEndpoint when none available
...
In certain cases (for example, if a cluster peer is accessible but it
has no members listed), the httpClusterClient could have an empty set of
endpoints as a result of the Sync. This means that its Do function could
potentially return a nil response and nil error, with catastrophic
consequences for callers.
To be safe (particularly about this latter behaviour), this change
errors in both Sync and Do if no endpoints are available.
2014-11-04 12:51:43 -08:00
Brandon Philips
34dabe281b
Merge pull request #1591 from philips/application-json-errors
...
error: use application/json as the content-type
2014-11-04 12:31:06 -08:00
Brandon Philips
5fbef59dbc
error: use application/json as the content-type
...
Fixes #1584
2014-11-04 12:08:18 -08:00
Jonathan Boulle
915f8f4822
Merge pull request #1531 from jonboulle/410_gone
...
return 410 Gone for member that has been removed in /v2/members -XDELETE
2014-11-04 11:54:01 -08:00
Jonathan Boulle
cedcc0d8df
etchttp: return 410 gone for permanently removed members
2014-11-04 11:21:24 -08:00
Yicheng Qin
ac49e1d50f
Merge pull request #1594 from unihorn/201
...
etcdhttp/etcdserver: support HEAD on /v2/keys/ namespace
2014-11-04 00:11:47 -08:00
Yicheng Qin
866ec5948c
etcdhttp/etcdserver: support HEAD on /v2/keys/ namespace
2014-11-04 00:06:49 -08:00
Jonathan Boulle
aa5711bd0f
Merge pull request #1595 from jonboulle/header
...
*: add copyright header to remaining files
2014-11-03 23:42:14 -08:00
Jonathan Boulle
f7434b55e5
*: add copyright header to remaining files
2014-11-03 23:29:15 -08:00
Yicheng Qin
2235b47030
Merge pull request #1545 from unihorn/197
...
etcdhttp: always respond json-format error to client
2014-11-03 23:25:14 -08:00
Xiang Li
5ead800ff5
Merge pull request #1572 from xiangli-cmu/raft_test
...
raft: add paper tests for section 5.4.1
2014-11-03 22:37:26 -08:00
Yicheng Qin
e4b12a8e28
Merge pull request #1593 from unihorn/200
...
etcdserver: print out initial cluster members
2014-11-03 22:23:40 -08:00
Yicheng Qin
9aefb91531
etcdhttp: always respond json-format error to client
2014-11-03 22:19:17 -08:00
Yicheng Qin
5ed5d44652
etcdserver: print out initial cluster members
...
It is moved from etcdmain pkg because the line should only be printed out
when etcd bootstraps at the first time.
2014-11-03 19:34:24 -08:00
Kelsey Hightower
cc0ef16346
docs: clean up other apis
...
The docs for the other APIs use curl for example usage, which matches
the docs for the etcd APIs.
Other cleanup include fixing usage of peer ports and using 10.0.0.x IPs
throughout.
2014-11-03 17:14:08 -08:00
Jonathan Boulle
a272f5d7e3
Merge pull request #1592 from jonboulle/integration_tests
...
integration: add keys API integration tests
2014-11-03 16:31:59 -08:00
Jonathan Boulle
63cf0b9d90
integration: add keys API integration tests
2014-11-03 16:30:29 -08:00
Jonathan Boulle
ab69c2adbd
etcdhttp: use EcodePrevValueRequired when appropriate
2014-11-03 16:12:50 -08:00
Xiang Li
075ab6415f
Merge pull request #1587 from xiangli-cmu/fix_wal
...
wal: sync before returning from create
2014-11-03 15:58:47 -08:00
Xiang Li
dd09042632
etcdserver: try to listen on ports before initializing etcd server
2014-11-03 15:55:58 -08:00
Xiang Li
165ac654e8
raft: add paper tests for section 5.4.1
2014-11-03 15:50:56 -08:00
Xiang Li
dbdeceda7b
raft: do not load empty state and ents
2014-11-03 15:16:41 -08:00
Xiang Li
ff1f5a9d57
wal: sync before returning from create
2014-11-03 14:28:59 -08:00
Brian Waldon
d1ec13210f
Merge pull request #1571 from bcwaldon/client-redirects
...
client: follow redirects
2014-11-03 14:26:20 -08:00
Brandon Philips
2ba02c04be
Merge pull request #1576 from coreos/print-initial-cluster-members
...
etcd: print initial cluster members during startup
2014-11-03 14:24:33 -08:00
Brian Waldon
6dd4944e62
client: follow redirects
2014-11-03 12:15:16 -08:00
Yicheng Qin
5da481213e
Merge pull request #1478 from unihorn/190
...
etcdserver: panic on storage error
2014-11-03 11:07:55 -08:00
Yicheng Qin
433b4138c5
etcdserver: panic on storage error
...
It is a critical error to etcd, and etcd is not able to recover it now.
2014-11-03 10:46:04 -08:00
Brian Waldon
729770f32a
Merge pull request #1570 from bcwaldon/client-endpoints
...
client: use all endpoints
2014-11-03 10:44:09 -08:00
Kelsey Hightower
3ec4da6ac6
etcd: print initial cluster members during startup
...
etcd now prints the initial clusters members during startup.
```
2014/11/03 10:32:46 etcd: initial cluster members: etcd0=http://127.0.0.1:2380,etcd1=http://127.0.0.1:2390,etcd2=http://127.0.0.1:2400
```
2014-11-03 10:38:18 -08:00
Xiang Li
9df06bfa94
Merge pull request #1579 from coreos/cleanup-clustering-doc
...
docs: clean up clustering doc
2014-11-03 10:25:04 -08:00
Kelsey Hightower
20df86e3c3
docs: clean up clustering doc
2014-11-03 09:51:50 -08:00
Xiang Li
6433be5738
Merge pull request #1575 from coreos/improve-admin-docs
...
docs: fix usage of peers urls
2014-11-02 22:56:23 -08:00
Kelsey Hightower
3068340a83
docs: fix usage of peers urls
2014-11-02 22:00:41 -08:00
Brian Waldon
da6827f09e
client: use all endpoints
2014-10-31 20:51:47 -07:00
Brian Waldon
75104c10d4
Merge pull request #1553 from bcwaldon/client-sync
...
Support syncing and `--no-sync` flag in `etcdctl member` commands
2014-10-31 20:51:01 -07:00
Brian Waldon
58af26736c
client: further clarify external interfaces
2014-10-31 20:45:55 -07:00
Brian Waldon
17c6f21d68
client: elevate context to caller of KeysAPI
2014-10-31 17:27:43 -07:00
Brian Waldon
f0760d6246
client: elevate context to caller of MembersAPI
2014-10-31 17:27:42 -07:00
Brian Waldon
913d102a81
client: remove unused field
2014-10-31 17:25:05 -07:00
Brian Waldon
824049897d
client: export necessary interfaces/methods
2014-10-31 17:25:05 -07:00
Brian Waldon
b47631b38f
etcdctl: respect --no-sync in member subcommands
2014-10-31 17:25:05 -07:00
Brian Waldon
22b86684f0
etcdctl: sync before running member subcommands
2014-10-31 17:25:05 -07:00
Brian Waldon
5ed5d018be
client: add httpClusterClient.Sync
2014-10-31 17:25:05 -07:00
Brian Waldon
f6e8b677cf
client: pass httpActionDo into NewMembersAPI
2014-10-31 17:25:05 -07:00
Brian Waldon
0ef270c25c
client: pass httpActionDo into New[Discovery]KeysAPI
2014-10-31 17:25:05 -07:00
Brian Waldon
1130273178
client: s/newHTTPClusterClient/NewHTTPClient/
2014-10-31 17:25:05 -07:00
Brian Waldon
3eb126af4d
client: use httpActionDo in httpClusterClient
2014-10-31 17:25:05 -07:00
Brian Waldon
c282664c23
client: s/transport/CancelableTransport/
...
CancelableTransport is implemented by callers of the
client pkg, so we should export it so it is
documented publicly.
2014-10-31 17:25:04 -07:00
Brian Waldon
d52d836761
client: return full http.Response in httpActionDo
2014-10-31 17:25:04 -07:00
Yicheng Qin
5bdf6a4110
Merge pull request #1528 from unihorn/191
...
raft: add tests based on section 5.3 in raft paper
2014-10-31 16:35:36 -07:00
Yicheng Qin
421d5fbe72
raft: add tests based on section 5.3 in raft paper
2014-10-31 16:32:34 -07:00
Brian Waldon
f35130a0ed
etcdctl: clean up formatting of member add
2014-10-31 15:37:08 -07:00
Brandon Philips
500e9e2212
version: bump to v0.5.0-alpha.1
2014-10-31 15:22:13 -07:00
Brandon Philips
7c52a86325
Merge pull request #1569 from philips/dynamic-configuration-docs
...
Documentation: add the runtime configuration document
2014-10-31 15:19:42 -07:00
Brandon Philips
124dd7096a
Documentation: add the runtime configuration document
2014-10-31 15:16:45 -07:00
Brandon Philips
388b4aeb71
Merge pull request #1568 from philips/dynamic-configuration
...
etcdctl: two member fixes
2014-10-31 15:08:40 -07:00
Brandon Philips
6b4485d1ae
etcdctl: take a name and print out the initial cluster
...
To help the user lets print out the configuration that they will need to give
to their new member:
$ etcdctl member add infra4 http://localhost:7004
added member 9bf1b35fc7761a23 to cluster
ETCD_NAME="infra4"
ETCD_INITIAL_CLUSTER="node2=http://localhost:7002,node3=http://localhost:7003,infra4=http://localhost:7004,node1=http://localhost:7001 "
This is a little weird because the API doesn't take a name so the user gives us
a name and we just pass it on through.
2014-10-31 15:05:23 -07:00
Yicheng Qin
74886713db
Merge pull request #1567 from unihorn/199
...
*: name node{1,2,3} -> infra{1,2,3}
2014-10-31 14:53:34 -07:00
Brandon Philips
8f3be206ed
etcdctl: add help on the members subcommands
2014-10-31 14:50:23 -07:00
Yicheng Qin
1db23109ad
*: name node{1,2,3} -> infra{1,2,3}
...
Be consistent with the naming in documentations.
2014-10-31 14:46:39 -07:00
Jonathan Boulle
749097429f
Merge pull request #1565 from jonboulle/int
...
integration: clean up licenses and docs
2014-10-31 14:34:05 -07:00
Jonathan Boulle
34b2fecd28
integration: clean up licenses and docs
2014-10-31 14:33:56 -07:00
Brandon Philips
faede90293
Merge pull request #1556 from philips/fixup-the-admin-guide
...
Documentation: fixup the admin_guide
2014-10-31 14:11:39 -07:00
Brandon Philips
b6cc34b52e
Documentation: fixup the admin_guide
...
- Provide more concrete examples and explanation
- Cleanup the formatting to one sentence per line, this makes reviewing
easier
- Point to existing docs on wal and snap instead of trying to duplicate
it here again.
2014-10-31 14:11:27 -07:00
Brian Waldon
308b8796e4
Merge pull request #1557 from bcwaldon/id-logging
...
etcdserver: fix logging of IDs
2014-10-31 12:27:37 -07:00
Brian Waldon
6e038e02a6
etcdserver: fix logging of IDs
2014-10-31 12:26:53 -07:00
Brian Waldon
38250d3fac
Merge pull request #1541 from bcwaldon/client-peers
...
Use `-peers` in `etcdctl members` commands
2014-10-31 12:26:15 -07:00
Brian Waldon
eab4692744
client: use v2MembersURL helper
2014-10-31 12:21:15 -07:00
Brian Waldon
f0c3385cfc
etcdctl: wire up --peers for member commands
2014-10-31 12:21:15 -07:00
Brian Waldon
8b8b3efdaa
client: accept slice of endpoints
2014-10-31 12:21:15 -07:00
Brian Waldon
8d519ffdb8
client: introduce httpClusterClient
2014-10-31 12:21:15 -07:00
Brian Waldon
323fb1ec85
client: introduce httpActionDo interface
2014-10-31 12:21:15 -07:00
Brian Waldon
9d07db4432
client: move timeout into caller of httpClient
2014-10-31 12:21:15 -07:00
Brian Waldon
7c1f4a9baf
client: explicitly carry API prefix around
2014-10-31 12:21:15 -07:00
Brian Waldon
dee912f2fd
etcdctl: break out mustNewMembersAPI
2014-10-31 12:21:08 -07:00
Brian Waldon
bc62b05c7f
etcdctl: break out getPeersFlagValue
2014-10-31 12:21:00 -07:00
Brian Waldon
48ec876af9
godep: bump github.com/codegangsta/cli
2014-10-31 12:21:00 -07:00
Xiang Li
a576dbca43
Merge pull request #1554 from xiangli-cmu/removed_logging
...
etcdserver: better logging when member is removed
2014-10-31 12:07:57 -07:00
Xiang Li
eb472b7745
etcdserver: better logging when member is removed
2014-10-31 12:00:50 -07:00
Brandon Philips
a535161a84
Merge pull request #1552 from philips/fixup-wal-doc
...
wal: update the docs to show the optional metadata field
2014-10-31 11:32:26 -07:00
Brandon Philips
513c72ec8b
wal: update the docs to show the optional metadata field
2014-10-31 11:32:17 -07:00
Yicheng Qin
e02ef6b141
Merge pull request #1546 from unihorn/198
...
etcdserver: better logging for assign ids from upstream
2014-10-31 11:13:43 -07:00
Yicheng Qin
2c5f062b7f
etcdserver: better logging for assign ids from upstream
2014-10-31 11:06:31 -07:00
Jonathan Boulle
1bb07115f2
Merge pull request #1550 from jonboulle/bump_timeout
...
etcdhttp: bump default Server timeout to 5 mins
2014-10-31 11:05:44 -07:00
Jonathan Boulle
9726d3909c
etcdhttp: bump default Server timeout to 5 mins
2014-10-31 10:52:46 -07:00
Jonathan Boulle
c53e58e97c
Merge pull request #1309 from jonboulle/1309_standard_id
...
standardize ID serialization
2014-10-31 10:50:32 -07:00
Jonathan Boulle
55c92ad456
*: create ID type
...
This creates a simple ID type (wrapped around uint64) to provide for
standard serialization/deserialization to a string (i.e. base 16
encoded). This replaces strutil so now that package is removed.
2014-10-31 10:34:07 -07:00
Yicheng Qin
781abc1db0
Merge pull request #1539 from unihorn/195
...
*: clean log.Print
2014-10-30 18:18:35 -07:00
Yicheng Qin
aa50af1c69
*: clean log.Print
...
1. only log things by default that the operator of etcd may need to react to
2. put package name at the head of log lines
2014-10-30 18:15:53 -07:00
Xiang Li
7f29045c0f
Merge pull request #1543 from xiangli-cmu/fix_logging
...
etcdserver: fix sender logging
2014-10-30 18:13:16 -07:00
Xiang Li
0f8b035253
etcdserver: fix sender logging
2014-10-30 18:00:00 -07:00
Xiang Li
42a7c928d4
Merge pull request #1542 from xiangli-cmu/fix_logging
...
etcdhttp: fix logging in raft handler
2014-10-30 17:41:47 -07:00
Xiang Li
02ff59514f
etcdhttp: fix logging in raft handler
2014-10-30 17:39:01 -07:00
Xiang Li
9a56001d63
Merge pull request #1537 from xiangli-cmu/cluster-token
...
Cluster token
2014-10-30 17:09:25 -07:00
Xiang Li
8e633db5cb
doc: add doc for initial-cluster-token
2014-10-30 17:08:15 -07:00
Brian Waldon
64a12e9341
Merge pull request #1511 from coreos/set-watch-consistency-to-strong
...
etcdctl: Set watch consistency to STRONG
2014-10-30 16:52:50 -07:00
Yicheng Qin
ac71ad92af
Merge pull request #1452 from unihorn/187
...
etcdserver: exit program when node is removed
2014-10-30 15:32:26 -07:00
Yicheng Qin
ed30b6deca
etcdserver: exit program when node is removed
...
Originally added in 400dd2d7bc
,
and removed by mistake when refactor cluster.
2014-10-30 15:31:58 -07:00
Brian Waldon
76298ebcd8
Merge pull request #1534 from bcwaldon/client-tests
...
client: test assertStatusCode
2014-10-30 13:50:21 -07:00
Brian Waldon
d36a3e18d2
etcdctl: remove SetConsistency call
...
This call to SetConsistency is explicitly setting the default
value, so it's really unnecessary.
2014-10-30 13:45:59 -07:00
Xiang Li
3dfb6723b2
*: rename initial-cluster-name to initial-cluster-token
2014-10-30 13:43:38 -07:00
Brian Waldon
6087e2b2f6
Merge pull request #1509 from bcwaldon/etcdctl-102
...
etcdctl: add --sort flag to ls command
2014-10-30 13:33:37 -07:00
Brian Waldon
6e8de1f426
Merge pull request #1508 from bcwaldon/etcdctl-96
...
etcdctl: add -p to ls command
2014-10-30 13:33:30 -07:00
Brian Waldon
052521eaf1
client: test assertStatusCode
2014-10-30 11:46:44 -07:00
Xiang Li
549c643bfe
Merge pull request #1530 from xiangli-cmu/discovery_doc
...
doc: add a Custom etcd discovery service section
2014-10-30 11:40:23 -07:00
Xiang Li
af7d73717c
doc: add a Custom etcd discovery service section
2014-10-30 11:34:46 -07:00
Xiang Li
816c173edf
Merge pull request #1526 from xiangli-cmu/leader_log
...
raft: better logging for leader transition
2014-10-30 10:13:58 -07:00
Jonathan Boulle
9359a57211
Merge pull request #1523 from jonboulle/raft_stuff
...
raft: minor cleanup in comments
2014-10-30 10:01:59 -07:00
Jonathan Boulle
b99633207c
raft: minor cleanup in comments
2014-10-30 10:01:44 -07:00
Jonathan Boulle
4f6206bf65
Merge pull request #1522 from jonboulle/raft_tests
...
raft: add tests for progress.maybeDecr
2014-10-30 10:00:01 -07:00
Jonathan Boulle
bf44219766
Merge pull request #1492 from jonboulle/1492_nonexistent_member
...
Attempting to remove nonexistent member mishandled
2014-10-30 09:58:02 -07:00
Jonathan Boulle
19881b2f15
etcdhttp: return 404 when removing nonexistent member
2014-10-30 09:57:54 -07:00
Xiang Li
46ebf69c02
raft: better logging for leader transition
2014-10-30 09:33:38 -07:00
Jonathan Boulle
0cf0cb3d02
raft: add tests for progress.maybeDecr
2014-10-29 22:57:25 -07:00
Jonathan Boulle
83ca16188c
Merge pull request #1417 from jonboulle/master
...
RFC: move main logic to etcd subpackage
2014-10-29 18:47:42 -07:00
Jonathan Boulle
cf9dd31daa
etcd: move main logic to etcdmain subpackage
2014-10-29 18:43:22 -07:00
Xiang Li
38617f5c9b
Merge pull request #1510 from xiangli-cmu/fix_discovery
...
discovery: fix discovery for not working on customized discovery service
2014-10-29 18:33:06 -07:00
Xiang Li
027e944985
discovery: fix discovery for not working on customized discovery service
2014-10-29 18:30:59 -07:00
micahhausler
2be3f870cc
etcdctl: Set watch consistency to STRONG
2014-10-29 18:11:05 -07:00
Brian Waldon
ba38847bdd
Merge pull request #1507 from bcwaldon/doc-fix
...
doc: link directly to members API
2014-10-29 18:01:27 -07:00
Pierre Phaneuf
97597eca03
etcdctl: add --sort flag to ls command
...
This is a port of coreos/etcdctl#102
2014-10-29 17:45:11 -07:00
Brian Waldon
243886edc8
etcdctl: add -p to ls command
...
This is a port of coreos/etcdctl#96
2014-10-29 17:42:21 -07:00
Brian Waldon
f61824ce01
Merge pull request #1500 from bcwaldon/client-tests
...
Add tests for client pkg
2014-10-29 17:26:26 -07:00
Brian Waldon
ac810b86bc
doc: link directly to members API
2014-10-29 17:21:10 -07:00
Xiang Li
e85ba2f384
Merge pull request #1504 from xiangli-cmu/admin_guide
...
doc: add a doc for data directory
2014-10-29 17:16:27 -07:00
Xiang Li
f5c1da6967
doc: add a doc for data directory
2014-10-29 17:07:21 -07:00
Yicheng Qin
0f51cbde6c
Merge pull request #1502 from unihorn/192
...
store: copy Nodes correctly in NodeExtern.Clone
2014-10-29 16:57:04 -07:00
Yicheng Qin
a910d8ba9f
store: copy Nodes correctly in NodeExtern.Clone
2014-10-29 16:54:09 -07:00
Brian Waldon
d756dd2079
client: test membersAPIActionRemove
2014-10-29 16:42:16 -07:00
Brian Waldon
5264c05ddb
client: clean up style of TestMembersAPIActionList
2014-10-29 16:42:16 -07:00
Brian Waldon
4e759b46ce
client: use httptypes.MemberCreateRequest in member add
2014-10-29 16:42:14 -07:00
Brian Waldon
011a67c878
httptypes: add MemberCreateRequest.MarshalJSON
2014-10-29 16:37:07 -07:00
Brian Waldon
e457d52f5c
client: log incorrect HTTP resp body as string
2014-10-29 16:37:07 -07:00
Yicheng Qin
ccca32b138
Merge pull request #1497 from unihorn/189
...
raft: add tests based on section 5.1 in raft paper
2014-10-29 16:35:25 -07:00
Yicheng Qin
dabb5c150d
raft: add tests based on section 5.1 in raft paper
2014-10-29 16:22:17 -07:00
Brian Waldon
b7b3bf40e0
Merge pull request #1501 from bcwaldon/rename-members-tests
...
etcdhttp: s/TestServeAdminMembers*/TestServeMembers*/
2014-10-29 16:21:16 -07:00
Brian Waldon
2c0f6e4bf9
etcdhttp: s/TestServeAdminMembers*/TestServeMembers*/
2014-10-29 16:18:03 -07:00
Brian Waldon
3f6e584702
Merge pull request #1499 from bcwaldon/client_clean
...
client: pass around statuscode instead of Response
2014-10-29 15:51:58 -07:00
Jonathan Boulle
97c23c4333
client: pass around statuscode instead of Response
...
There's no real need for do and doWithTimeout to return Responses when
the only field of interest is the status code.
This also removes the superfluous httpMembersAPIResponse struct.
2014-10-29 15:47:55 -07:00
Brian Waldon
95231c1278
Merge pull request #1493 from bcwaldon/etcdctl-members
...
etcdctl members [list|add|remove]
2014-10-29 15:44:30 -07:00
Brian Waldon
f810dda9b2
Merge pull request #1481 from bcwaldon/no-more-admin-api
...
Remove "admin" from /v2/admin/members
2014-10-29 15:43:37 -07:00
Brian Waldon
f6e242aa01
etcdctl: impl members commands
2014-10-29 15:09:23 -07:00
Brian Waldon
8b12e1aa37
client: fill in MembersAPI
2014-10-29 15:03:22 -07:00
Xiang Li
b59961228b
Merge pull request #1495 from xiangli-cmu/fix_raft_test
...
raft: fix a incorrect in testMaybeAppend
2014-10-29 15:03:13 -07:00
Xiang Li
738da2b3fa
raft: fix a incorrect in testMaybeAppend
2014-10-29 14:57:39 -07:00
Brian Waldon
de0cf2fb8e
Merge pull request #1459 from bcwaldon/member-list
...
etcdhttp: encode MembersCollection properly
2014-10-29 14:49:22 -07:00
Jonathan Boulle
4b1431109e
Merge pull request #1490 from jonboulle/1490
...
Logging member ID as int
2014-10-29 14:42:02 -07:00
Xiang Li
6375bd7960
Merge pull request #1469 from xiangli-cmu/raft_log_test
...
raft: add tests for maybeappend
2014-10-29 14:36:07 -07:00
Jonathan Boulle
e99da41539
etcdserver: log member ID as hex string
2014-10-29 14:36:05 -07:00
Xiang Li
14f4163e41
raft: add several test cases for testMaybeAppend
2014-10-29 14:35:13 -07:00
Jonathan Boulle
5bba81f5fc
Merge pull request #1472 from jonboulle/clone_event
...
waitIndex is not working
2014-10-29 14:23:32 -07:00
Jonathan Boulle
a59e8cf1a6
Merge pull request #1487 from jonboulle/peerurls
...
etcdserver: make peer URLs log message more readable
2014-10-29 14:23:25 -07:00
Jonathan Boulle
9546df9a6c
etcdserver: make peer URLs log message more readable
2014-10-29 14:18:51 -07:00
Jonathan Boulle
f7631be453
Merge pull request #1485 from jonboulle/raft_clean
...
raft: move test helper function into tests
2014-10-29 14:06:39 -07:00
Jonathan Boulle
81304b2b7e
raft: move test helper function into tests
2014-10-29 14:04:45 -07:00
Brian Waldon
8298e06627
doc: remove trailing slashes
2014-10-29 12:16:02 -07:00
Brian Waldon
ab67fa4cc6
api: remove admin prefix from members API
2014-10-29 12:12:51 -07:00
Brian Waldon
bab19e3b0b
doc: move admin_api.md to other_apis.md
2014-10-29 12:12:51 -07:00
Brian Waldon
d3bafd6aa4
etcdhttp: encode MembersCollection properly
2014-10-29 12:06:22 -07:00
Jonathan Boulle
84be7c1e9e
etcdserver/store: clone Events before modifying
2014-10-29 11:54:35 -07:00
Xiang Li
ad1718a3e5
raft: add a test case for testLogMaybeAppend
2014-10-29 11:44:18 -07:00
Yicheng Qin
35bba87d2a
Merge pull request #1471 from unihorn/189
...
raft: add tests based on section 5.2 in raft paper
2014-10-29 10:49:23 -07:00
Yicheng Qin
bffe611fe6
raft: add tests based on section 5.2 in raft paper
2014-10-29 10:17:09 -07:00
Kelsey Hightower
6bcfa2b05d
Merge pull request #1475 from bketelsen/patch-1
...
Add Skydns, crypt, viper
2014-10-29 08:55:09 -07:00
Brian Ketelsen
3857e92cad
Add Skydns, crypt, viper
...
Added a plethora of tools we've written or contributed to that use etcd.
2014-10-29 09:09:31 -04:00
Brian Waldon
04e56a454e
Merge pull request #1465 from bcwaldon/member-post
...
Clean up POST /v2/admin/members
2014-10-28 17:08:30 -07:00
Brian Waldon
658a84312b
Merge pull request #1464 from bcwaldon/error-ctype
...
Set Content-Type before calling WriteHeader
2014-10-28 15:48:23 -07:00
Jonathan Boulle
ae7280dcf3
Merge pull request #1466 from jonboulle/errors
...
main: catch a few unhandled errors
2014-10-28 15:43:57 -07:00
Xiang Li
c6873c1eab
raft: add tests for maybeappend
2014-10-28 15:07:49 -07:00
Jonathan Boulle
a96f5ab146
main: catch a few unhandled errors
...
If any of this initialization fails, something very bad has happened,
and we should not continue as-is (this has previously manifested in
strange bugs)
2014-10-28 11:18:22 -07:00
Brian Waldon
6f851ac885
httptypes: set headers before call to WriteHeader
2014-10-28 11:08:10 -07:00
Brian Waldon
2b4201c53d
httptypes: test HTTPError
2014-10-28 10:59:53 -07:00
Brian Waldon
57d447fef6
Merge pull request #1463 from bcwaldon/writeError-logging
...
etcdhttp: only log when error deserves it
2014-10-28 10:45:55 -07:00
Brian Waldon
c07b9ae32e
etcdhttp: 415 when content-type not JSON
2014-10-28 10:38:09 -07:00
Brian Waldon
8fbf887e52
etcdhttp: only log when error deserves it
2014-10-28 10:30:05 -07:00
Brian Waldon
d1fb732e63
etcdhttp: properly serialize Member on POST
2014-10-28 10:21:11 -07:00
Brian Waldon
8b0eaa9e15
etcdhttp: separate member create deserialization
2014-10-28 10:09:05 -07:00
Brian Waldon
ad0664da9c
doc: fix documentation of POST /v2/admin/members
2014-10-28 09:44:59 -07:00
Brian Waldon
b6b5081254
Merge pull request #1450 from bcwaldon/raft-logging
...
raft: stop logging IDs with 0x prefix
2014-10-28 08:17:11 -07:00
Brian Waldon
6796669484
raft: stop logging IDs with 0x prefix
2014-10-27 18:56:13 -07:00
Brian Waldon
87327a245d
Merge pull request #1448 from bcwaldon/member-URLs
...
fix usage of copy in newMemberCollection
2014-10-27 18:43:33 -07:00
Brian Waldon
e08c2bbe3e
Merge pull request #1449 from bcwaldon/id-to-hex
...
Move ID*Hex functions to pkg/strutil
2014-10-27 18:43:00 -07:00
Brian Waldon
8d052dd374
etcdhttp: copy Member URLs properly
2014-10-27 18:39:33 -07:00
Brian Waldon
480e92d340
strutil: move IDAsHex/IDFromHex to new pkg
2014-10-27 18:39:09 -07:00
Brian Waldon
dad7500d13
Merge pull request #1443 from bcwaldon/member-ID
...
Serialize member ID in API
2014-10-27 18:38:53 -07:00
Brandon Philips
d55546d62e
Merge pull request #1446 from philips/add-quay-badge
...
README: add the quay badge to the official git builds
2014-10-27 17:40:50 -07:00
Brandon Philips
acd8eecd4e
README: add the quay badge to the official git builds
2014-10-27 17:39:16 -07:00
Kelsey Hightower
2d31e5ab56
Merge pull request #1441 from philips/add-root-dockerfile
...
Dockerfile: initial commit
2014-10-27 17:27:57 -07:00
Brian Waldon
2472953939
etcdhttp: hex-encode member ID
2014-10-27 17:25:22 -07:00
Brian Waldon
80172c3d4a
etcdserver: s/parseMemberID/mustParseMemberIDFromKey/
2014-10-27 17:25:00 -07:00
Xiang Li
b316c6b002
Merge pull request #1435 from xiangli-cmu/json
...
etcdhttp: make admin HTTP endpoint return json format error
2014-10-27 17:07:58 -07:00
Xiang Li
6cb45236ac
etcdhttp: make admin HTTP endpoint return json format error
2014-10-27 17:03:58 -07:00
Xiang Li
04b5853261
Merge pull request #1439 from kelseyhightower/check-data-dir-permissions
...
etcd: ensure data dir is writable
2014-10-27 16:57:19 -07:00
Kelsey Hightower
b1731f0843
etcd: ensure data dir is writable
...
etcd checks that the data dir is writable by writing and removing an
empty file to the data dir during startup and exits non-zero if that
fails.
fixes #876
2014-10-27 16:52:05 -07:00
Brian Waldon
36cacb8bd8
Merge pull request #1429 from coreos/1392
...
Fix #1392
2014-10-27 16:50:46 -07:00
Jonathan Boulle
e849d8e157
etcdhttp: DELETE on members = MethodNotAllowed
2014-10-27 16:49:04 -07:00
Jonathan Boulle
387639e802
etcdserver/etcdhttp: treat /v2/admin/members and /v2/admin/members/ equally
2014-10-27 16:49:03 -07:00
Brandon Philips
3e234918ee
Dockerfile: initial commit
2014-10-27 16:43:27 -07:00
Brandon Philips
0ce78d7a9c
Merge pull request #1431 from philips/build-release-script
...
scripts: import script from 0.5 release
2014-10-27 16:42:30 -07:00
Brandon Philips
52350d1d2f
Merge pull request #1433 from philips/add-build-docker-script
...
scripts: build-docker
2014-10-27 16:42:11 -07:00
Xiang Li
7384ee39a6
Merge pull request #1436 from xiangli-cmu/writeTo
...
error: write->writeTo
2014-10-27 15:34:17 -07:00
Xiang Li
d0604c7d5c
error: write->writeTo
2014-10-27 15:32:36 -07:00
Xiang Li
74c257f63d
Merge pull request #1419 from xiangli-cmu/raft_log_test
...
raft: add test for findConflict
2014-10-27 14:30:36 -07:00
Xiang Li
460d6490ba
raft: address issues in comments
2014-10-27 14:20:42 -07:00
Yicheng Qin
60cb18b6c2
Merge pull request #1432 from unihorn/187
...
raft: use raft-specific rand.Rand instead of global one
2014-10-27 14:15:58 -07:00
Brandon Philips
e8302c8413
scripts: build-docker
...
Build docker images from the release tarballs. The default CMD is
etcd.
2014-10-27 12:34:51 -07:00
Yicheng Qin
b986a52579
raft: use raft-specific rand.Rand instead of global one
2014-10-27 12:32:11 -07:00
Brandon Philips
538ce935f0
scripts: import script from 0.5 release
...
It isn't pretty but this was the tool used to build the zip and tar
files for 0.5
2014-10-27 12:18:24 -07:00
Brian Waldon
94e4595af5
Merge pull request #1427 from bcwaldon/members-serialization
...
Centralize Members serialization
2014-10-27 11:33:39 -07:00
Brian Waldon
753bc5e166
httptypes: add doc.go
2014-10-27 11:22:47 -07:00
Brian Waldon
80ca168cbe
client: simplify MembersAPI response parsing
2014-10-27 11:22:47 -07:00
Brian Waldon
14795d8ed9
httptypes: use MemberCollection for JSON (de)serialization
2014-10-27 11:22:47 -07:00
Brian Waldon
7545152318
httptypes: use []string for Member URLs
2014-10-27 11:22:47 -07:00
Brian Waldon
54a2d8ffc9
client: move Member models to new types pkg
2014-10-27 11:22:46 -07:00
Yicheng Qin
ee27846d5b
Merge pull request #1422 from unihorn/187
...
etcdserver: parse context error for better message
2014-10-27 11:00:01 -07:00
Yicheng Qin
e77f8e311c
etcdserver: parse context error for better message
2014-10-27 10:59:15 -07:00
Jonathan Boulle
585881a870
Merge pull request #1428 from jonboulle/subpackages
...
pkg: move everything into subpackages
2014-10-27 10:32:11 -07:00
Xiang Li
9964bfa6b9
Merge pull request #1426 from xiangli-cmu/clusterid
...
etcdhttp: attach clusterID to key and adminMember endpoint
2014-10-27 10:16:16 -07:00
Jonathan Boulle
6e6d1897d8
pkg: move everything into subpackages
2014-10-27 09:57:28 -07:00
Brian Waldon
328d8f2d26
Merge pull request #1424 from bcwaldon/pkg-readme
...
pkg: add README.md
2014-10-27 09:13:26 -07:00
Xiang Li
6f792354ca
etcdhttp: attach clusterID to key and adminMember endpoint
2014-10-27 07:52:39 -07:00
Xiang Li
40048d7300
Merge pull request #1420 from xiangli-cmu/clean_log
...
raft: remove unused code
2014-10-26 20:14:05 -07:00
Xiang Li
000962d689
Merge pull request #1421 from xiangli-cmu/logging
...
*: better logging
2014-10-26 20:13:55 -07:00
Brian Waldon
444e6e952b
pkg: add README.md
2014-10-26 16:28:48 -07:00
Brian Waldon
f9af07eb5b
Merge pull request #1423 from bcwaldon/http-refactor-hdlrs
...
eradicate serverHandler
2014-10-26 14:44:30 -07:00
Brian Waldon
b06499d0c2
etcdserver/etcdhttp: break apart HTTP handlers
2014-10-26 13:20:53 -07:00
Brian Waldon
4b77082b6e
Merge pull request #1415 from bcwaldon/http-refactor
...
etcdserver/etcdhttp: break apart http.go
2014-10-26 12:39:22 -07:00
Xiang Li
009b737cef
*: better logging
2014-10-26 08:13:03 -07:00
Xiang Li
94f701cf95
raft: refactor isUpToDate and add a test
2014-10-25 20:34:14 -07:00
Xiang Li
8cd95e916d
raft: comments for isUpToDate
2014-10-25 20:12:54 -07:00
Xiang Li
86c66cd802
raft: remove unused code
2014-10-25 19:56:13 -07:00
Xiang Li
90f26e4a56
raft: add test for findConflict
2014-10-25 18:58:11 -07:00
Brian Waldon
73215447c1
Merge pull request #1414 from bcwaldon/client-members-API
...
Add MembersAPI w/ List method
2014-10-25 11:33:42 -07:00
Brian Waldon
cba19e348f
client: MembersAPI.List
2014-10-25 11:30:15 -07:00
Brian Waldon
435611cf0d
etcdserver/etcdhttp: break apart http.go
2014-10-25 11:28:52 -07:00
Brian Waldon
00dcbf8bf7
client: unexport HTTPKeysAPI
2014-10-25 08:58:25 -07:00
Brian Waldon
73e48068c2
client: add prefix to KeysAPI
2014-10-25 08:58:25 -07:00
Brandon Philips
2b9cabcbcd
version: bump to v0.5.0-alpha.0
2014-10-24 17:25:49 -07:00
Brian Waldon
2baf3e0d79
Merge pull request #1407 from bcwaldon/old-data-dir
...
etcd: use old default data-dir format
2014-10-24 16:44:30 -07:00
Brian Waldon
677d9d1bea
etcd: use old default data-dir format
2014-10-24 16:41:42 -07:00
Brandon Philips
91a4aa151a
Merge pull request #1406 from bcwaldon/doc-clustering
...
doc: PUT instead of POST discovery config
2014-10-24 16:36:54 -07:00
Brian Waldon
b62fdac193
doc: PUT instead of POST discovery config
2014-10-24 16:30:48 -07:00
Jonathan Boulle
e630910e31
Merge pull request #1398 from jonboulle/proxy
...
proxy not working on master
2014-10-24 15:55:31 -07:00
Yicheng Qin
338f59db74
Merge pull request #1401 from unihorn/186
...
etcdhttp: parse quorum field from http request
2014-10-24 15:54:40 -07:00
Jonathan Boulle
719c57a29d
proxy: retrieve ClientURLs from cluster
...
This is a simple solution to having the proxy keep up to date with the
state of the cluster. Basically, it uses the cluster configuration
provided at start up (i.e. with `-initial-cluster-state`) to determine
where to reach peer(s) in the cluster, and then it will periodically hit
the `/members` endpoint of those peer(s) (using the same mechanism that
`-cluster-state=existing` does to initialise) to update the set of valid
client URLs to proxy to.
This does not address discovery (#1376 ), and it would probably be better
to update the set of proxyURLs dynamically whenever we fetch the new
state of the cluster; but it needs a bit more thinking to have this done
in a clean way with the proxy interface.
Example in Procfile works again.
2014-10-24 15:54:12 -07:00
Yicheng Qin
0e1d1646fd
etcdhttp: parse quorum field from http request
2014-10-24 15:44:39 -07:00
Brandon Philips
0fcb59e7d9
Merge pull request #1393 from philips/0.5-docs2
...
Documentation/0.5: add api.md
2014-10-24 15:18:59 -07:00
Brandon Philips
5456ef7049
Documentation/0.5: add api.md
...
- Update all of the ports to use the new IANA port numbers
- Update the stats section to talk about the id fields
- Remove mention of the modules
- Remove -L from all of the curl commands since it is no longer needed
- Point people at the clustering.md guide for the cluster APIs
2014-10-24 15:18:47 -07:00
Yicheng Qin
cb59a46576
Merge pull request #1396 from unihorn/185
...
etcdhttp: trim StoreKeysPrefix from error in serveKeys
2014-10-24 14:48:31 -07:00
Jonathan Boulle
46528ee17b
Merge pull request #1391 from jonboulle/version
...
/version is 404 now
2014-10-24 14:48:02 -07:00
Jonathan Boulle
9a465b9cf5
etcdhttp: add /version endpoint
2014-10-24 14:47:37 -07:00
Jonathan Boulle
dc46d40b8e
Merge pull request #1397 from jonboulle/log_raft_msg
...
etcdserver/etcdhttp: remove log message for every received raft
2014-10-24 14:29:38 -07:00
Jonathan Boulle
bac13b5cb2
etcdserver/etcdhttp: remove log message for every received raft
2014-10-24 14:25:20 -07:00
Yicheng Qin
34dcbb4679
etcdhttp: trim StoreKeysPrefix from error in serveKeys
...
It returns error messaage like this now:
'{"errorCode":100,"message":"Key not found","cause":"/1/pants","index":10}'
The commit trims '/1' prefix from cause field if exists.
This is a hack to make it display well. It is correct because all error causes
that contain Path puts Path at the head of the string.
2014-10-24 14:12:53 -07:00
Xiang Li
030aed8205
Merge pull request #1394 from xiangli-cmu/initial-advertise-peer-urls
...
*: change advertise-peer-urls -> initial-advertise-peer-urls
2014-10-24 14:08:25 -07:00
Xiang Li
2e84eb3c36
*: change advertise-peer-urls -> initial-advertise-peer-urls
2014-10-24 13:51:59 -07:00
Brian Waldon
9a38be297c
Merge pull request #1380 from bcwaldon/client-keys-API
...
Break apart KeysAPI
2014-10-24 13:48:12 -07:00
Brian Waldon
f21d93ba60
client: define DefaultRequestTimeout
2014-10-24 13:28:04 -07:00
Brian Waldon
45d8fbdcda
client: move discovery path logic into client pkg
2014-10-24 13:28:04 -07:00
Brian Waldon
ce4df96e69
client: break apart KeysAPI from httpClient
2014-10-24 13:27:59 -07:00
Jonathan Boulle
d7f9228133
Merge pull request #1381 from jonboulle/members
...
/v2/admin/members API should use JSON containers in response
2014-10-24 13:20:10 -07:00
Yicheng Qin
49a68adcf1
Merge pull request #1386 from unihorn/184
...
etcdserver: update member attribute when apply request
2014-10-24 12:46:11 -07:00
Yicheng Qin
ea0bff80c0
etcdserver: update member attribute when apply request
2014-10-24 12:43:53 -07:00
Yicheng Qin
d1b57b448d
Merge pull request #1383 from unihorn/183
...
etcdserver: support newly-join member bootstrap
2014-10-24 12:43:25 -07:00
Yicheng Qin
08593bcdf6
etcdserver: support newly-join member bootstrap
2014-10-24 12:38:44 -07:00
Xiang Li
9fb02eb6fa
Merge pull request #1387 from xiangli-cmu/fix_raft
...
Fix raft
2014-10-24 12:10:54 -07:00
Jonathan Boulle
543e12074a
etcdserver/member: change JSON fields to lowerCamelCase
2014-10-24 12:03:17 -07:00
Jonathan Boulle
14852662ef
etcdhttp: rename Members -> members in JSON, update doc
2014-10-24 12:03:17 -07:00
Jonathan Boulle
7ef468b315
etcdhttp: remove /v2/admin/members/x serving
2014-10-24 12:03:17 -07:00
Jonathan Boulle
9b679de9dd
etcdserver/etcdhttp: use container for admin/members endpoint
2014-10-24 12:03:17 -07:00
Brian Waldon
c8634428fa
Merge pull request #1364 from bcwaldon/import-etcdctl
...
Import etcdctl
2014-10-24 12:02:41 -07:00
Xiang Li
507300130b
raft: add tests for ignoring heartbeat reply
2014-10-24 11:50:21 -07:00
Xiang Li
e081ad7298
Merge pull request #1368 from xiangli-cmu/doc
...
doc: add admin api doc
2014-10-24 10:42:14 -07:00
Jonathan Boulle
85800fd8f6
Merge pull request #1385 from jonboulle/config
...
etcdserver: fix + expand config tests
2014-10-24 10:10:07 -07:00
Jonathan Boulle
0276089ed9
etcdserver: fix + expand config tests
2014-10-24 10:09:42 -07:00
Jonathan Boulle
3a41161e76
Merge pull request #1384 from jonboulle/test
...
etcdserver: add test for cluster.String
2014-10-24 10:03:37 -07:00
Jonathan Boulle
b9514ea265
etcdserver: add test for cluster.String
2014-10-24 10:03:28 -07:00
Xiang Li
4c9d67aaa2
Merge pull request #1379 from xiangli-cmu/fix_member
...
etcdserver: fix member endpoint on peerurl
2014-10-23 17:25:40 -07:00
Xiang Li
ed29259801
etcdserver: fix member endpoint on peerurl
2014-10-23 17:18:01 -07:00
Brian Waldon
500d21591f
Merge pull request #1377 from bcwaldon/client-cleanup
...
Make httpClient.SetPrefix safer
2014-10-23 16:35:45 -07:00
Brian Waldon
992e7c76e0
client: copy v2KeysPrefix to httpClient
...
It's poor form to muck with a global variable. Make a copy when the
httpClient object is instantiated to make httpClient.SetPrefix safe.
2014-10-23 16:31:45 -07:00
Brian Waldon
a85a47c8f9
client: s/v2URL/v2KeysURL/
2014-10-23 16:31:42 -07:00
Brian Waldon
ebe32689d4
client: s/v2Prefix/DefaultV2KeysPrefix/
2014-10-23 16:30:56 -07:00
Jonathan Boulle
d1d12abfd7
Merge pull request #1372 from jonboulle/proxy
...
main: fix proxy initialization and setupCluster
2014-10-23 16:12:19 -07:00
Jonathan Boulle
d7301a5cf4
main: fix proxy initialization and setupCluster
2014-10-23 16:09:29 -07:00
Xiang Li
d8258c38be
Merge pull request #1374 from xiangli-cmu/cluster_on_peerurl
...
etcdserver: add member endpoint to peerurl
2014-10-23 16:08:45 -07:00
Jonathan Boulle
0eddf3db1f
Merge pull request #1375 from jonboulle/sort
...
etcdserver: sort Members() in Cluster
2014-10-23 16:01:29 -07:00
Jonathan Boulle
af42f4a56b
etcdserver: sort Members() in Cluster
2014-10-23 15:57:27 -07:00
Xiang Li
02551c277d
etcdserver: add member endpoint to peerurl
2014-10-23 15:55:00 -07:00
Jonathan Boulle
17bd5c3d21
Merge pull request #1373 from jonboulle/header
...
main: add header
2014-10-23 15:37:35 -07:00
Jonathan Boulle
0d36385bb4
main: add header
2014-10-23 14:46:05 -07:00
Yicheng Qin
4089475c90
Merge pull request #1361 from unihorn/182
...
etcdserver: refactor cluster and clusterStore
2014-10-23 14:40:37 -07:00
Yicheng Qin
4d80f01201
etcdserver: Cluster.IsIDremoved -> Cluster.IsIDRemoved
2014-10-23 14:29:58 -07:00
Xiang Li
c25c50582e
doc: add admin api doc
2014-10-23 14:26:33 -07:00
Yicheng Qin
d47de988e4
etcdserver: panic when >1 members have the given name in MemberByName
2014-10-23 14:24:07 -07:00
Yicheng Qin
5fbe6c7134
main: add genClusterString func and its test
2014-10-23 14:19:40 -07:00
Yicheng Qin
8eee8c260e
etcdserver: rebase on master and code clean
2014-10-23 13:58:55 -07:00
Yicheng Qin
e21de51768
etcdserver: remove NewClusterFromMemberInfos
2014-10-23 13:27:55 -07:00
Yicheng Qin
f8b8bdeb17
etcdserver: use path.Join for member key in cluster
2014-10-23 13:27:54 -07:00
Yicheng Qin
3d243baacd
etcdserver: generate id when new cluster
2014-10-23 13:27:54 -07:00
Yicheng Qin
d2c4e981ed
etcdserver: Member.Pick -> Member.PickPeerURL
2014-10-23 13:27:54 -07:00
Yicheng Qin
67412e07f8
etcdserver: MemberFromName -> MemberByName
2014-10-23 13:27:54 -07:00
Yicheng Qin
89572b5fd7
etcdserver: refactor cluster and clusterStore
...
Integrate clusterStore into cluster, and let cluster become the source of
cluster info.
2014-10-23 13:27:54 -07:00
Soheil Hassas Yeganeh
09e9618b02
raft: change raftLog.maybeAppend to return the last new index
...
As per @unihorn's comment on #1366 , we change raftLog.maybeAppend to
return the last new index of entries in maybeAppend.
2014-10-23 15:42:47 -04:00
Soheil Hassas Yeganeh
233617bea2
raft: Make MsgAppRes ack only the last index in MsgApp
...
As explained in #1366 , the leader will fail to transmit the missed
logs if the leader receives a hearbeat response from a follower
that is not yet matched in the leader. In other words, there are
append responses that do not explicitly reject an append but
implied a gap.
This commit is based on @xiangli-cmu's idea. We should only acknowledge
upto the index of logs in the append message. This way responses to
heartbeats would never interfer with the log synchronization because
their log index is always 0.
Fixes #1366
2014-10-23 14:56:17 -04:00
Xiang Li
16c9970a03
Merge pull request #1365 from xiangli-cmu/admin_get
...
etcdserver: support GET on admin endpoint
2014-10-23 11:30:51 -07:00
Xiang Li
86facb3f91
etcdhttp: sort member
2014-10-23 11:21:20 -07:00
Xiang Li
8d6bb4a471
etcdserver: support GET on admin endpoint
2014-10-23 10:53:55 -07:00
Xiang Li
051ad7585f
Merge pull request #1363 from coreos/return_json
...
etcdserver: admin PUT returns the json representation of the newly creat...
2014-10-22 20:11:08 -07:00
Brandon Philips
2cb8efb9b5
Merge pull request #1362 from philips/consistent-hex-use
...
etcdserver: use hex for cluster and machine id
2014-10-22 18:43:21 -07:00
Brian Waldon
1539d5c49c
etcdctl: update to meet go vet
2014-10-22 17:52:40 -07:00
Brian Waldon
69842b344d
etcdctl: reflect build script location in README.md
2014-10-22 17:52:40 -07:00
Brian Waldon
52e08720b7
etcdctl: remove build indicator from README.md
2014-10-22 17:52:40 -07:00
Brian Waldon
29ef918808
etcdctl: import from external repo
2014-10-22 17:52:40 -07:00
Brian Waldon
9f2a42bf7d
godep: add deps for etcdctl
2014-10-22 17:52:40 -07:00
Brian Waldon
9af5b74a8d
gitignore: be more specific when ignoring /etcd
2014-10-22 17:52:40 -07:00
Brian Waldon
46be5d7d5f
version: move version string into new package
2014-10-22 17:52:40 -07:00
Xiang Li
63fa2a626a
etcdserver: admin PUT returns the json representation of the newly created member
2014-10-22 17:19:28 -07:00
Xiang Li
712a05be83
Merge pull request #1357 from coreos/accept_json
...
etcdserver: admin endpoint accepts json body
2014-10-22 16:30:22 -07:00
Brandon Philips
ab90369f9e
etcdserver: use hex for cluster and machine id
...
Continue using hex everywhere. Including here.
TODO: cleanup the printing of the structs which currently have decimal
to/from:
`{Type:MsgAppResp To:9973738105406047488 From:17050684879817348455 T...`
2014-10-22 16:24:50 -07:00
Xiang Li
7be0f4b618
etcdserver: admin endpoint accepts json body
2014-10-22 16:19:48 -07:00
Brandon Philips
ec7af4f519
Merge pull request #1359 from philips/fix-mismatch-error
...
etcdserver: fixup mismatch error line
2014-10-22 15:55:41 -07:00
Brandon Philips
0d0bc3a57e
etcdserver: fixup mismatch error line
...
Both wcid and gcid are strings, don't try to print it out in hex.
2014-10-22 15:48:22 -07:00
Brandon Philips
2c21ae0f16
Merge pull request #1358 from philips/etcdserver-cleanup-cluster-id-msg
...
etcdserver: cleanup the cluster ID error message
2014-10-22 15:42:30 -07:00
Barak Michener
1f84991b3a
Merge pull request #1355 from barakmich/cluster_after_wal
...
etcdserver: Check the initial cluster settings after checking if the WAL...
2014-10-22 18:31:28 -04:00
Brandon Philips
400dd2d7bc
etcdserver: cleanup the cluster ID error message
...
1) Don't panic since we know exactly where this is coming from and don't
need the user to see a full back trace
2) Add docs explaining this situation a bit further
3) Cleanup the error to look like other similiar errors
2014-10-22 15:26:35 -07:00
Barak Michener
e42d65da12
etcdserver: Check the initial cluster settings after checking if the WAL exists
2014-10-22 18:16:43 -04:00
Xiang Li
d27d308935
Merge pull request #1356 from coreos/fix_dis
...
main: use our own flagset in setupCluster
2014-10-22 14:55:40 -07:00
Xiang Li
5444a366da
main: use our own flagset in setupCluster
2014-10-22 14:51:51 -07:00
Xiang Li
5780dfe690
Merge pull request #1347 from coreos/gen_nodeID
...
etcdserver: etcdserver generates the ID when adding new member.
2014-10-22 14:30:49 -07:00
Xiang Li
6d9eb57555
etcdhttp: test bad url for POST on admin endopint
2014-10-22 14:27:08 -07:00
Xiang Li
d6a5dc9e61
Merge pull request #1352 from coreos/fix_main
...
main: fix default case
2014-10-22 14:05:11 -07:00
Xiang Li
ca4f12182a
main: fix default case
2014-10-22 13:49:52 -07:00
Xiang Li
d00152765a
etcdserver: etcdserver generates the ID when adding new member.
...
When adding new member, the etcdserver generates the ID based on the current time
and the given peerurls. We include time to add the uniqueness, since the node with
same peerurls should be able to (add, then remove) several times.
2014-10-22 13:15:56 -07:00
Barak Michener
13656eb4e7
Merge pull request #1340 from barakmich/better_ids2
...
etcdserver: Calculate IDs based on PeerURLs and --initial-cluster-name
2014-10-22 14:49:49 -04:00
Barak Michener
829cec8ccf
Merge stylistic comments
2014-10-22 14:26:05 -04:00
Yicheng Qin
6b32395637
Merge pull request #1343 from unihorn/175
...
etcdserver: record removed member to check incoming message
2014-10-22 11:16:55 -07:00
Yicheng Qin
5014558b00
etcdserver: clean code
2014-10-22 11:09:36 -07:00
Yicheng Qin
3162ead7b1
etcdhttp: do message statistics only on valid ones
2014-10-22 11:09:36 -07:00
Yicheng Qin
9ad4a8e33a
etcdserver: add isKeyNotFound helper func
2014-10-22 11:09:36 -07:00
Yicheng Qin
89b032cd69
etcdserver: Member.storeKey -> memberStoreKey
2014-10-22 11:09:36 -07:00
Yicheng Qin
7498234e40
etcdserver: record removed member to check incoming message
2014-10-22 11:09:35 -07:00
Yicheng Qin
b40d30a8d2
Merge pull request #1346 from unihorn/178
...
integration: fix master
2014-10-22 11:09:06 -07:00
Barak Michener
c5d1fcd70a
fix wrong name
2014-10-22 13:58:43 -04:00
Barak Michener
cb5a638c44
style comments
2014-10-22 13:52:42 -04:00
Barak Michener
52dedab7b4
Move setupCluster inside startEtcd
2014-10-22 13:52:42 -04:00
Barak Michener
502a3c2460
Refactor Cluster to hold and add members.
2014-10-22 13:52:42 -04:00
Barak Michener
1347e3952f
docs and cluster ID change based on name
2014-10-22 13:52:42 -04:00
Barak Michener
ad0b7b7dbb
Add cluster name to etcd flags
2014-10-22 13:52:42 -04:00
Barak Michener
1ca7c031ff
first round of comments
...
Conflicts:
etcdserver/config.go
etcdserver/config_test.go
etcdserver/server.go
main.go
2014-10-22 13:49:54 -04:00
Barak Michener
456d1ebcae
etcdserver: Calculate IDs for nodes solely on PeerURLs
...
Removes the notion of name being anything more than advisory or
command-line grouping, and adds checks for bootstrapping the command
line. IDs are consistent if the URLs are consistent.
2014-10-22 13:49:54 -04:00
Yicheng Qin
4f52d371c1
integration: skip TestGoroutinesRunning
2014-10-22 10:10:43 -07:00
Brandon Philips
e475388bc0
Merge pull request #1294 from kelseyhightower/issue_619_fix_listing_docs
...
doc: fix listing a directory
2014-10-22 09:53:48 -07:00
Yicheng Qin
48992cced3
Merge pull request #1344 from unihorn/176
...
integration: add remaining goroutine check
2014-10-21 18:05:28 -07:00
Yicheng Qin
f356648252
integration: add remaining goroutine check
2014-10-21 16:59:14 -07:00
Yicheng Qin
f26bb6ad44
Merge pull request #1335 from unihorn/174
...
etcdserver/etcdhttp: store location adjustment
2014-10-21 16:24:30 -07:00
Yicheng Qin
06b196e345
etcdhttp: writeEvent -> writeKeyEvent
2014-10-21 16:10:49 -07:00
Yicheng Qin
ca73f25615
etcdhttp: parseRequest -> parseKeyRequest
2014-10-21 16:10:49 -07:00
Yicheng Qin
e2b6a4fc4c
etcdserver: const XXXDir -> StoreXXXPrefix
...
and code clean
2014-10-21 16:10:49 -07:00
Yicheng Qin
2ff3cac653
etcdserver/etcdhttp: store location adjustment
...
Detailed adjustment:
/_etcd/machines/* -> /0/members/*
/* -> /1/*
And it keeps key path returned to user the same as before.
2014-10-21 16:10:19 -07:00
Xiang Li
0398a31b16
Merge pull request #1339 from coreos/checkcid
...
etcdserver: checking clusterID
2014-10-21 16:00:49 -07:00
Xiang Li
e69c37adf0
etcdserver: panic on clusterid mismatch
2014-10-21 15:22:16 -07:00
Xiang Li
00dc61d169
Merge pull request #1341 from coreos/fix_bench
...
raft: fix node bench
2014-10-21 13:01:37 -07:00
Xiang Li
48c4145f1b
raft: fix node bench
2014-10-21 12:46:39 -07:00
Xiang Li
a9984fda4f
Merge pull request #1102 from coreos/node_bench
...
raft: add a one node bench
2014-10-21 11:44:46 -07:00
Xiang Li
50d4abc676
raft: add a one node bench
2014-10-21 11:43:55 -07:00
Jonathan Boulle
c3f83f9275
Merge pull request #1337 from jonboulle/govet
...
tests: add `go vet` coverage
2014-10-21 11:40:26 -07:00
Jonathan Boulle
341c7190d3
test: add govet to tests
2014-10-21 11:32:38 -07:00
Xiang Li
894e678ad6
etcdserver: checking clusterID
2014-10-21 11:05:24 -07:00
Jonathan Boulle
ae4403c945
test: add discovery to tests
2014-10-21 00:17:14 -07:00
Xiang Li
a44849deec
Merge pull request #1286 from coreos/clusterid
...
*: generate clusterid
2014-10-20 19:07:03 -07:00
Jonathan Boulle
99dd42026b
Merge pull request #1336 from jonboulle/govet
...
*: fix various formatting issues
2014-10-20 18:23:26 -07:00
Jonathan Boulle
b3d5333cb3
*: fix various formatting issues
2014-10-20 17:55:18 -07:00
Xiang Li
0fd28169c8
etcdserver: use id,cid
2014-10-20 16:35:41 -07:00
Xiang Li
dc68dc9ebd
etcdserver: add a todo for clusterid generation
2014-10-20 16:26:31 -07:00
Jonathan Boulle
d67a2855c1
Merge pull request #1334 from jonboulle/exit_help
...
main: exit 0 on -h/--help
2014-10-20 16:19:39 -07:00
Yicheng Qin
92230cee63
Merge pull request #1333 from unihorn/172
...
etcdserver/raft: remove msgDenied, removedNodes, shouldStop
2014-10-20 16:04:09 -07:00
Jonathan Boulle
63b328ed11
main: exit 0 on -h/--help
2014-10-20 15:32:58 -07:00
Yicheng Qin
e200d2a8e2
etcdserver/raft: remove msgDenied, removedNodes, shouldStop
...
The future plan is to do all these in etcdserver level.
2014-10-20 15:13:18 -07:00
Xiang Li
ea6bcacfe4
*: generate clusterid
2014-10-20 15:00:54 -07:00
Yicheng Qin
68da8084d0
Merge pull request #1318 from unihorn/164
...
main: add basic integration test
2014-10-20 14:45:22 -07:00
Yicheng Qin
ef44ba10cf
integration: add doc
2014-10-20 14:43:21 -07:00
Yicheng Qin
80212aaf4d
integration: retry on setKey to avoid timeout due to bootstrap
2014-10-20 14:43:21 -07:00
Yicheng Qin
500a72962e
integration: clean code
...
remove extra space, rename variables, remove unused function.
2014-10-20 14:43:21 -07:00
Yicheng Qin
7af679333a
integration: log microsecond time for integration tests
2014-10-20 14:43:21 -07:00
Yicheng Qin
1b7947357f
*: pkg functional -> integration
2014-10-20 14:43:21 -07:00
Yicheng Qin
40279d324a
functional: add TODO
2014-10-20 14:43:21 -07:00
Yicheng Qin
f7a0d5387b
etcdserver: stop server gracefully
2014-10-20 14:43:21 -07:00
Yicheng Qin
058537f34a
main: add basic functional test
2014-10-20 14:43:21 -07:00
Brandon Philips
8fa3834d69
Merge pull request #1327 from unihorn/168
...
docs: add naming.md
2014-10-20 14:23:36 -07:00
Yicheng Qin
3184e1c66f
docs: add glossary.md
2014-10-20 14:16:53 -07:00
Yicheng Qin
dcaa7f0a37
Merge pull request #1328 from unihorn/169
...
skip initial-cluster check when reboot
2014-10-20 13:06:24 -07:00
Yicheng Qin
17382ec905
etcdserver: skip initial-cluster check when reboot
...
If etcd is provided with data-dir that has data, it will not use
initial-cluster, and initial-cluster could be set to be empty.
2014-10-20 12:41:07 -07:00
Jonathan Boulle
da23327265
Merge pull request #1302 from jonboulle/license
...
add copyright info at the head of each file
2014-10-20 10:49:52 -07:00
Jonathan Boulle
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
Yicheng Qin
aa176610f3
main: remove duplicated self name check
2014-10-17 15:37:30 -07:00
Jonathan Boulle
f12583c163
Merge pull request #1021 from jonboulle/clock
...
Implement fake clock for testing
2014-10-17 13:56:30 -07:00
Jonathan Boulle
1456ae4453
store: restore minExpireTime check and advance FakeClock appropriately
2014-10-17 10:05:29 -07:00
Jonathan Boulle
e0801360d3
godep: update clockwork dependency
2014-10-17 10:05:29 -07:00
Jonathan Boulle
ec18e46641
etcdserver/etcdhttp: switch to using fake clock
2014-10-17 10:05:29 -07:00
Jonathan Boulle
3134658ded
store: switch to fake clock
2014-10-17 10:05:29 -07:00
Jonathan Boulle
47c2421f7b
godeps: add clockwork
2014-10-17 10:05:29 -07:00
Jonathan Boulle
de3bf58876
discovery: switch to fake clock
2014-10-17 10:05:29 -07:00
Jonathan Boulle
c5ba66e6aa
Merge pull request #1319 from jonboulle/stats_race
...
etcdserver: fix data race in retrieving self stats
2014-10-17 09:04:17 -07:00
Jonathan Boulle
aed525edee
Merge pull request #1325 from jonboulle/store_cleaner_still
...
store: remove unused code
2014-10-17 09:02:36 -07:00
Brandon Philips
766aa85320
Merge pull request #1326 from jurmous/patch-1
...
Update clients-matrix.md
2014-10-17 16:05:37 +02:00
Jurriaan Mous
6aa46d20d4
Update clients-matrix.md
...
Fix new boon etcd client entry so it complies to the rest of the entries with Y instead of F for HTTPS and Reconnect. Also fix the sorting.
2014-10-17 15:30:35 +02:00
Jonathan Boulle
da64e7509c
etcdserver/stats: lock on leaderstats too
2014-10-17 00:11:25 -07:00
Jonathan Boulle
5c4edf65f9
store: remove another unused function
2014-10-17 00:07:45 -07:00
Jonathan Boulle
1fa763b47b
store: remove unused function
2014-10-17 00:07:23 -07:00
Jonathan Boulle
70bbf8b470
store: remove more unused code
2014-10-17 00:05:56 -07:00
Jonathan Boulle
82023c591d
etcdserver/stats: log any marshaling error
2014-10-16 23:05:48 -07:00
Jonathan Boulle
233e940410
etcdserver: copy stats instead of marshaling with lock
2014-10-16 23:05:48 -07:00
Jonathan Boulle
c28907ba95
etcdserver: fix race and improve stats interfaces
2014-10-16 23:05:48 -07:00
Jonathan Boulle
c30b82b596
etcdserver: fix data race in retrieving self stats
2014-10-16 23:05:48 -07:00
Jonathan Boulle
7311a2a67d
Merge pull request #1321 from jonboulle/peers
...
main: correct peer-addr reference
2014-10-16 20:17:22 -07:00
Jonathan Boulle
bc7d372d5c
main: correct peer-addr reference
2014-10-16 20:06:26 -07:00
Jonathan Boulle
67368ac7fa
Merge pull request #1320 from jonboulle/proxy_doc
...
doc: add note about discovery proxy
2014-10-16 17:23:29 -07:00
Jonathan Boulle
2af0b2031f
doc: add note about discovery proxy
2014-10-16 17:14:38 -07:00
Jonathan Boulle
b7c42b0d76
Merge pull request #1314 from jonboulle/raft_tests
...
raft: remove unused compactThreshold
2014-10-16 17:11:55 -07:00
Jonathan Boulle
fc42bdb904
raft: remove unused compactThreshold
2014-10-16 17:11:10 -07:00
Jonathan Boulle
f7988e6069
Merge pull request #909 from jonboulle/proxy
...
Support corporate proxy via env var
2014-10-16 16:50:31 -07:00
Jonathan Boulle
3a29db1e9d
Merge pull request #1311 from jonboulle/remove_ttl
...
store: remove unused code
2014-10-16 16:35:01 -07:00
Yicheng Qin
7ef375efbd
Merge pull request #1317 from unihorn/169
...
etcdserver: fix data race in leaderStats.Followers
2014-10-16 16:24:26 -07:00
Yicheng Qin
782d91f2d9
etcdserver: fix data race in leaderStats.Followers
2014-10-16 16:18:53 -07:00
Yicheng Qin
074ddb5876
Merge pull request #1316 from unihorn/168
...
stats: fix data race when recording send result
2014-10-16 16:11:22 -07:00
Yicheng Qin
eb72bdc3d2
stats: fix data race when recording send result
2014-10-16 15:39:31 -07:00
Yicheng Qin
da2ee9a90c
Merge pull request #1312 from unihorn/165
...
etcdhttp: set stats field in peer handler
2014-10-16 14:47:57 -07:00
Yicheng Qin
8609acf573
etcdhttp: set stats field in peer handler
2014-10-16 14:23:09 -07:00
Jonathan Boulle
2cd6594485
store: remove unused code
2014-10-16 12:28:05 -07:00
Jonathan Boulle
7f8f371b0e
discovery: add ability to proxy discovery requests
2014-10-16 11:15:04 -07:00
Jonathan Boulle
6a30d3ba04
Merge pull request #1285 from jonboulle/stats_leader_followers
...
etcdserver: add StoreStats, ServerStats and LeaderStats
2014-10-16 10:44:48 -07:00
Jonathan Boulle
9b9e72e2a3
etcdhttp: add tests for ServeStats/ServeLeader
2014-10-16 10:43:49 -07:00
Jonathan Boulle
97ae531eda
etcdserver: split out storestats and serverstats
2014-10-16 10:43:49 -07:00
Jonathan Boulle
fedb67a71a
etcdserver: fix TODO and change to base 16
2014-10-16 10:43:49 -07:00
Jonathan Boulle
8168fed825
etcdserver: add ServerStats and LeaderStats
...
This adds the remaining two stats endpoints: `/v2/stats/self`, for
various statistics on the EtcdServer, and `/v2/stats/leader`, for
statistics on a leader's followers.
By and large most of the stats code is copied across from 0.4.x, updated
where necessary to integrate with the new decoupling of raft from
transport.
This does not satisfactorily resolve the question of name vs ID. In the
old world, names were unique in the cluster and transmitted over the
wire, so they could be used safely in all statistics. In the new world,
a given EtcdServer only knows its own name, and it is instead IDs that
are communicated among the cluster members. Hence in most places here we
simply substitute a string-encoded ID in place of name, and only where
possible do we retain the actual given name of the EtcdServer.
2014-10-16 10:43:44 -07:00
Jonathan Boulle
0a8721a708
etcdserver: expose store statistics
2014-10-16 10:43:23 -07:00
Yicheng Qin
79e9f2ab81
Merge pull request #1296 from unihorn/161
...
etcdserver: add checking when apply conf change
2014-10-16 09:58:51 -07:00
Yicheng Qin
8cd6030a1d
etcdserver: add checking when apply conf change
2014-10-16 09:49:26 -07:00
Xiang Li
82476e04f0
Merge pull request #1303 from coreos/datadir
...
main: use node name as default dir
2014-10-16 21:31:18 +08:00
Xiang Li
efba919a93
main: use node name as default dir
...
We use nodeID as the default dir previously. It works fine before we do dynamic nodeID
generation (introducing time). After the change the dynamic nodeID will change every
time we restart the etcd process. If the user does not provide the data dir, the default
dir will change every time. It is not the desired behavior.
In this commit, we change the default data dir to node name. If the user changes the node
name and does provide the data dir, etcd still cannot recover from previous state. But it
is much better than using nodeID. And it is actually a doucmentation issue.
Conflicts:
main.go
2014-10-16 21:22:12 +08:00
Jonathan Boulle
c18acd7d6f
Merge pull request #1306 from jonboulle/tls
...
pkg: set minimum TLS version to 1.0 (disable SSL3)
2014-10-15 14:02:05 -07:00
Jonathan Boulle
e334148a91
pkg: set minimum TLS version to 1.0 (disable SSL3)
...
SSLv3 is no longer considered secure, and is not supported by golang
clients. Set the minimum version of all TLSConfigs that etcd uses to
ensure that only TLS >=1.0 can be used.
2014-10-15 14:00:16 -07:00
Yicheng Qin
eb2dd1892f
raft: add RemovedNodes to SoftState
2014-10-15 10:53:07 -07:00
Yicheng Qin
a8a1d4fd93
Merge pull request #1299 from unihorn/162
...
etcdhttp: add PUT and DELETE on /v2/admin/members/
2014-10-15 10:52:11 -07:00
Xiang Li
f62d4908b0
Merge pull request #1304 from coreos/logging
...
etcdserver: better logging
2014-10-15 13:36:32 +08:00
Xiang Li
828accf07b
etcdserver: better logging
2014-10-15 13:07:34 +08:00
Yicheng Qin
6d0658c8ca
etcdhttp: check error returned by ParseForm
2014-10-14 14:50:11 -07:00
Jonathan Boulle
48c195fac7
Merge pull request #1298 from jonboulle/members
...
etcdhttp: remove members handling for now
2014-10-14 13:57:52 -07:00
Jonathan Boulle
7656069675
etcdhttp: remove members handling for now
2014-10-14 12:07:28 -07:00
Yicheng Qin
99e35554c0
etcdhttp: add doc for member management http endpoint
2014-10-14 11:09:14 -07:00
Xiang Li
b0fcd680f8
Merge pull request #1287 from coreos/refactor
...
*: proto refactoring
2014-10-15 01:51:44 +08:00
Xiang Li
f98fbbfc14
*: proto refactoring
2014-10-14 21:07:23 +08:00
Brandon Philips
2b03d35ab9
Merge pull request #1300 from jonboulle/godep
...
*: move from third_party to Godep
2014-10-14 01:03:58 -07:00
Jonathan Boulle
4183b69e12
*: move from third_party to Godep
2014-10-14 00:37:52 -07:00
Yicheng Qin
31264e7eb5
etcdhttp: add PUT and DELETE on /v2/admin/members/
2014-10-13 22:36:06 -07:00
Xiang Li
09f9884c6a
Merge pull request #1288 from coreos/cleanup
...
etcdserver: clean NewServer
2014-10-14 11:32:13 +08:00
Xiang Li
fbb874172c
etcdserver: fix typo
2014-10-14 11:30:49 +08:00
Xiang Li
6fc0b1977b
etcdserver: Id -> ID
2014-10-14 11:30:49 +08:00
Xiang Li
b53b74733a
etcdserver: add s.apply
2014-10-14 11:30:49 +08:00
Xiang Li
30c7a7f2dd
etcdserver: add shouldDiscover
2014-10-14 11:29:00 +08:00
Xiang Li
a85ec90d68
etcdserver: clean NewServer
2014-10-14 11:29:00 +08:00
Xiang Li
57ae19b500
Merge pull request #1290 from coreos/member_endpoint
...
etcdserver: change machines endpoint to members
2014-10-14 11:04:08 +08:00
Xiang Li
1177b07535
etcdserver: change machines endpoint to members
2014-10-14 11:02:17 +08:00
Xiang Li
d7dfe07e5d
Merge pull request #1293 from unihorn/160
...
raft: protobuf messageType
2014-10-14 09:16:38 +08:00
Jonathan Boulle
9722aac10d
Merge pull request #1295 from jonboulle/typos
...
main: fix typos and initial-cluster references
2014-10-13 15:16:21 -07:00
Jonathan Boulle
a6dfde85e4
main: fix typos and initial-cluster references
2014-10-13 14:52:49 -07:00
Yicheng Qin
85c2d852f3
Merge pull request #1259 from unihorn/156
...
etcdserver/raft: apply bootstrap addnode entries
2014-10-13 12:18:43 -07:00
Yicheng Qin
f693c6ddf2
etcdserver: apply bootstrap conf change
2014-10-13 11:22:23 -07:00
Yicheng Qin
0319b033ea
etcdserver/raft: set context for bootstrap addnode entries
2014-10-13 11:22:23 -07:00
Yicheng Qin
32c38820c1
raft: protobuf messageType
2014-10-13 11:13:43 -07:00
Kelsey Hightower
d06d55193b
doc: fix listing a directory
2014-10-13 10:59:24 -07:00
Kelsey Hightower
b8b4852ec9
Merge pull request #972 from tazjin/etcd-security-docs
...
Documentation: Clarify etcd security documentation
2014-10-13 08:55:12 -07:00
Xiang Li
6ffaa4db5d
Merge pull request #1289 from coreos/uint
...
*: change all ID to uint64
2014-10-12 13:58:43 +08:00
Xiang Li
3516cc3ee5
*: change all ID to uint64
2014-10-12 08:38:48 +08:00
Yicheng Qin
f16a272898
Merge pull request #1234 from unihorn/152
...
etcdserver: save PeerURLs and Others into two different keys
2014-10-10 12:21:32 -07:00
Yicheng Qin
f8b338d423
Merge pull request #1236 from unihorn/153
...
wal: record node id at the head of WAL file
2014-10-10 12:09:17 -07:00
Yicheng Qin
447caf1afc
etcdserver/wal: record info at the head of WAL file
2014-10-10 11:57:09 -07:00
Yicheng Qin
181cbbdfe0
Merge pull request #1280 from RichardHightower/patch-2
...
Update clients-matrix.md
2014-10-10 10:05:26 -07:00
Yicheng Qin
d241275518
Merge pull request #1275 from RichardHightower/patch-1
...
Update libraries-and-tools.md
2014-10-10 09:58:32 -07:00
Richard Hightower
2ec999ab3b
Update clients-matrix.md
2014-10-10 02:03:35 -07:00
Yicheng Qin
77271b0663
etcdserver: split Member into RaftAttributes and Attributes
...
The split helps to save them in different key paths, because they have
distinct life cycle on update.
2014-10-09 20:28:00 -07:00
Barak Michener
74ab003e1f
Merge pull request #1256 from barakmich/retry
...
Add logging and backoff and simple retry logic
2014-10-09 13:24:14 -04:00
Barak Michener
5e7267a751
last comment
2014-10-09 13:16:45 -04:00
Xiang Li
3e5073e9be
Merge pull request #1261 from coreos/uint
...
raft: int64 -> uint64
2014-10-09 14:47:03 +08:00
Xiang Li
1eb1020717
raft: fix raft test
2014-10-09 14:42:29 +08:00
Xiang Li
8bbbaa88b2
*: raft related int64 -> uint64
2014-10-09 14:29:21 +08:00
Xiang Li
af5b8c6c44
raft: int64 -> uint64
2014-10-09 14:26:43 +08:00
Richard Hightower
8c5aa16d03
Update libraries-and-tools.md
2014-10-08 21:50:22 -07:00
Barak Michener
5fde52a403
add too many retries test case
2014-10-08 21:58:19 -04:00
Barak Michener
9b35ca3a52
simplify and multiple retry
2014-10-08 21:53:15 -04:00
Xiang Li
38af14b0f4
Merge pull request #1260 from coreos/snap_rm
...
raft: save removed nodes in snapshot
2014-10-09 08:00:33 +08:00
Barak Michener
dbac2e8f15
test retry logic
2014-10-08 19:41:59 -04:00
Jonathan Boulle
ea99d3c002
Merge pull request #1269 from jonboulle/disco_warn
...
etcdserver: add discovery warning message
2014-10-08 16:24:51 -07:00
Jonathan Boulle
682008724d
etcdserver: add discovery warning message
2014-10-08 16:09:12 -07:00
Xiang Li
abe97e49d5
raft: more comment
2014-10-09 07:02:05 +08:00
Xiang Li
73f2aaf98f
raft: removedSlice -> removedNodes
2014-10-09 06:55:25 +08:00
Xiang Li
c67fd14fe8
Merge pull request #1257 from bdarnell/cleanups
...
Raft: assorted cleanups (golint and go vet)
2014-10-09 05:55:21 +08:00
Jonathan Boulle
b4a7680bc4
Merge pull request #1268 from jonboulle/store_typo
...
store: fix typo "recurisive"
2014-10-08 14:22:07 -07:00
Jonathan Boulle
a07c51a9c9
store: fix typo "recurisive"
2014-10-08 14:13:38 -07:00
Ben Darnell
d2e858587f
Raft: a few more improvements to test messages.
2014-10-08 15:07:11 -04:00
Xiang Li
7b61565c0a
raft: save removed nodes in snapshot
2014-10-08 15:33:55 +08:00
Barak Michener
f3870598b9
fix retry to not retry on createSelf()
2014-10-07 21:20:45 -04:00
Xiang Li
5f3fe7c61f
Merge pull request #1254 from coreos/rand_etimeout
...
Rand etimeout
2014-10-08 08:10:26 +08:00
Xiang Li
1cd3345e00
raft: address issues with election timeout
2014-10-08 07:41:17 +08:00
Yicheng Qin
75f6643982
Merge pull request #1212 from unihorn/144
...
etcdserver: apply config change on cluster store
2014-10-07 16:32:59 -07:00
Yicheng Qin
8e8719f6ac
etcdserver: Create, Delete -> Add, Remove
2014-10-07 16:21:58 -07:00
Ben Darnell
1083ce8f73
raft: remove misleading labels in array definition
...
Since these are arrays instead of maps, the "keys" here are actually
(useless) goto labels. What really matters is that the ordering is
the same between the constant declarations and the array.
2014-10-07 18:44:06 -04:00
Ben Darnell
36558b1924
Raft: fix printf strings found by go vet.
2014-10-07 18:44:06 -04:00
Ben Darnell
3ad0df3722
Raft: fix problems reported by golint.
2014-10-07 18:44:06 -04:00
Ben Darnell
fe0e168b3b
Add *.test to gitignore.
...
These files are left by some go commands.
2014-10-07 18:22:09 -04:00
Barak Michener
ca1bbee737
add logging and backoff and simple retry logic
2014-10-07 16:58:58 -04:00
Brandon Philips
5b8c4f4e0d
Merge pull request #1251 from philips/hack-insta-discovery
...
hack: introduce a insta-discovery script
2014-10-07 13:47:03 -07:00
Yicheng Qin
cdea98d434
etcdserver: skip bootstrap addNode entry
...
This is a hack to make etcd work normally.
2014-10-07 11:11:31 -07:00
Yicheng Qin
6a62621695
etcdserver: update panic info
2014-10-07 11:04:50 -07:00
Yicheng Qin
3859297225
etcdserver: check id match
2014-10-07 11:04:50 -07:00
Yicheng Qin
d051af4d3d
etcdserver: apply config change on cluster store
2014-10-07 11:04:50 -07:00
Brandon Philips
ef0ed31210
hack: introduce a insta-discovery script
...
This sets up a localhost cluster via a new discovery token. Very useful
for testing.
2014-10-07 10:52:40 -07:00
Xiang Li
f65d117462
raft: add a test for randElectionTimeout
2014-10-07 20:34:15 +08:00
Xiang Li
d7d6f84f64
raft: rand election timeout
2014-10-07 20:12:49 +08:00
Jonathan Boulle
2e0fec7a84
Merge pull request #1253 from jonboulle/streaming_events
...
store: use a larger buffer for eventChan
2014-10-07 02:14:20 -07:00
Jonathan Boulle
26160b2154
store: use a larger buffer for eventChan
...
The event channel for watches can drop events too easily in the case of
streaming watches. This increases the buffer to a more useful level.
2014-10-07 01:57:05 -07:00
Xiang Li
3f3b9866c6
Merge pull request #1241 from coreos/compact
...
raft: compact takes index and nodes parameters
2014-10-07 16:07:25 +08:00
Xiang Li
45e4a8643a
raft: add tests for raft.compact
2014-10-07 16:03:11 +08:00
Xiang Li
7fe4385ef9
raft: add comment for Compact interface of Node
2014-10-07 16:03:11 +08:00
Xiang Li
5587e0d73f
raft: compact takes index and nodes parameters
...
Before this commit, compact always compact log at current appliedindex of raft.
This prevents us from doing non-blocking snapshot since we have to make snapshot
and compact atomically. To prepare for non-blocking snapshot, this commit make
compact supports index and nodes parameters. After completing snapshot, the applier
should call compact with the snapshot index and the nodes at snapshot index to do
a compaction at snapsohot index.
2014-10-07 16:03:11 +08:00
Brandon Philips
de024ec844
Merge pull request #1250 from philips/fix-single-node
...
main: use a new cluster by default
2014-10-06 19:10:58 -07:00
Brandon Philips
6cbc282be1
main: use a new cluster by default
...
This is a safe default for now. Use it to make `./etcd` work again.
2014-10-06 17:34:14 -07:00
Barak Michener
39e0a0cd0a
Merge pull request #1249 from barakmich/sanity_check
...
Split config into a separate file and add sanity check and test
2014-10-06 20:19:23 -04:00
Barak Michener
d6aea2a795
add golint on the new box and fix appropriate lint
2014-10-06 20:16:25 -04:00
Barak Michener
8a311e5b76
remove new cluster check
2014-10-06 20:07:51 -04:00
Barak Michener
1a0195e07e
tableize the test
2014-10-06 20:05:53 -04:00
Yicheng Qin
3ca3c9ad4c
Merge pull request #1245 from unihorn/155
...
main/raft: write addNode ConfChange entries in log when start raft
2014-10-06 17:00:28 -07:00
Brandon Philips
b9c8ac73be
Merge pull request #1248 from jonboulle/disco
...
main: fix temporary discovery cluster
2014-10-06 16:54:06 -07:00
Barak Michener
120b088723
Split config into a separate file and add sanity check and test
2014-10-06 19:42:13 -04:00
Jonathan Boulle
5098cb0d32
main: fix temporary discovery cluster
2014-10-06 16:10:29 -07:00
Yicheng Qin
45ebfb4217
raft: refine initial entries logic in StartNode
2014-10-06 16:06:01 -07:00
Brandon Philips
d98fe2ce1a
Merge pull request #1247 from jonboulle/doc
...
documentation: clustering guide fixes
2014-10-06 15:16:25 -07:00
Yicheng Qin
c15c3eab4c
etcdserver: move int64Slice into pkg/types/
2014-10-06 15:12:02 -07:00
Jonathan Boulle
a10c62ae25
documentation: clustering guide fixes
2014-10-06 15:07:44 -07:00
Brandon Philips
3500b56e54
Merge pull request #1237 from philips/0.5-docs
...
use initial-cluster and initial-cluster-state flags
2014-10-06 15:04:04 -07:00
Brandon Philips
e2d8037ded
main: use initial-cluster and initial-cluster-state flags
...
In preperation for adding the ability to join a machine to an existing
cluster force the user to specify whether they expect this to me a new
cluster or an active one.
The error for not specifying the initial-cluster-state is:
```
etcd: initial cluster state unset and no wal found
```
2014-10-06 14:59:25 -07:00
Yicheng Qin
314d425718
main/raft: write addNode ConfChange entries in log when start raft
2014-10-06 14:33:12 -07:00
Jonathan Boulle
7081dabd12
Merge pull request #1244 from jonboulle/peers
...
main: fail on peers/peers-file flags
2014-10-06 14:25:39 -07:00
Jonathan Boulle
ec7bcbb50d
main: fail on peers/peers-file flags
2014-10-06 14:25:11 -07:00
Brandon Philips
6bc160b4e3
Documentation: introduce the initial 0.5 clustering guide
...
Introduce the concepts of static initial cluster configuration and
document the flag migrations.
2014-10-06 12:25:12 -07:00
Xiang Li
9e3d045b2b
*:discovery hook up
2014-10-06 10:12:42 -07:00
Xiang Li
824b7231b8
Merge pull request #1240 from coreos/fix_proposal
...
raft: fix send
2014-10-06 05:53:54 +08:00
Xiang Li
dc9cb4b4ba
raft: fix send
...
send should not attach current term to msgProp. Send should simply do proxy for msgProp without
changing its term. msgProp has a special term 0, which indicates that it is a local message.
2014-10-06 04:48:35 +08:00
Jonathan Boulle
7ce3bb180c
Merge pull request #1238 from jonboulle/etcdserver_cluster
...
etcdserver: restore test coverage of cluster
2014-10-03 17:06:36 -07:00
Jonathan Boulle
d2df23183d
etcdserver: restore test coverage of cluster
2014-10-03 17:06:23 -07:00
Jonathan Boulle
2606508d1c
Merge pull request #1215 from jonboulle/1215
...
Flag `-timeout` not descriptive
2014-10-03 14:06:18 -07:00
Jonathan Boulle
f432b9d29b
etcdhttp: remove configurable timeout
...
It's slightly unclear why we expose this timeout as being configurable,
and the `-timeout` flag does not exist in 0.4.x, so for now, remove the
flag until we have evidence that it is needed.
2014-10-03 13:47:34 -07:00
Jonathan Boulle
1ca5991c8c
Merge pull request #1096 from jonboulle/1096_embedded
...
simplify initialization of EtcdServer to support embedded etcd
2014-10-03 13:39:25 -07:00
Jonathan Boulle
1308c3e809
etcdserver: unexport EtcdServer fields where possible
2014-10-03 13:34:56 -07:00
Jonathan Boulle
e5f5fcff48
etcdserver: collapse dir configuration to DataDir
2014-10-03 13:34:49 -07:00
Jonathan Boulle
af6b29f291
main: move server configuration to etcdserver package
2014-10-03 13:34:49 -07:00
Jonathan Boulle
1c4163faf8
Merge pull request #1187 from jonboulle/1187_watches_header
...
Watches do not return X-Etcd-Index header
2014-10-03 10:13:25 -07:00
Xiang Li
01ecc60a88
Merge pull request #1203 from coreos/fix_raft
...
raft: commitIndex=min(leaderCommit, index of last new entry)
2014-10-03 22:24:07 +08:00
Xiang Li
172bd7d096
raft: add test for maybeappend change
2014-10-03 22:21:35 +08:00
Xiang Li
5b291b521b
Merge pull request #1207 from coreos/check_stale_resp
...
raft: do not decrease nextIndex and send entries for stale reply
2014-10-03 13:45:58 +08:00
Xiang Li
70bf464cd6
raft: add comment to decrTo
2014-10-03 13:42:34 +08:00
Xiang Li
16ba77767e
raft: do not decrease nextIndex and send entries for stale reply
2014-10-03 13:41:27 +08:00
Jonathan Boulle
1c11f6a144
*: expose etcd-index in watch requests
...
This adds a StartIndex field to the Watcher interface, which represents
the Etcd-Index at which the Watcher is created.
Also refactors the HTTP tests to use a table for most handleWatch tests
2014-10-02 18:10:11 -07:00
Yicheng Qin
8490904f20
Merge pull request #1224 from unihorn/149
...
raft: msg.Denied -> msg.Reject
2014-10-02 12:24:09 -07:00
Yicheng Qin
fff918c672
raft: msg.Denied -> msg.Reject
...
Change the field name because it has msgDenied already.
2014-10-02 12:22:12 -07:00
Yicheng Qin
4a5bf2e1b7
Merge pull request #1151 from unihorn/138
...
raft: add removed
2014-10-01 15:01:30 -07:00
Yicheng Qin
b64246720b
etcdserver: fix test due to rebase
2014-10-01 14:57:39 -07:00
Yicheng Qin
182c8316e1
raft: refine comment for doc and removed list tests
2014-10-01 14:57:39 -07:00
Yicheng Qin
e4a6c9651a
raft: add removed
...
The usage of removed:
1. tell removed node about its removal explicitly using msgDenied
2. prevent removed node disrupt cluster progress by launching leader election
It is set when apply node removal, or receive msgDenied.
2014-10-01 14:57:38 -07:00
Brandon Philips
b1fc0feb72
Merge pull request #1221 from philips/fixing-stuff
...
pkg/types: introduce a URLs type
2014-10-01 14:55:41 -07:00
Brandon Philips
83137f9eba
pkg/types: introduce a URLs type
...
Cleanup the usage of URLs into its own type so we don't have to use a
FlagValue everywhere we have a list of URLs.
2014-10-01 14:41:01 -07:00
Brandon Philips
619c7f9fdb
Merge pull request #1220 from bcwaldon/bkcompat
...
Backwards-compatibility with v0.4.6 addr-related flags
2014-10-01 12:53:50 -07:00
Yicheng Qin
f84b5b1071
Merge pull request #1201 from unihorn/143
...
etcdserver: publish self info when start
2014-10-01 11:56:20 -07:00
Yicheng Qin
b3c7711da8
Merge pull request #1219 from unihorn/148
...
flags/urls: reject url without port
2014-10-01 11:51:32 -07:00
Yicheng Qin
073eb7677d
etcdserver: move grep member logic into publish func
2014-10-01 11:50:47 -07:00
Brian Waldon
dd88a08f8e
etcd: support v0.4.6 addr flags
...
The -addr, -bind-addr, -peer-addr, and peer-bind-addr flags are
superseded by -advertise-client-urls, -listen-client-urls,
-advertise-peer-urls, and -listen-peer-urls, respectively.
If any of the former flags are provided, however, they will still
work. If the new counterparts to the old flags are provided, etcd
will log an error and fail.
2014-10-01 11:49:01 -07:00
Brian Waldon
11582b0f5f
pkg: add URLsFromFlags
2014-10-01 11:49:01 -07:00
Brian Waldon
add3906f6c
pkg/flags: add NewURLs helper
2014-10-01 11:49:01 -07:00
Brian Waldon
c9cac5fee5
flags: replace Addrs with IPAddressPort
2014-10-01 11:49:00 -07:00
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
Yicheng Qin
1356037fc6
flags/urls: reject url without port
...
For now, if etcd receives a url without port, it will listen on a random
port, which is useless.
2014-10-01 11:44:17 -07:00
Yicheng Qin
c0c0b08ff2
Merge pull request #1218 from unihorn/147
...
flags/urls: assign urls instead of append
2014-10-01 11:34:24 -07:00
Yicheng Qin
fd758c71b8
Merge pull request #1217 from unihorn/146
...
main: not use loop variable in goroutine in loop body
2014-10-01 11:25:53 -07:00
Yicheng Qin
8944364884
flags/urls: assign urls instead of append
2014-10-01 11:23:20 -07:00
Yicheng Qin
7a698be6a3
main: not use loop variable in goroutine in loop body
...
Because loop variable are reused in following loops.
2014-10-01 11:07:32 -07:00
Brandon Philips
6760345453
Merge pull request #1216 from philips/improve-cluster-procfile
...
etcdserver: stop worrying about scheme
2014-09-30 17:13:41 -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
7639752c82
Merge pull request #1213 from philips/improve-cluster
...
etcdserver: stop using addScheme
2014-09-30 16:43:26 -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
Xiang Li
ce70e63cc6
Merge pull request #1200 from coreos/raft_heartbeat
...
raft: heartbeat is only response for maintaining leader dominance
2014-09-29 17:00:26 -07:00
Xiang Li
d7b4e44a66
raft: heartbeat is only response for maintaining leader dominance
2014-09-29 16:57:43 -07:00
Xiang Li
b3c1bd5616
raft: commitIndex=min(leaderCommit, index of last new entry)
2014-09-29 14:38:17 -07:00
Xiang Li
b6a73c9358
Merge pull request #1202 from unihorn/144
...
etcdserver: fix left Id -> ID
2014-09-29 14:21:42 -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
Brandon Philips
768090754c
Merge pull request #1199 from AdoHe/master
...
update the Documentation/libraries-and-tools.md to add a new Java client
2014-09-29 13:21:40 -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
Xiang Li
1eb09acd8b
Merge pull request #1197 from coreos/raft_t
...
Add raft msg denied
2014-09-28 23:53:13 -07:00
TonyAdo
1c27fad2cf
update the Documentation/libraries-and-tools.md
2014-09-29 13:42:12 +08:00
Xiang Li
e26ff32fd8
raft: fix error msg
2014-09-28 21:17:51 -07:00
Xiang Li
51529cc3f2
raft: remove index field in msg AppResp
2014-09-28 21:13:53 -07:00
Xiang Li
adefd83855
raft: remove index field in msg voteResp
2014-09-28 21:13:43 -07:00
Xiang Li
86473d8a27
raft: add msg denied field
2014-09-28 21:13:33 -07:00
Xiang Li
e38fbfe9de
Merge pull request #1196 from philips/add-flagtypes-package
...
flagtypes: introduce flagtypes package
2014-09-28 19:48:12 -07:00
Yicheng Qin
d8bf9728d2
Merge pull request #1194 from unihorn/141
...
etcdserver: return client urls for /v2/machines
2014-09-28 17:29:52 -07:00
Brandon Philips
78a9bba276
pkg/types/flags: introduce flags package
...
I want to use the Addrs type in another experimental proxy that I am
implementing. Pull it out into a separate package.
2014-09-28 14:56:30 -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
Jonathan Boulle
2a0f3d85c8
Merge pull request #1190 from jonboulle/undeprecate_peers_file
...
main: undeprecate peers-file for now
2014-09-26 13:57:36 -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
04f6993108
main: undeprecate peers-file for now
2014-09-26 09:54:47 -07:00
Brandon Philips
61dc89e7f3
Merge pull request #1147 from philips/add-name
...
introduce cluster store
2014-09-25 18:46:18 -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
56c64ab2e8
Merge pull request #1153 from jonboulle/1153_etcd_index
...
X-Etcd-Index off by one
2014-09-25 17:00:22 -07:00
Jonathan Boulle
9c9437a9e7
Merge pull request #1152 from jonboulle/1152_raft_headers
...
Missing X-Raft-Term & X-Raft-Index headers
2014-09-25 17:00:02 -07:00
Jonathan Boulle
9b3478218e
etcdserver: add RaftIndex and RaftTerm
2014-09-25 16:46:24 -07:00
Xiang Li
5874387871
Merge pull request #1183 from coreos/corspeer
...
main: remove cors wrapper for raft handler
2014-09-25 16:10:11 -07:00
Xiang Li
8a60257bff
main: remove cors wrapper for raft handler
2014-09-25 11:58:11 -07:00
Xiang Li
9e46d54483
Merge pull request #1182 from coreos/cors
...
pkg: move cors.go to /pkg/cors.go
2014-09-25 11:49:04 -07:00
Xiang Li
720aa6aeae
pkg: move cors.go to /pkg/cors.go
2014-09-25 11:46:08 -07:00
Xiang Li
0662afc95f
Merge pull request #1181 from coreos/functional
...
functional: remove functional
2014-09-25 11:39:35 -07:00
Xiang Li
5feef73a17
Merge pull request #1180 from coreos/elog
...
elog: remove elog
2014-09-25 11:35:58 -07:00
Xiang Li
f393b1459a
functional: remove functional
2014-09-25 11:34:39 -07:00
Xiang Li
aab41f06d0
elog: remove elog
2014-09-25 11:33:10 -07:00
Xiang Li
f96f1041fd
Merge pull request #1179 from coreos/scripts
...
scripts: remove broken script
2014-09-25 11:31:56 -07:00
Xiang Li
05d8f7270f
scripts: remove broken scripts
2014-09-25 11:29:30 -07:00
Xiang Li
e20e286064
Merge pull request #1178 from coreos/crc
...
pkg: move /crc to /pkg/crc
2014-09-25 10:55:24 -07:00
Xiang Li
20ac0ee80d
Merge pull request #1177 from coreos/tran
...
pkg: move /transport to pkg/transport
2014-09-25 10:55:11 -07:00
Xiang Li
9158d293fd
Merge pull request #1176 from coreos/testutil
...
pkg: move testutil to pkg
2014-09-25 10:51:56 -07:00
Xiang Li
2f6086de22
pkg: move /crc to /pkg/crc
2014-09-25 10:50:33 -07:00
Xiang Li
a0f5625728
pkg: move /transport to pkg/transport
2014-09-25 10:47:14 -07:00
Xiang Li
45f71af33e
pkg: move testutil to pkg
2014-09-25 10:40:40 -07:00
Jonathan Boulle
2e4f725c2b
Merge pull request #1172 from jonboulle/1172_ttl_now
...
TTL=0 should expire keys "now"
2014-09-24 17:41:56 -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
db3afb18df
Merge pull request #1164 from jonboulle/1164_dirs
...
Unable to create directories
2014-09-24 17:16:04 -07:00
Jonathan Boulle
f196276ca6
Merge pull request #1170 from jonboulle/version
...
main: add version flag
2014-09-24 17:14:13 -07:00
Jonathan Boulle
fa762e6b25
etcdhttp: process dir parameter in request
2014-09-24 17:11:28 -07:00
Jonathan Boulle
c82309d2b4
main: add version flag
2014-09-24 17:08:42 -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
9ba35bc95e
Merge pull request #1163 from jonboulle/1163_doc
...
Messages in documentation need updating
2014-09-24 17:01:18 -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
Brian Waldon
f603d90775
Merge pull request #1167 from bcwaldon/move-flag-code
...
Move flag-related code into new pkg package
2014-09-24 16:57:48 -07:00
Brian Waldon
42957815d3
Merge pull request #1168 from bcwaldon/moar-flags
...
etcd: deprecate remaining v0.4.6 flags
2014-09-24 16:51:33 -07:00
Brian Waldon
48e8ea1569
etcd: sort list of deprecated flags
2014-09-24 16:49:11 -07:00
Jonathan Boulle
2b52384e7e
etcdhttp: allow empty values for TTL parameter
2014-09-24 16:44:55 -07:00
Brian Waldon
a6b7f4e5ea
etcd: deprecate remaining v0.4.6 flags
2014-09-24 16:44:32 -07:00
Brian Waldon
4a65813a66
test: alphabetize list of testable packages
2014-09-24 16:37:46 -07:00
Brian Waldon
e30c1eeefd
pkg: move SetFlagsFromEnv to pkg package
2014-09-24 16:29:47 -07:00
Brian Waldon
b0617be7e3
etcd: rewrite SetFlagsFromEnv test to use custom flagset
2014-09-24 16:27:00 -07:00
Brian Waldon
f7c353a703
etcd: export SetFlagsFromEnv
2014-09-24 16:12:06 -07:00
Brian Waldon
18c300f80c
etcd: pass flagset into setFlagsFromEnv
2014-09-24 16:11:47 -07:00
Brian Waldon
314c13a8f0
pkg: move DeprecatedFlag to new package
2014-09-24 16:09:37 -07:00
Brian Waldon
002ace2403
etcd: remove unnecessary flag desc
2014-09-24 16:03:53 -07:00
Jonathan Boulle
13c20b1b64
docs: update error codes in api document
2014-09-24 15:59:40 -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
Brian Waldon
5059062275
Merge pull request #1166 from bcwaldon/override-usage
...
etcd: correctly override flag.Usage
2014-09-24 15:42:28 -07:00
Brian Waldon
69fba03fc1
etcd: correctly override flag.Usage
2014-09-24 15:39:06 -07:00
Jonathan Boulle
510213b1c2
Merge pull request #1159 from jonboulle/1159_prevvalue_required
...
`prevValue` ignored when no value provided
2014-09-24 15:30:25 -07:00
Jonathan Boulle
2e2cd12407
etcdhttp: disallow empty prevValue fields
2014-09-24 15:21:18 -07:00
Jonathan Boulle
f27b4cbbce
store: add etcd-index tests
2014-09-24 15:04:32 -07:00
Jonathan Boulle
a45d490598
Merge pull request #1146 from jonboulle/1146_protobuf
...
script protobuf generation
2014-09-24 14:34:49 -07:00
Jonathan Boulle
c28fd92d10
etcdserver: extend storeRecorder to test parameters
2014-09-24 14:33:51 -07:00
Jonathan Boulle
b15fefa8ea
store: use nextIndex where necessary
2014-09-24 14:07:52 -07:00
Brian Waldon
bbbd5fd5ec
Merge pull request #1150 from bcwaldon/deprecated-flags
...
Slurp up deprecated flags, logging a warning
2014-09-24 14:04:30 -07:00
Brian Waldon
bcedef83d3
etcd: override flag usage func
...
No need to communicate deprecated flags, so prevent them from getting
printed in the usage info.
2014-09-24 13:52:58 -07:00
Jonathan Boulle
c8c55aa378
scripts: consolidate and standardize protobuf generation
2014-09-24 13:45:00 -07:00
Xiang Li
1f736263b2
Merge pull request #1149 from unihorn/137
...
raft: stop tickElection when the node is not in peer list
2014-09-24 13:20:20 -07:00
Jonathan Boulle
ec1df42d04
Merge pull request #1138 from jonboulle/1138_timeout
...
etcdserver: handle watch timeouts and streaming
2014-09-24 12:39:34 -07:00
Brian Waldon
784d7ac680
etcd: warn on deprecated flags
2014-09-24 12:14:11 -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
Brandon Philips
7aaaf49fee
Merge pull request #1148 from ThomasAlxDmy/master
...
Add link for etcd-backup
2014-09-24 11:17:06 -07:00
Yicheng Qin
1ca03d8e9d
raft: move logic to separate func
2014-09-24 10:23:44 -07:00
Yicheng Qin
b07be74a82
raft: stop tickElection when the node is not in peer list
...
This prevents the bug like this:
1. a node sends join to a cluster and succeeds
2. it starts with empty peers and waits for sync, but it have not
received anything
3. election timeout passes, and it promotes itself to leader
4. it commits some log entry
5. its log conflicts with the cluster's
2014-09-23 23:15:02 -07:00
Thomas Dmytryk
af01e11a5b
Added link for etcd-backup
2014-09-23 17:07:17 -07:00
Jonathan Boulle
f34e37f68f
Merge pull request #1134 from jonboulle/1134_flaky_test
...
flaky test TestSyncTriggerDeleteExpriedKeys
2014-09-23 16:13:19 -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
Brian Waldon
290b3915c2
Merge pull request #1144 from bcwaldon/TLS
...
Simplify TLS testing in transport pkg
2014-09-23 14:55:42 -07:00
Xiang Li
03152004d7
Merge pull request #1145 from coreos/fix_panic
...
raft: node ignores unexpected local messages receiving from network
2014-09-23 14:11:56 -07:00
Xiang Li
25c2768b8f
raft: node ignores unexpected local messages receiving from network
2014-09-23 13:50:43 -07:00
Yicheng Qin
dcdc7913c0
Merge pull request #1100 from unihorn/129
...
raft: add Configure
2014-09-23 13:50:10 -07:00
Brian Waldon
a299e92dfa
transport: fake out certificate parser
...
The work being done in the tests is completely wasted, as we do not
need to test the udnerlying x509 library. Faking out the parser function
allows the tests to run much faster without having to carry massive
fixtures, either.
2014-09-23 13:49:32 -07:00
Brian Waldon
4d68c933d1
Merge pull request #1142 from bcwaldon/TLS
...
TLS: peer server/transport and proxy transport
2014-09-23 13:19:13 -07:00
Yicheng Qin
c6cb635e01
etcdserver: refine comments of config change tests
2014-09-23 13:03:30 -07:00
Brian Waldon
4649a28097
transport: exercise TLSInfo.ClientConfig & ServerConfig
2014-09-23 12:52:59 -07:00
Brian Waldon
6ac4aea2bf
transport: test TLSInfo.Empty()
2014-09-23 12:19:32 -07:00
Brian Waldon
3c4b155395
transport: spot-check NewTransport
2014-09-23 12:14:50 -07:00
Yicheng Qin
bc7b0108dc
raft: ConfigChange -> ConfChange
2014-09-23 12:02:44 -07:00
Brian Waldon
73504dca41
proxy: determine scheme based on TLSClientConfig
2014-09-23 11:01:58 -07:00
Brian Waldon
1ea3197feb
proxy: pass addrs and scheme into newDirector
2014-09-23 11:01:55 -07:00
Brian Waldon
99e9f561ee
etcdserver: add Peers.Addrs
2014-09-23 10:56:41 -07:00
Brian Waldon
b94d0281d4
etcd: use TLS in proxy transport
2014-09-23 10:19:01 -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
27813599a1
etcd: wire up peer TLS flags
2014-09-23 10:03:17 -07:00
Brian Waldon
342ea18239
transport: build TLS config in NewTransport
2014-09-23 10:03:17 -07:00
Brian Waldon
e880dd41f2
transport: add TLSInfo.ClientConfig
2014-09-23 10:03:16 -07:00
Brian Waldon
0c7351c309
etcd: manually construct HTTP client for peer communication
2014-09-23 10:03:14 -07:00
Brian Waldon
5470a6d3d6
etcdserver: pass http client into Sender
2014-09-23 10:02:23 -07:00
Brian Waldon
db12e5704b
transport: no need to set RootCAs in TLSInfo.ServerConfig
2014-09-23 09:04:26 -07:00
Brian Waldon
b754406f10
Merge pull request #1140 from bcwaldon/TLS
...
client server TLS
2014-09-23 08:04:50 -07:00
Xiang Li
e89f6efd20
Merge pull request #1122 from coreos/discovery
...
discovery
2014-09-22 23:48:05 -07:00
Yicheng Qin
d92931853e
raft: Config -> ConfigChange
...
Configure -> ProposeConfigChange
AddNode, RemoveNode -> ApplyConfigChange
2014-09-22 23:39:53 -07:00
Jonathan Boulle
87df94dbd4
Merge pull request #1130 from jonboulle/1130_wal_log
...
wal logs saveState too frequently
2014-09-22 23:20:26 -07:00
Xiang Li
08ebb05335
discovery: add a overfull case for waitNodes
2014-09-22 19:51:31 -07:00
Xiang Li
fdfaf07c46
discovery: address comments
2014-09-22 19:51:31 -07:00
Xiang Li
a35df0ad7c
discovery: remove redundant comment for createSelf
2014-09-22 19:51:31 -07:00
Xiang Li
17068c5110
discovery: key config -> key _config
2014-09-22 19:51:31 -07:00
Xiang Li
6081311db5
discovery: store size inside /[cluster]/config
2014-09-22 19:51:31 -07:00
Xiang Li
00d1daaf1e
discovery: add tests for sortableNodes
2014-09-22 19:51:31 -07:00
Xiang Li
2fd5a9863b
discovery: add d.selfKey()
2014-09-22 19:51:31 -07:00
Xiang Li
b8eb21c027
discovery: add fast path
2014-09-22 19:51:31 -07:00
Xiang Li
2b623cf0fa
discovery: init commit
2014-09-22 19:51:31 -07:00
Jonathan Boulle
cf4af47f7e
wal: remove logging messages
...
These are noisy and unhelpful by default. We can re-add if at some point
we reintroduce debugging/multiple log levels.
2014-09-22 19:08:47 -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
Brian Waldon
f2d3d90b60
etcd: wire up client TLS flags
2014-09-22 17:58:31 -07:00
Brian Waldon
17459c7bfc
transport: wrap net.Listener with TLSInfo
2014-09-22 17:58:30 -07:00
Brian Waldon
a782a1a7d1
etcd: manually construct listeners
2014-09-22 17:57:44 -07:00
Brandon Philips
a4cca35e9d
Merge pull request #1137 from philips/gofmt-hack
...
test: stop running gofmt ./
2014-09-22 17:28:48 -07:00
Brandon Philips
fd48f3f2a4
test: stop running gofmt ./
...
gofmt ./ will recursively check the .git directory. So use *.go for
gofmt instead
2014-09-22 17:28:31 -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
b801f1affe
raft: refine comment for raft.pendingConf
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
Yicheng Qin
ff6705b94b
raft: add Configure, AddNode, RemoveNode
...
Configure is used to propose config change. AddNode and RemoveNode is
used to apply cluster change to raft state machine. They are the
basics for dynamic configuration.
2014-09-22 15:43:13 -07:00
Brian Waldon
ceab948831
Merge pull request #1131 from bcwaldon/1129
...
etcdserver: init time.Time only if Expiration > 0
2014-09-22 15:39:32 -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
9711e70980
Merge pull request #1132 from jonboulle/fix_store
...
store: fix recursive/dir arguments
2014-09-22 14:54:37 -07:00
Jonathan Boulle
e08df4c8d2
store: fix recursive/dir arguments
2014-09-22 14:44:01 -07:00
Jonathan Boulle
34380ab096
Merge pull request #1013 from jonboulle/1013_cors
...
Add CORS support
2014-09-22 11:50:03 -07:00
Brian Waldon
e27b80643d
Merge pull request #1109 from coreos/client
...
min client for discovery
2014-09-21 10:31:52 -07:00
Brian Waldon
49cc76d33b
client: min client for discovery
2014-09-21 10:29:52 -07:00
Yicheng Qin
0335422e81
Merge pull request #1098 from unihorn/131
...
fix sync tests
2014-09-20 17:47:31 -07:00
Yicheng Qin
8ba801ec06
etcdserver: fix sync tests
...
This is to fix possible testing failures caused by sync tests.
Changes:
1. Get rid of time sleep operations, which introduces uncertainty.
2. Use fake Store.
2014-09-20 17:41:30 -07:00
Yicheng Qin
ddfcb67ce3
Merge pull request #1118 from unihorn/133
...
etcdserver: add TestRecvSnapshot
2014-09-20 17:10:01 -07:00
Yicheng Qin
fac38aad33
etcdserver: add TestRecvSlowSnapshot
2014-09-19 15:09:04 -07:00
Jonathan Boulle
1a36b53f14
main: add CORS support
2014-09-19 14:58:35 -07:00
Yicheng Qin
b8e59a3c6a
etcdserver: not push ready to readyNode automatically
2014-09-19 14:40:11 -07:00
Yicheng Qin
f2ebd64a1b
*: add testutil pkg
2014-09-19 14:32:38 -07:00
Yicheng Qin
4eb156a324
Merge pull request #1104 from unihorn/132
...
etcdserver: add TestDoBadLocalAction
2014-09-19 09:30:34 -07:00
Yicheng Qin
d5988c3ec2
etcdserver: add TestDoBadLocalAction
2014-09-19 09:22:26 -07:00
Yicheng Qin
44ab66d858
etcdserver: add TestRecvSnapshot
2014-09-18 23:19:00 -07:00
Brandon Philips
da9956df11
Merge pull request #1107 from bcwaldon/Procfile
...
Isolate ./build from environment
2014-09-18 22:12:28 -07:00
Brian Waldon
24aa4d9bd9
Merge pull request #1117 from bcwaldon/prevExist
...
*: s/prevExists/prevExist/
2014-09-18 21:45:37 -07:00
Brian Waldon
91003cb994
*: s/prevExists/prevExist/
2014-09-18 21:25:08 -07:00
Jonathan Boulle
517e4271e1
Merge pull request #1113 from jonboulle/unix
...
main: add address validation
2014-09-18 16:38:42 -07:00
Jonathan Boulle
f0789e7349
main: add address validation for bind-addr flag
2014-09-18 16:38:14 -07:00
Brian Waldon
6449387ccb
Merge pull request #1110 from bcwaldon/proxy-readonly
...
Readonly proxy mode
2014-09-18 15:08:46 -07:00
Brian Waldon
98221cf6c0
Merge pull request #1112 from bcwaldon/update-link
...
CONTRIBUTING: update link to style guide
2014-09-18 15:06:59 -07:00
Brian Waldon
6e782b0e63
etcd: add -proxy=readonly
2014-09-18 15:05:33 -07:00
Brian Waldon
fd1f46313a
proxy: add readonly handler
2014-09-18 15:05:30 -07:00
Brian Waldon
5b4fe8a558
CONTRIBUTING: update link to style guide
2014-09-18 15:03:55 -07:00
Brian Waldon
ec0e9c6e6a
Procfile: run etcd from bin/etcd
2014-09-18 14:36:29 -07:00
Brian Waldon
81585716dc
build: ignore calling environment
2014-09-18 14:36:26 -07:00
Brian Waldon
9cc114df36
Merge pull request #1106 from bcwaldon/proxy-flag
...
Replace -proxy-mode=<bool> with -proxy=<enum>
2014-09-18 14:31:00 -07:00
Brian Waldon
afce2948d2
etcd: replace -proxy-mode with -proxy
2014-09-18 14:30:22 -07:00
Brian Waldon
fcf50e756d
test: actually test main pkg
2014-09-18 11:01:00 -07:00
Yicheng Qin
df70f653a4
Merge pull request #1099 from unihorn/128
...
wal: OpenFromIndex fails if it cannot find previous index
2014-09-17 16:00:51 -07:00
Jonathan Boulle
655efca308
Merge pull request #1092 from jonboulle/dumb_gen_id
...
GenID: use a fast prnd
2014-09-17 16:00:25 -07:00
Yicheng Qin
29f6d8a9e6
wal: add ErrFileNotFound and ErrIndexNotFound
2014-09-17 15:58:06 -07:00
Jonathan Boulle
a42d52482c
etcdserver: use simple PRNG for GenID
2014-09-17 15:29:14 -07:00
Jonathan Boulle
1c544667ff
Merge pull request #1040 from jonboulle/1040_config_env_vars
...
etcd needs to be configurable through env vars
2014-09-17 15:28:02 -07:00
Yicheng Qin
7160b5ae26
wal: OpenFromIndex fails if it cannot find previous index
...
Example:
We save entry 1, 2, 3 to WAL.
If we try to open 100, it should fail.
2014-09-17 15:07:07 -07:00
Xiang Li
f2e92d9140
Merge pull request #1097 from unihorn/130
...
etcdserver: use Action to fix possible data race
2014-09-17 14:28:37 -07:00
Jonathan Boulle
6b03135527
Merge pull request #1093 from jonboulle/node_interface
...
Create Node Interface
2014-09-17 14:20:42 -07:00
Jonathan Boulle
b66a40495d
raft: introduce Node interface
2014-09-17 14:18:56 -07:00
Jonathan Boulle
844897360c
main: add test for setting flags
2014-09-17 14:12:04 -07:00
Xiang Li
ba851b2eca
Merge pull request #1095 from coreos/nsnap
...
WIP *: init for on disk snap support
2014-09-17 14:02:48 -07:00
Xiang Li
ab61a8aa9a
*: init for on disk snap support
2014-09-17 13:56:12 -07:00
Yicheng Qin
0ad0e24a86
etcdserver: use Action to fix possible data race
2014-09-17 13:48:03 -07:00
Jonathan Boulle
40c19e525c
main: retrieve config from env vars
2014-09-17 12:15:39 -07:00
Xiang Li
f17391a72b
Merge pull request #1090 from jonboulle/1090_multiple_sockets
...
listen on multiple sockets
2014-09-16 15:29:05 -07:00
Yicheng Qin
f786de13d0
Merge pull request #1081 from unihorn/125
...
make TTL work
2014-09-16 15:14:44 -07:00
Yicheng Qin
a91d745c46
etcdserver: refine printout
2014-09-16 14:54:22 -07:00
Jonathan Boulle
936ecd097a
main: listen for client requests on multiple sockets
2014-09-16 14:46:51 -07:00
Jonathan Boulle
757f400f5d
Merge pull request #1091 from jonboulle/993_default_port
...
main: switch back to default ports for now
2014-09-16 14:37:57 -07:00
Jonathan Boulle
6d4c79b157
main: switch back to default ports
2014-09-16 14:36:59 -07:00
Jonathan Boulle
47b9b5520f
Merge pull request #1010 from jonboulle/1010_separate_ports
...
separate ports used for client/server communication
2014-09-16 14:36:24 -07:00
Yicheng Qin
de21c39ca5
raft: isStateEqual -> isHardStateEqual, IsEmptyState -> IsEmptyHardState
2014-09-16 13:55:00 -07:00
Yicheng Qin
023dc7cba2
etcdserver: add SYNC request
2014-09-16 13:42:03 -07:00
Jonathan Boulle
38c690b155
Procfile: update to new address flags
2014-09-16 13:19:16 -07:00
Jonathan Boulle
67e57ffca4
etcdserver: split out client and server listeners
2014-09-16 11:36:37 -07:00
Jonathan Boulle
7a63e52901
Merge pull request #1088 from jonboulle/peers_tests
...
etcdserver/etcdhttp: add simple test for peers send
2014-09-15 22:13:46 -07:00
Jonathan Boulle
30b70e18c5
etcdserver/etcdhttp: add simple test for peers send
2014-09-15 21:10:00 -07:00
Jonathan Boulle
6f17fa6c90
Merge pull request #1087 from jonboulle/tests
...
etcdserver/etcdhttp: add tests for serveKeys
2014-09-15 20:52:03 -07:00
Jonathan Boulle
a7ec09c877
etcdserver/etcdhttp: use empty node for test
2014-09-15 20:34:14 -07:00
Jonathan Boulle
f846c5286a
etcdserver/etcdhttp: fix comment, simplify resServer
2014-09-15 19:01:40 -07:00
Jonathan Boulle
27cf7747ea
etcdserver/etcdhttp: add tests for serveKeys
2014-09-15 18:33:10 -07:00
Jonathan Boulle
43acdef660
Merge pull request #1086 from jonboulle/serve_raft_test
...
etcdserver/etcdhttp: add test for serveRaft
2014-09-15 16:13:08 -07:00
Jonathan Boulle
7ac3b32de6
etcdserver: change raft endpoint to send StatusNoContent
2014-09-15 16:10:31 -07:00
Jonathan Boulle
3e2c160eed
etcdserver/etcdhttp: add test coverage for serveRaft
2014-09-15 16:07:06 -07:00
Jonathan Boulle
699bc50365
Merge pull request #1071 from jonboulle/serve_mux
...
etcdserver/etcdhttp: switch to using http.ServeMux
2014-09-15 16:05:58 -07:00
Jonathan Boulle
e04c028d64
etcdserver/etcdhttp: switch to using http.ServeMux
2014-09-15 16:05:20 -07:00
Jonathan Boulle
763c276d27
Merge pull request #1061 from jonboulle/server_interface
...
etcdserver: introduce Server interface
2014-09-15 15:36:11 -07:00
Jonathan Boulle
8a5ab2ec06
etcdserver: introduce Server interface
...
This changes etcdserver.Server to an interface, with the former Server
(now "EtcdServer") becoming the canonical/production implementation.
This will facilitate better testing of the http server et al with mock
implementations of the interface.
It also more clearly defines the boundary for users of the Server.
2014-09-15 15:11:01 -07:00
Xiang Li
96624b1129
Merge pull request #1085 from unihorn/127
...
raft: remove unused raftpb.LastIndex
2014-09-15 15:09:09 -07:00
Jonathan Boulle
35ae488120
Merge pull request #1069 from jonboulle/methods
...
etcdhttp: check method for every endpoint, add tests
2014-09-15 14:56:47 -07:00
Jonathan Boulle
d9cfc35bed
etcdhttp: check method for every endpoint, add tests
2014-09-15 14:56:43 -07:00
Yicheng Qin
cc8d8f2102
raft: remove unused raftpb.LastIndex
2014-09-15 14:34:23 -07:00
Xiang Li
07648f1f25
Merge pull request #1084 from unihorn/126
...
raft: remove unused return
2014-09-15 13:49:49 -07:00
Yicheng Qin
9607665323
raft: remove unused return
2014-09-15 13:22:21 -07:00
Yicheng Qin
9bf2c2ed9d
Merge pull request #1052 from unihorn/121
...
server: add unit tests
2014-09-15 13:20:50 -07:00
Yicheng Qin
6cd4434ff3
server: add unit tests
...
Make test coverage >= 90%
2014-09-15 13:16:48 -07:00
Xiang Li
bc5791af11
Merge pull request #1077 from coreos/wal_cut
...
wal: cut(i uint64) -> cut
2014-09-15 10:37:41 -07:00
Xiang Li
69f2d5c590
wal: refactor
2014-09-15 10:35:36 -07:00
Xiang Li
77fbd2610c
wal: add comment
2014-09-15 10:17:21 -07:00
Xiang Li
1d09c25f5f
wal: add walName function; cleanup test
2014-09-15 10:17:21 -07:00
Xiang Li
cec1956b8f
wal: better comment
2014-09-15 10:14:18 -07:00
Xiang Li
8e0ee1cc5e
wal: remove wrong comment for cut
2014-09-15 10:14:18 -07:00
Xiang Li
1164c4b83d
wal: recover writting seq
2014-09-15 10:14:18 -07:00
Xiang Li
21860bc017
wal: cut(i uint64) -> cut
2014-09-15 10:14:18 -07:00
Xiang Li
f9c12e2053
Merge pull request #1075 from coreos/fix_heartbeat
...
raft: fix heartbeat
2014-09-15 10:04:12 -07:00
Yicheng Qin
38c074cb05
Merge pull request #1067 from unihorn/122
...
raft: write entry 0 into log
2014-09-15 10:00:49 -07:00
Xiang Li
21d116d3e1
raft: fix heartbeat
2014-09-15 09:58:22 -07:00
Yicheng Qin
140fd6d6c4
raft: restart using last written entry also
2014-09-15 09:56:33 -07:00
Yicheng Qin
a9af70c52b
raft: write entry 0 into log
2014-09-15 09:55:52 -07:00
Xiang Li
29f9372370
Merge pull request #1080 from coreos/check_id
...
main: check node id is not noneid
2014-09-14 23:28:39 -07:00
Xiang Li
e7ea6a374a
main: check node id is not noneid
2014-09-14 23:28:11 -07:00
Xiang Li
ff7f340bba
Merge pull request #1063 from coreos/node_run_test
...
raft: test node block proposal
2014-09-14 22:46:50 -07:00
Brandon Philips
ed57a7b561
Merge pull request #1079 from philips/fix-procfile-non-zero
...
Procfile: don't use a 0x0 peer
2014-09-14 22:40:16 -07:00
Brandon Philips
e6e1f2ff7d
Procfile: don't use a 0x0 peer
...
0x0 peer id is no longer valid, don't use it.
2014-09-14 22:39:46 -07:00
Xiang Li
e085cc4e06
Merge pull request #1042 from unihorn/118
...
raft: set none to be 0
2014-09-14 22:32:37 -07:00
Yicheng Qin
2927cc6e3b
raft: refine plus assignment
2014-09-14 22:07:32 -07:00
Xiang Li
03f0ed657a
Merge pull request #1076 from coreos/test_race
...
test: test with race by default
2014-09-14 21:42:45 -07:00
Xiang Li
10c9f7389b
test: turn off go 1.2 testing on travis
2014-09-14 21:40:09 -07:00
Xiang Li
e9b790e27b
Merge pull request #1078 from unihorn/124
...
raft: remove unused field
2014-09-14 17:24:51 -07:00
Yicheng Qin
da575c46fa
raft: remove unused field
2014-09-14 13:08:35 -07:00
Xiang Li
79b8153eac
test: test with race by default
2014-09-14 13:08:14 -07:00
Brian Waldon
1037e7ce55
Merge pull request #1055 from bcwaldon/proxy-monster
...
proxy mode, pt II
2014-09-12 23:01:24 -07:00
Brian Waldon
a155f0bda6
proxy: rewrite stdlib ReverseProxy
...
The ReverseProxy code from the standard library doesn't actually
give us the control that we want. Pull it down and rip out what
we don't need, adding tests in the process.
All available endpoints are attempted when proxying a request. If a
proxied request fails, the upstream will be considered unavailable
for 5s and no more requests will be proxied to it. After the 5s is
up, the endpoint will be put back to rotation.
2014-09-12 22:56:23 -07:00
Yicheng Qin
54b9c55af3
etcdserver: remove useless sleep
...
etcdserver.Do will block until there exists leader
2014-09-12 13:01:33 -07:00
Yicheng Qin
34db45a948
raft: set propc, readyc to be nil before run loop
2014-09-12 12:57:50 -07:00
Xiang Li
ccee264b7d
raft: move defer after run
2014-09-12 12:28:15 -07:00
Xiang Li
45f56a5377
raft: forceGoSched -> forceGosched
2014-09-12 12:27:18 -07:00
Brandon Philips
df253a2b14
Merge pull request #1066 from philips/add-raft-doc
...
add-raft-doc
2014-09-12 12:21:53 -07:00
Xiang Li
5c884c7797
raft: better comment and naming
2014-09-12 12:18:30 -07:00
Xiang Li
0c09862494
raft: add isStateEqual test
2014-09-12 11:59:32 -07:00
Xiang Li
f9ef453894
raft: test contain updates
2014-09-12 11:51:25 -07:00
Xiang Li
b261a5edc1
raft: test node block proposal
2014-09-12 11:51:25 -07:00
Yicheng Qin
30289dad5c
raft: more descriptive panic info
2014-09-12 11:39:53 -07:00
Yicheng Qin
072a21782e
Merge pull request #1049 from unihorn/120
...
raftLog: enhance check in compact
2014-09-12 11:35:41 -07:00
Yicheng Qin
d31443f5a3
raftLog: compact applied entries only
...
compact MUST happen on entries that have been applied, or
1. it may screw up the log by setting wrong commitIndex
2. discard unapplied entries
2014-09-12 11:34:08 -07:00
Yicheng Qin
6edb471d58
Merge pull request #1045 from unihorn/119
...
wal: change wal filename format
2014-09-12 11:31:46 -07:00
Yicheng Qin
2030ca202f
wal: change wal filename format
...
Make raftIndex section to be expected raftIndex of next entry.
It makes filename more intuitive and straight-forward.
The commit also adds comments for filename format.
2014-09-12 11:24:28 -07:00
Xiang Li
1a0ad54d3e
Merge pull request #1059 from coreos/node_test
...
test node step
2014-09-12 10:23:53 -07:00
Brandon Philips
98f9ee3613
raft: add useful comments
...
These comments were things I learned about the units, use case or
meaning of various fields and functions in the raft package.
2014-09-12 09:58:04 -07:00
Brandon Philips
58b8610024
raft: add a doc.go file
...
Explain the package from a high level.
2014-09-12 09:57:48 -07:00
Xiang Li
50c1a34f78
Merge pull request #1060 from jonboulle/peers
...
etcdserver/etcdhttp: split out peers and add tests
2014-09-11 23:53:54 -07:00
Yicheng Qin
073411f23f
raft: remove vote with default value
2014-09-11 23:17:13 -07:00
Yicheng Qin
dc1357afa9
raft: use raft helper function in testing
2014-09-11 19:26:29 -07:00
Yicheng Qin
0e0fc2bd24
raft: use [1,n] as address list for raft state machines
2014-09-11 19:23:05 -07:00
Yicheng Qin
84c2bd0b7d
raft: set From of local message to be local id
2014-09-11 19:18:47 -07:00
Jonathan Boulle
20776f1947
etcdserver: use int64slice directly
2014-09-11 19:17:07 -07:00
Xiang Li
281afa74ee
raft: comments for TestNodeStep
2014-09-11 19:00:40 -07:00
Jonathan Boulle
e18b8c12be
etcdserver: switch to proper int64Slice for sorting
2014-09-11 17:28:08 -07:00
Xiang Li
81b5967e0a
Merge pull request #1054 from philips/add-wal-doc
...
wal: add a doc file
2014-09-11 17:18:53 -07:00
Xiang Li
eb1dcb324c
raft: test node step
2014-09-11 17:10:36 -07:00
Jonathan Boulle
5f66b35852
etcdserver/etcdhttp: split out peers and add tests
2014-09-11 16:53:55 -07:00
Jonathan Boulle
c03798f99b
Merge pull request #1011 from jonboulle/clean_http
...
Validate HTTP API user input
2014-09-11 15:31:25 -07:00
Jonathan Boulle
786982d8e5
simplify
2014-09-11 15:13:56 -07:00
Jonathan Boulle
52ddd389ff
etcdhttp: use Form values over query parameters
2014-09-11 15:12:31 -07:00
Brandon Philips
40341b488c
Merge pull request #1058 from philips/grammar-fix
...
raft: log comment grammar fix
2014-09-11 14:06:33 -07:00
Brandon Philips
3bc4b2db12
raft: log comment grammar fix
2014-09-11 13:59:50 -07:00
Xiang Li
f7f65ec464
Merge pull request #1056 from coreos/test
...
test: test wait pkg
2014-09-11 13:56:51 -07:00
Brandon Philips
884c702512
wal: wal.OpenFromIndex -> wal.OpenAtIndex
...
The first entry read from the wal should be the index provided. This
name makes that more clear.
2014-09-11 12:52:06 -07:00
Brandon Philips
413b6a59ff
wal: add more explanation to wal filename format
2014-09-11 12:51:50 -07:00
Xiang Li
9bd9d88a9d
test: sort the pkgs
2014-09-11 12:48:18 -07:00
Xiang Li
0feb153034
test: test wait pkg
2014-09-11 12:38:43 -07:00
Jonathan Boulle
7c03704b19
etcdserver: restructure to hopefully simplify
...
Obviate parseBool helper, define emptyReq locally to parseRequest,
have writeEvent return an error which gets logged
2014-09-11 08:50:41 -07:00
Brandon Philips
04abd5603f
wal: add a doc file
2014-09-10 20:40:20 -07:00
Brandon Philips
71a1c1aa84
Merge pull request #1053 from philips/proxy-in-procfile
...
Procfile: add a proxy
2014-09-10 18:47:53 -07:00
Brandon Philips
1ee8392a8f
Procfile: add a proxy
...
Woo! Now we have a cluster and a proxy and etcdctl works when running
the procfile by default!
2014-09-10 18:47:32 -07:00
Xiang Li
338ca6050e
Merge pull request #1048 from bcwaldon/proxy-monster
...
proxy mode
2014-09-10 18:09:50 -07:00
Brian Waldon
7415d53020
proxy: add proxy-mode functionality to etcd daemon
2014-09-10 18:06:56 -07:00
Brian Waldon
e5a482266f
proxy: introduce director
...
The director class drives an httputil.ReverseProxy. This is used when
etcd is deployed in proxy mode.
2014-09-10 18:04:03 -07:00
Brian Waldon
a3334eed23
main: break out startEtcd func
2014-09-10 18:04:02 -07:00
Brian Waldon
bafe960dba
etcdhttp: add Peers.Endpoints
2014-09-10 18:02:02 -07:00
Brian Waldon
2b39ee1bb3
Merge pull request #1051 from bcwaldon/Id
...
*: s/Id/ID/
2014-09-10 16:13:04 -07:00
Brian Waldon
c251304068
*: s/Id/ID/
...
golang convention dictates that the individual characters in an
abbreviation should all have the same case. Use ID instead of Id.
The protobuf generator still generates code that does not meet
this convention, but that's a fight for another day.
2014-09-10 16:09:08 -07:00
Jonathan Boulle
e2d01eff35
etcdserver: switch to using etcd.Error
2014-09-10 15:46:13 -07:00
Xiang Li
21c214ac03
Merge pull request #1050 from jonboulle/ignore
...
gitignore: ignore vim swap files
2014-09-10 15:09:45 -07:00
Jonathan Boulle
2342402434
etcdserver: address style comments
2014-09-10 14:14:14 -07:00
Jonathan Boulle
255e62dcdd
gitignore: ignore vim swap files
2014-09-10 12:06:28 -07:00
Jonathan Boulle
bed63cddf7
etcdhttp: add tests for ParseBool/ParseUint64 helpers
2014-09-10 12:05:36 -07:00
Jonathan Boulle
e736a11ac4
etcdhttp: perform validation of query parameters
...
Add basic input validation of all query parameters supported by
serveKeys. Also restructures etcdhttp a bit to better facilitate
testing.
Test coverage is slightly improved.
2014-09-10 12:01:58 -07:00
Xiang Li
3d272c2686
Merge pull request #1044 from unihorn/119
...
http: check err return from http.NewRequest
2014-09-09 20:48:56 -07:00
Yicheng Qin
51e4bbfeb0
http: check err return from http.NewRequest
2014-09-09 20:46:56 -07:00
Yicheng Qin
4e31bb308d
raft: use const firstId to track ids
2014-09-09 19:07:20 -07:00
Yicheng Qin
8c58684fb7
etcdserver: fix testServer
2014-09-09 16:59:42 -07:00
Brandon Philips
bac88c047b
Merge pull request #1039 from philips/Procfile-note
...
Procfile: add a comment on how to use this
2014-09-09 16:49:08 -07:00
Brandon Philips
a9c288aadc
Procfile: add a comment on how to use this
2014-09-09 16:48:25 -07:00
Yicheng Qin
b50f96e2e1
raft: set none to be 0
2014-09-09 16:47:21 -07:00
Xiang Li
70443adc8d
Merge pull request #1038 from philips/vegan-etcd
...
*: stop using 0xBEEF
2014-09-09 16:43:54 -07:00
Brandon Philips
24fd126822
*: stop using 0xBEEF
...
Using 0xBEEF is annoying in examples because it makes it makes it look
like the user can use ascii or something. In the Procfile use
0x0,0x1,0x2,etc and use 0xBAD0 in test.
2014-09-09 16:40:51 -07:00
Xiang Li
d9b35470a1
Merge pull request #1023 from unihorn/117
...
etcdhttp: add /v2/admin/machines endpoint
2014-09-09 16:23:23 -07:00
Yicheng Qin
01871e7c29
http: use sort.Strings
2014-09-09 16:20:02 -07:00
Xiang Li
68aa114301
Merge pull request #1035 from coreos/no_copy
...
raft: do not need to copy committed entries
2014-09-09 16:07:20 -07:00
Yicheng Qin
d519491545
http: add TODO for peers var
2014-09-09 15:55:42 -07:00
Xiang Li
7ac3afc02b
Merge pull request #1037 from jonboulle/travis
...
build: add travis configuration
2014-09-09 15:50:21 -07:00
Yicheng Qin
961a61d708
http: add allow func
...
For further extendability
2014-09-09 15:45:34 -07:00
Jonathan Boulle
0241b8ba9a
build: add travis configuration
2014-09-09 15:44:41 -07:00
Yicheng Qin
4087fa5c7a
http: allow GET, HEAD for /v2/machines
2014-09-09 15:22:52 -07:00
Yicheng Qin
0c1d1b7aeb
etcdhttp: add /v2/machines endpoint
2014-09-09 15:00:29 -07:00
Xiang Li
b8f2db36dd
Merge pull request #1036 from philips/gitignore-etcd-data
...
gitignore: add _etcd_data directory ignores
2014-09-09 14:30:38 -07:00
Brandon Philips
6b647fd481
gitignore: add _etcd_data directory ignores
...
After 9a57d1067d
we want to ignore all of
these _etcd_data directories.
2014-09-09 14:30:09 -07:00
Brandon Philips
e5cc58c179
Merge pull request #1032 from jonboulle/fix_tests
...
scripts: use bash for build script
2014-09-09 14:21:51 -07:00
Xiang Li
eaffaacf5e
raft: do not need to copy committed entries
2014-09-09 14:09:30 -07:00
Xiang Li
1a677164be
Merge pull request #1026 from coreos/fix_node
...
Fix node
2014-09-09 13:41:38 -07:00
Xiang Li
a5e72258d2
Merge pull request #1029 from jonboulle/docker
...
scripts: remove non-functional Dockerfile
2014-09-09 12:15:23 -07:00
Xiang Li
f7baea7406
Merge pull request #1017 from jonboulle/api_tests
...
HTTP API test coverage, pt 1
2014-09-09 12:12:56 -07:00
Xiang Li
676b5be972
raft: use IsEmptyState
2014-09-09 11:58:15 -07:00
Jonathan Boulle
800de8e3bf
scripts: use bash for build script
2014-09-09 11:34:55 -07:00
Jonathan Boulle
44acd57ea4
etcdserver: remove superfluous context
2014-09-09 11:18:25 -07:00
Jonathan Boulle
07ce8bc4bc
etcdserver: split out functional test to new package
2014-09-09 11:18:24 -07:00
Jonathan Boulle
8473f3bf52
api: address review comments
2014-09-09 11:17:53 -07:00
Jonathan Boulle
c78239a629
etcdserver: add test coverage for parseRequest
2014-09-09 11:17:53 -07:00
Jonathan Boulle
b33b85870d
etcdserver: add waitForEvent and encodeResponse coverage
2014-09-09 11:17:53 -07:00
Jonathan Boulle
f7444ff300
store: convert Watch to interface
2014-09-09 11:17:53 -07:00
Brandon Philips
7c8b1a553f
Merge pull request #1028 from jonboulle/build
...
scripts: add build, cover and update test
2014-09-09 11:12:35 -07:00
Xiang Li
6f06923e96
wal: test save empty state
2014-09-09 10:41:15 -07:00
Xiang Li
ac0443bc89
raft: remove extra code
2014-09-09 10:16:39 -07:00
Xiang Li
df259e5878
raft: add a newReady helper function
2014-09-09 10:16:39 -07:00
Xiang Li
90c0db3d42
wal: do not save empty state
2014-09-09 10:15:29 -07:00
Xiang Li
c28fef5fc4
raft: set ready.st to empty state, if current state is equal to previous state
2014-09-09 10:15:29 -07:00
Xiang Li
b0d865e845
raft: record previous state is enough
2014-09-09 10:15:29 -07:00
Xiang Li
0060c0749a
raft: prev should be set only when we sucessfully send out rd to the channel
2014-09-09 10:15:29 -07:00
Xiang Li
57ea72d3c4
Merge pull request #1030 from jonboulle/assorted
...
*: fix a few small issues identified by go vet
2014-09-09 07:46:45 -07:00
Jonathan Boulle
9997c9488a
*: fix a few small issues identified by go vet
2014-09-08 23:52:36 -07:00
Xiang Li
55b4267c30
Merge pull request #1001 from coreos/sender
...
etcdhttp: non-blocking sender
2014-09-08 23:36:10 -07:00
Xiang Li
e7ad45b064
Merge pull request #1027 from jonboulle/master
...
raft: remove unused alwaysreadyc
2014-09-08 23:35:58 -07:00
Jonathan Boulle
e1d5caa7e8
scripts: remove non-functional Dockerfile
2014-09-08 23:20:14 -07:00
Jonathan Boulle
491362f5db
scripts: add build, cover and update test
...
This adds a build script that attempts to be as user friendly as
possible: if they have already set $GOPATH and/or $GOBIN, use those
environment variables. If not, create a gopath for them in this
directory. This should facilitate both `go get` and `git clone` usage.
The `test` script is updated, and the new `cover` script facilitates
easy coverage generation for the repo's constituent packages by setting
the PKG environment variable.
2014-09-08 23:09:49 -07:00
Jonathan Boulle
946e35c958
raft: remove unused alwaysreadyc
2014-09-08 22:21:03 -07:00
Xiang Li
4f330a9ba2
Merge pull request #999 from coreos/fix_flag_set
...
etcdhttp: set peer should clean up previous values
2014-09-08 22:11:51 -07:00
Xiang Li
908d326e22
etcdhttp: use peer.String() in test
2014-09-08 20:50:35 -07:00
Xiang Li
378cadf073
etcdhttp: implment Peers.String()
2014-09-08 20:45:10 -07:00
Xiang Li
f4a33dd6df
etcdhttp: simple test for peer set cleanup
2014-09-08 17:04:36 -07:00
Xiang Li
5c8839387d
etcdhttp: set peer should clean up previous values
2014-09-08 16:38:01 -07:00
Xiang Li
9215ebb6aa
Merge pull request #992 from coreos/wal
...
wal
2014-09-08 16:24:28 -07:00
Xiang Li
12c1300d48
Merge pull request #987 from philips/add-test-script
...
test: introduce test script
2014-09-08 16:23:15 -07:00
Xiang Li
4a02a1a60c
main: clarify fatal message for unexpect nodeid
2014-09-08 16:21:27 -07:00
Brandon Philips
91c52630b6
test: introduce test script
...
Why do this? `go test ./...` has a ton of annoying output:
```
? github.com/coreos/etcd [no test files]
? github.com/coreos/etcd/crc [no test files]
? github.com/coreos/etcd/elog [no test files]
? github.com/coreos/etcd/error [no test files]
ok github.com/coreos/etcd/etcdserver 0.267s
ok github.com/coreos/etcd/etcdserver/etcdhttp 0.022s
? github.com/coreos/etcd/etcdserver/etcdserverpb [no test files]
ok github.com/coreos/etcd/raft 0.157s
? github.com/coreos/etcd/raft/raftpb [no test files]
ok github.com/coreos/etcd/snap 0.018s
? github.com/coreos/etcd/snap/snappb [no test files]
third_party/code.google.com/p/gogoprotobuf/proto/testdata/test.pb.go🔢
undefined: __emptyarchive__.Extension
ok github.com/coreos/etcd/store 4.247s
ok
github.com/coreos/etcd/third_party/code.google.com/p/go.net/context
2.724s
FAIL
github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto
[build failed]
ok
github.com/coreos/etcd/third_party/github.com/stretchr/testify/assert
0.013s
ok github.com/coreos/etcd/wait 0.010s
ok github.com/coreos/etcd/wal 0.024s
? github.com/coreos/etcd/wal/walpb [no test files]
```
And we have no had to manually configure drone.io which I want to avoid:
https://drone.io/github.com/coreos/etcd/admin
2014-09-08 16:18:10 -07:00
Xiang Li
f3348d6e13
raft: fix the comment in test
2014-09-08 16:16:58 -07:00
Xiang Li
9a57d1067d
main: make default data to have _data_etcd suffix
2014-09-08 16:15:18 -07:00
Xiang Li
19235c8104
raft: refactor restart test
2014-09-08 16:10:13 -07:00
Xiang Li
e4d2b2a06a
Merge pull request #1022 from philips/add-ready-docs
...
raft: add doc for the Ready struct
2014-09-08 16:02:21 -07:00
Brandon Philips
145882244f
raft: add doc for the Ready struct
2014-09-08 15:59:15 -07:00
Xiang Li
54734b0903
main/wal: add a const for 0700 magic number
2014-09-08 15:45:58 -07:00
Xiang Li
b094410066
wal: change entries->ents for consistency
2014-09-08 15:40:12 -07:00
Xiang Li
adff0f3813
wal: named return values for ReadAll.
2014-09-08 15:36:25 -07:00
Xiang Li
a3b6a646eb
main: check the id read by from wal.
2014-09-08 15:31:11 -07:00
Xiang Li
ffd198808e
Merge pull request #1020 from jonboulle/master
...
docs: add note about version, remove old Vagrantfile
2014-09-08 15:09:27 -07:00
Jonathan Boulle
26a5aaec34
docs: add link to 32-bit issue
2014-09-08 15:08:07 -07:00
Jonathan Boulle
9180919a30
docs: remove build instructions from README
2014-09-08 14:57:16 -07:00
Jonathan Boulle
8cd1b3a4f2
docs: remove nonfunctional Vagrantfile and instructions
2014-09-08 14:49:35 -07:00
Jonathan Boulle
7caa33d819
docs: update README to warn about master branch
2014-09-08 14:45:38 -07:00
Xiang Li
8eadc9b8a5
Merge pull request #1005 from philips/quorum-maintainers
...
MAINTAINERS: add Brandon Philips
2014-09-08 14:38:55 -07:00
Xiang Li
0461c517e4
wal: clarify TODO
2014-09-08 13:57:35 -07:00
Xiang Li
36730ca613
main: use -> using
2014-09-08 10:32:49 -07:00
Brandon Philips
138ac0b296
CONTRIBUTING: require two people to review on etcd
2014-09-07 19:46:06 -07:00
Brandon Philips
c7ff6d4410
MAINTAINERS: add Brandon Philips
...
Need to make sure we have a quorum :)
2014-09-07 19:45:34 -07:00
Xiang Li
4f57330e29
Merge pull request #1003 from bmizerany/b-newemail
...
MAINTAINERS: change email
2014-09-07 19:26:29 -07:00
Blake Mizerany
756b54b4c3
MAINTAINERS: change email
2014-09-07 17:53:52 -07:00
Xiang Li
cbec48e8f6
etcdhttp: non-blocking sender
2014-09-05 13:54:40 -07:00
Xiang Li
8c9d7e3e93
main: add a helper function for starting raft
2014-09-05 10:24:13 -07:00
Xiang Li
0851a1fe7f
main: better error msg
2014-09-05 10:02:46 -07:00
Xiang Li
ee78890f22
main: use data-dir as the path to data directory flag
2014-09-05 09:56:25 -07:00
Xiang Li
1a6e908971
*: add wal
2014-09-05 09:52:40 -07:00
Blake Mizerany
769c043537
Merge pull request #995 from jonboulle/master
...
doc: update build instructions in README
2014-09-04 23:25:48 -07:00
Jonathan Boulle
4cc39e4517
doc: update build instructions in README
2014-09-04 23:21:21 -07:00
Xiang Li
dd49b7a133
Merge pull request #988 from coreos/default_peers
...
etcdserver: add default peer
2014-09-04 22:33:18 -07:00
Xiang Li
bca8f9e0ed
etcdserver: change default id to 0x1
2014-09-04 22:26:42 -07:00
Blake Mizerany
8e6c8e068d
.: add MAINTAINERS file
2014-09-04 18:01:09 -07:00
Blake Mizerany
8408acf995
.: explain the LGTM protocol
2014-09-04 17:08:21 -07:00
Michael Marineau
f41fac0719
Merge pull request #983 from marineam/doc
...
docs: fix documentation for HTTP read/write timeouts
2014-09-04 15:17:07 -07:00
Xiang Li
5ddfe18cda
Merge pull request #989 from coreos/fix_ignore_term
...
raft: fix ignore term
2014-09-04 14:36:56 -07:00
Xiang Li
8dfa490e49
raft: fix ignore term
2014-09-04 14:33:51 -07:00
Blake Mizerany
28102e536b
Revert "build: add build script and update readme"
...
This reverts commit 2866a7488e
.
2014-09-04 14:06:19 -07:00
Jonathan Boulle
08ad47fe1a
Merge pull request #991 from jonboulle/master
...
build: add build script and update readme
2014-09-04 13:58:09 -07:00
Jonathan Boulle
2866a7488e
build: add build script and update readme
2014-09-04 13:57:45 -07:00
Xiang Li
25ee66c6c7
Merge pull request #990 from coreos/fix_node_test
...
Fix node test
2014-09-04 13:55:50 -07:00
Xiang Li
e30505d33b
raft: fix node test
2014-09-04 11:42:11 -07:00
Xiang Li
d7a289ee41
raft: init prev: vote for none
2014-09-04 11:09:55 -07:00
Xiang Li
c1e7a788cd
etcdserver: add default peer
2014-09-04 10:11:32 -07:00
Michael Marineau
a7102d491b
docs: fix documentation for HTTP read/write timeouts
...
The documentation for these options has been incorrect ever since their
addition via commit 084dcb55
. This broke upgrading a CoreOS stable
cluster to 410.0.0 because the user was using the example TOML config
which contains:
http_write_timeout = 10
This was silently ignored in the old stable version which predates the
addition of these options. After upgrading etcd began failing with:
Type mismatch for 'config.Config.http_write_timeout': Expected float
but found 'int64’.
Original issue: https://github.com/coreos/update_engine/issues/45
2014-09-03 23:36:36 -07:00
Xiang Li
e393509879
Merge pull request #981 from coreos/v2prefix
...
etcdhttp: add v2prefix
2014-09-03 22:05:07 -07:00
Xiang Li
e7eff1a975
Merge pull request #982 from coreos/fix_tick
...
Fix tick
2014-09-03 22:02:33 -07:00
Xiang Li
8f4c615704
raft: leader should tick heartbeat
2014-09-03 22:01:31 -07:00
Xiang Li
f1856abe60
etcdhttp: add v2prefix
2014-09-03 21:52:16 -07:00
Xiang Li
efe2141c16
Merge pull request #980 from bmizerany/b-fixthings
...
fix vendoring and a test
2014-09-03 21:47:11 -07:00
Blake Mizerany
d844377ca6
*: vendor context
2014-09-03 20:06:16 -07:00
Blake Mizerany
172c1eae5d
etcdhttp: fix test build
2014-09-03 20:01:54 -07:00
Blake Mizerany
99c7371337
etcdserver: use vendored gogoproto
2014-09-03 19:47:05 -07:00
Xiang Li
a4c8bfa7b4
Merge pull request #874 from etcd-team/raft
...
replace goraft
2014-09-03 17:07:54 -07:00
Xiang Li
dae165eeaa
Merge pull request #83 from etcd-team/snappb
...
snapshot: move pb to snappb; remove clusterId
2014-09-03 17:03:28 -07:00
Xiang Li
16d337db70
Merge pull request #84 from etcd-team/walpb
...
wal: move pb files to walpb
2014-09-03 17:03:16 -07:00
Xiang Li
b98cf17209
wal: move pb files to walpb
2014-09-03 16:46:42 -07:00
Xiang Li
9e77d180c4
snapshot: move pb to snappb; remove clusterId
2014-09-03 16:33:41 -07:00
Xiang Li
3ee83bc194
Merge pull request #82 from etcd-team/b-fiximports
...
coerce gogoproto files to import from third_party
2014-09-03 16:20:58 -07:00
Xiang Li
5a62df3691
Merge pull request #81 from etcd-team/b-fixbrokenwaltests
...
wal: fix broken tests
2014-09-03 16:07:45 -07:00
Blake Mizerany
3aa90b32f9
snap: coerce import gogoproto from third_party
2014-09-03 16:01:18 -07:00
Blake Mizerany
10b73418cf
wal: coerce import gogoproto from third_party
2014-09-03 16:00:42 -07:00
Blake Mizerany
46a7a61b7d
wal: fix broken tests
2014-09-03 15:56:28 -07:00
Blake Mizerany
814558306e
raft: coerce import gogoproto from third_party
2014-09-03 15:51:09 -07:00
Vincent Ambo
215662188b
Documentation: Clarify etcd security documentation
...
Signed-off-by: Vincent Ambo <vincent@kivra.com >
2014-09-04 00:40:22 +02:00
Xiang Li
077f57d1c6
Merge pull request #80 from etcd-team/b-rmconf
...
raft: remove configuration
2014-09-03 15:26:35 -07:00
Blake Mizerany
8d9b7b1680
raft: remove entry type
2014-09-03 15:24:47 -07:00
Blake Mizerany
8463421448
raft: remove configuration
2014-09-03 15:23:05 -07:00
Xiang Li
ade71208a2
Merge pull request #70 from etcd-team/wal_crc
...
wal: add basic crc
2014-09-03 15:12:08 -07:00
Xiang Li
bdb954b2f5
wal: fix wal
2014-09-03 15:10:15 -07:00
Xiang Li
70580de197
Merge pull request #79 from etcd-team/use_msg
...
raft: make tick send out messages.
2014-09-03 13:50:59 -07:00
Xiang Li
3c77693881
raft: make tick send out messages. all state machine actions should be taken inside step function.
2014-09-03 10:17:09 -07:00
Xiang Li
966cfd6e8e
raft: fix elapsed reset
2014-09-03 09:20:20 -07:00
Xiang Li
01be21985d
third_party: remove go-etcd/go-systemd dependencies
2014-09-03 09:20:20 -07:00
Xiang Li
2ba57ee75d
*: remove unused pkgs
2014-09-03 09:20:20 -07:00
Blake Mizerany
03174c9361
etcdhttp: log m.From
2014-09-03 09:20:20 -07:00
Blake Mizerany
146e447cea
etcdhttp: remove sending log
2014-09-03 09:20:20 -07:00
Blake Mizerany
f2d200a826
raft: log only new/no leader
2014-09-03 09:20:20 -07:00
Blake Mizerany
db8e4a2fc0
raft: remove debug logging
2014-09-03 09:20:20 -07:00
Blake Mizerany
cf91035a36
main: log hex of id
2014-09-03 09:20:20 -07:00
Blake Mizerany
576e26ea39
oops
2014-09-03 09:20:20 -07:00
Blake Mizerany
d218034630
boom
2014-09-03 09:20:20 -07:00
Blake Mizerany
fa11eef6d0
all campaign
2014-09-03 09:20:19 -07:00
Blake Mizerany
bb185a858f
raft: fix params
2014-09-03 09:20:19 -07:00
Blake Mizerany
b796d227f1
add some logging
2014-09-03 09:20:19 -07:00
Blake Mizerany
06dea4830d
Procfile
2014-09-03 09:20:19 -07:00
Blake Mizerany
dcd64f2a59
...
2014-09-03 09:20:19 -07:00
Blake Mizerany
728690fa03
hanging
2014-09-03 09:20:19 -07:00
Blake Mizerany
8f3544ece8
server of one is alive!
2014-09-03 09:20:19 -07:00
Blake Mizerany
cb7b321240
boom
2014-09-03 09:20:19 -07:00
Blake Mizerany
c87f1d3924
fix printf
2014-09-03 09:20:19 -07:00
Blake Mizerany
24afe8d22b
remove prefix
2014-09-03 09:20:19 -07:00
Blake Mizerany
9cdb7f073d
...
2014-09-03 09:20:19 -07:00
Blake Mizerany
51d3dc7f6b
typo
2014-09-03 09:20:19 -07:00
Blake Mizerany
22c8ec0a80
...
2014-09-03 09:20:18 -07:00
Blake Mizerany
fc9fc3f888
...
2014-09-03 09:20:18 -07:00
Blake Mizerany
6d720fb33f
raft: replace Context with Stop
2014-09-03 09:20:18 -07:00
Blake Mizerany
a0922ebd0f
etcdserver: light docs
2014-09-03 09:20:18 -07:00
Blake Mizerany
6d7acc6b1e
etcdhttp: never return 0 from genId
2014-09-03 09:20:18 -07:00
Blake Mizerany
56c6fab53c
etcdserver: refactor a bit
2014-09-03 09:20:18 -07:00
Blake Mizerany
2b260a7ae5
etcdserver: QGET
2014-09-03 09:20:18 -07:00
Blake Mizerany
2d9553cb18
etcdserver: cleanup
2014-09-03 09:20:18 -07:00
Blake Mizerany
68968c2cb0
etcdserver: randomize Step
2014-09-03 09:20:18 -07:00
Blake Mizerany
f4613dd466
store: remove Root
2014-09-03 09:20:18 -07:00
Blake Mizerany
ba7d174349
etcdserver: add docs
2014-09-03 09:20:18 -07:00
Blake Mizerany
2a212c9016
etcdserver: replace fmt with t.Logf
2014-09-03 09:20:18 -07:00
Blake Mizerany
e9bb7c26fa
etcdserver: set 10x the keys in test
2014-09-03 09:20:17 -07:00
Blake Mizerany
97ee4dc847
etcdserver: working test
2014-09-03 09:20:17 -07:00
Blake Mizerany
f8be54b416
...deadlocked...
2014-09-03 09:20:17 -07:00
Blake Mizerany
17e56a1c57
etcdserver/etcdhttp: basic test working
2014-09-03 09:20:17 -07:00
Blake Mizerany
7469871d20
raft: remove proposal id / add test
2014-09-03 09:20:17 -07:00
Xiang Li
c84a25e433
etcdhttp: parse boolpointer
2014-09-03 09:20:17 -07:00
Blake Mizerany
c7cb8275c3
etcdserver: move protobuf to etcdserverpb
2014-09-03 09:20:17 -07:00
Blake Mizerany
e8e588c67b
raft: move protobufs into raftpb
2014-09-03 09:20:17 -07:00
Blake Mizerany
59115b85f7
etcdserver/etcdhttp: remove unncessary else
2014-09-03 09:20:17 -07:00
Blake Mizerany
163b27c759
etcdserver/etcdhttp: remove error return from parseRequest
2014-09-03 09:20:17 -07:00
Blake Mizerany
05b2d76d54
etcdserver/etcdhttp: parseRequest
2014-09-03 09:20:17 -07:00
Blake Mizerany
07058d3e0b
etcdserver/etcdhttp: be specific about the keys path match
2014-09-03 09:20:17 -07:00
Blake Mizerany
ddd219f297
many: marshal message
2014-09-03 09:20:16 -07:00
Blake Mizerany
1eb2512961
raft: only allow one message to Step
2014-09-03 09:20:16 -07:00
Blake Mizerany
38e8f3b764
etcdserver/etcdhttp: fix typo
2014-09-03 09:20:16 -07:00
Blake Mizerany
c4defbc45c
etcdserver/etcdhttp: break out wait
...
The assignment of ev was getting burried in the select. This makes it
easier to grok encodeResponse.
2014-09-03 09:20:16 -07:00
Blake Mizerany
8c3450e200
etcdserver/etcdhttp: cancel wait on conn close
2014-09-03 09:20:16 -07:00
Blake Mizerany
665af71888
etcdserver/etcdhttp: apply in single goroutine to avoid race
2014-09-03 09:20:16 -07:00
Blake Mizerany
cd3f047ccd
etcdserver/etcdhttp: remove closenotify watch
2014-09-03 09:20:16 -07:00
Blake Mizerany
7638acdf37
etcdserver/etcdhttp: response with 504
2014-09-03 09:20:16 -07:00
Blake Mizerany
735647e6a3
etcdserver/etcdhttp: cancel long requests on conn close
2014-09-03 09:20:16 -07:00
Blake Mizerany
8cffd75e00
etcdserver/etcdhttp: encode response
2014-09-03 09:20:16 -07:00
Blake Mizerany
b2e0836bb3
etcdserver/etcdhttp: wip
2014-09-03 09:20:16 -07:00
Blake Mizerany
2d3cef2496
etcdserver: set -> existsSet
2014-09-03 09:20:16 -07:00
Blake Mizerany
78d7b38a17
etcdserver: introduce Set
2014-09-03 09:20:15 -07:00
Blake Mizerany
e79e9c4853
etcdserver: give update/create higher priority
2014-09-03 09:20:15 -07:00
Blake Mizerany
5585984ed7
etcdserver: add CompareAndDelete
2014-09-03 09:20:15 -07:00
Blake Mizerany
07c997f98c
etcdserver: add create and delete
2014-09-03 09:20:15 -07:00
Blake Mizerany
30fa119345
etcdserver: use context.TODO()
2014-09-03 09:20:15 -07:00
Blake Mizerany
d2b99aa7c9
etcdserver: note that apply may need Context
2014-09-03 09:20:15 -07:00
Blake Mizerany
f4d8c3fc66
etcdserver: more methods added
2014-09-03 09:20:15 -07:00
Blake Mizerany
225e618b8f
raft: add Id to Entry
2014-09-03 09:20:15 -07:00
Blake Mizerany
3dd6280df5
etcdserver: need to add id to proposal :/
2014-09-03 09:20:15 -07:00
Blake Mizerany
c98f1cb501
etcdserver: remove panic and return default err
2014-09-03 09:20:15 -07:00
Blake Mizerany
021e231476
raft: ReadState -> Ready, which returns a chan
2014-09-03 09:20:15 -07:00
Blake Mizerany
432bc74a58
etcdserver: Send and Save
2014-09-03 09:20:15 -07:00
Blake Mizerany
008337e150
etcdserver: wip
2014-09-03 09:20:14 -07:00
Blake Mizerany
edac2e909b
etcdserver: wip
2014-09-03 09:20:14 -07:00
Blake Mizerany
91b62c0fbf
raft: messages -> byMsgType
2014-09-03 09:20:14 -07:00
Blake Mizerany
ad307c6965
raft: go fmt
2014-09-03 09:20:14 -07:00
Blake Mizerany
7486d3d4c5
raft: mention error in doc
2014-09-03 09:20:14 -07:00
Blake Mizerany
481e229ad4
raft: unblock progress by deproitizing proposals in Step
2014-09-03 09:20:14 -07:00
Blake Mizerany
f87a6f3c1f
raft: sift proposals from other message types in Step
2014-09-03 09:20:14 -07:00
Blake Mizerany
4aa15294a8
raft: re-remove clusterId from raft
2014-09-03 09:20:14 -07:00
Blake Mizerany
134a962222
raft: move raft2 to raft
2014-09-03 09:20:14 -07:00
Blake Mizerany
15bb84d320
raft: move in entry.proto
2014-09-03 09:20:14 -07:00
Blake Mizerany
5e91b3b716
raft: remove unused commentted-out code
2014-09-03 09:20:14 -07:00
Blake Mizerany
9acb4cf2b0
raft: move raft.nextEnts to tests
2014-09-03 09:20:14 -07:00
Blake Mizerany
c4b6896338
raft: add/deleteIns -> add/delProgress
2014-09-03 09:20:13 -07:00
Blake Mizerany
5abdfda06a
raft: pendingConf -> configuring
2014-09-03 09:20:13 -07:00
Blake Mizerany
dd7aa95379
raft: remove atomicInt
2014-09-03 09:20:13 -07:00
Blake Mizerany
75dce35a5d
raft: correct hasLeader
2014-09-03 09:20:13 -07:00
Blake Mizerany
72c65e74f5
raft: remove setX methods
2014-09-03 09:20:13 -07:00
Blake Mizerany
5deaada0dc
raft: remove EmptyState
2014-09-03 09:20:13 -07:00
Blake Mizerany
9616162dbc
raft: remove return bool
2014-09-03 09:20:13 -07:00
Blake Mizerany
022a663e91
raft: newStateMachine -> newRaft
2014-09-03 09:20:13 -07:00
Blake Mizerany
a8c123c6c2
raft: ins -> prs
2014-09-03 09:20:13 -07:00
Blake Mizerany
79de1dc339
raft: sm -> r
2014-09-03 09:20:13 -07:00
Blake Mizerany
3c483e19d7
raft: index{} -> progress{}
2014-09-03 09:20:13 -07:00
Blake Mizerany
1b37f313a6
raft: remove unused IsMsgApp
2014-09-03 09:20:13 -07:00
Blake Mizerany
0f50188652
raft: remove clearState
2014-09-03 09:20:12 -07:00
Blake Mizerany
3823b74208
raft: remove unneeded fields
2014-09-03 09:20:12 -07:00
Blake Mizerany
1d40440830
raft: remove old pointer
2014-09-03 09:20:12 -07:00
Blake Mizerany
ea66d94273
raft: fix ReadState
2014-09-03 09:20:12 -07:00
Blake Mizerany
61a413c219
raft: block ReadState until state updates
2014-09-03 09:20:12 -07:00
Blake Mizerany
10eb997621
raft: whoops
2014-09-03 09:20:12 -07:00
Blake Mizerany
c312d6efad
raft: use Equal in example
2014-09-03 09:20:12 -07:00
Blake Mizerany
92bdb1390d
raft: update based on example
2014-09-03 09:20:12 -07:00
Blake Mizerany
ff14d1de52
raft: example
2014-09-03 09:20:12 -07:00
Blake Mizerany
6e6d81f094
raft: copy ents to avoid races
2014-09-03 09:20:12 -07:00
Blake Mizerany
71ed92b6bd
raft: implement ReadState
2014-09-03 09:20:12 -07:00
Blake Mizerany
f1f8fc4228
raft: sm.vote -> State.Vote
2014-09-03 09:20:12 -07:00
Blake Mizerany
40ed560e16
raft: index -> State.LastIndex
2014-09-03 09:20:12 -07:00
Blake Mizerany
c7e17e2f9e
raft: term -> State.Term
2014-09-03 09:20:11 -07:00
Blake Mizerany
220a923a2d
raft: remove info
2014-09-03 09:20:11 -07:00
Blake Mizerany
0453d09af6
raft: moved into new raft
2014-09-03 09:20:11 -07:00
Blake Mizerany
f03c3bce05
raft: seperate dequeuing from slicing
2014-09-03 09:20:11 -07:00
Blake Mizerany
e17f79ee70
raft: start tick
2014-09-03 09:20:11 -07:00
Blake Mizerany
8d37587e47
raft: remove sync
...
We don't need SyncNode. We only care about things that have made it
through the store. We can do this there.
2014-09-03 09:20:11 -07:00
Blake Mizerany
ce7536e564
raft2: wip - to bring in ../raft soon
2014-09-03 09:20:11 -07:00
Blake Mizerany
e2d8e1868b
wait: Waiter -> WaitList
2014-09-03 09:20:11 -07:00
Blake Mizerany
f9c4ba3ea3
wait: init
2014-09-03 09:20:11 -07:00
Xiang Li
85103adfe0
wal: move record method to record.go
2014-09-03 09:20:11 -07:00
Xiang Li
3699f2e5f9
etcdserver: rename someMachineMessage->machineMessage
2014-09-03 09:20:11 -07:00
Xiang Li
4c116a5a01
etcd: add consistent get
2014-09-03 09:20:10 -07:00
Xiang Li
f6a9599eb4
*: rename etcd to etcdserver
2014-09-03 09:20:10 -07:00
Yicheng Qin
2ff75cda0e
server: remove panic or fatal in participant.run
2014-09-03 09:20:10 -07:00
Yicheng Qin
ebafba0043
server: don't print out errors that cannot be resolved
2014-09-03 09:20:10 -07:00
Yicheng Qin
fab17f216d
server: recover peerHub when restart from snapshot
2014-09-03 09:20:10 -07:00
Yicheng Qin
27c9a0535c
server: add tests for on-disk snapshot
2014-09-03 09:20:10 -07:00
Xiang Li
5fdc124578
etcd: clean up snap
2014-09-03 09:20:10 -07:00
Yicheng Qin
a28dc4559b
raft/etcd: recover node
2014-09-03 09:20:10 -07:00
Xiang Li
63489b9ef5
etcd: snap and wal init
2014-09-03 09:20:10 -07:00
Yicheng Qin
442cae6844
wal: support multiple files
2014-09-03 09:20:10 -07:00
Xiang Li
4296cd3fa4
*: remove old server
2014-09-03 09:20:10 -07:00
Xiang Li
f891199ab0
snap: refactoring
2014-09-03 09:20:09 -07:00
Xiang Li
f664c02a40
snap: handle snapshot file error robustly
2014-09-03 09:20:09 -07:00
Xiang Li
338f120cbf
snap: check mkdir error in tests
2014-09-03 09:20:09 -07:00
Xiang Li
aff5b75487
snap: separate Load to Load and snapNames
2014-09-03 09:20:09 -07:00
Xiang Li
71d12d3330
snap: fix typo
2014-09-03 09:20:09 -07:00
Xiang Li
3b2a90e775
snap: separate different sections in the filename by adding dash
2014-09-03 09:20:09 -07:00
Yicheng Qin
f7417cf693
server: add testCluster.Add
...
and fix possible testing error.
2014-09-03 09:20:09 -07:00
Xiang Li
f7580cd3b6
snap: fix missing continue
2014-09-03 09:20:09 -07:00
Xiang Li
12a9b84b2b
snap: better naming
2014-09-03 09:20:09 -07:00
Xiang Li
94521738a9
snap: init commit
2014-09-03 09:20:09 -07:00
Yicheng Qin
c1da78601a
server: use random generated node id
2014-09-03 09:20:09 -07:00
Xiang Li
a5df254e53
raft: add clusterId to snapshot
2014-09-03 09:20:08 -07:00
Xiang Li
c1c2aeffab
etcd: attach default scheme to the peer-list if scheme is not given
2014-09-03 09:20:08 -07:00
Yicheng Qin
cc1df691cc
store: fix the bug caused by random iteration order over map
2014-09-03 09:20:08 -07:00
Xiang Li
e9a22d0f34
etcd: make retry configurable
2014-09-03 09:20:08 -07:00
Yicheng Qin
33465a7e42
server: fix testings
...
Make WaitMode panic to alert.
2014-09-03 09:20:08 -07:00
Yicheng Qin
bb95187bc7
server: more better testing
2014-09-03 09:20:08 -07:00
Xiang Li
cce88a8504
etcd: better testing...
2014-09-03 09:20:08 -07:00
Yicheng Qin
6e9947599a
server: add testServer and testCluster
2014-09-03 09:20:08 -07:00
Xiang Li
14a6584a22
etcd: defer afterTest
2014-09-03 09:20:08 -07:00
Xiang Li
0ba26afb4d
etcd: remove skipped test
2014-09-03 09:20:08 -07:00
Xiang Li
d71865e094
etcd: cleanup tests
2014-09-03 09:20:08 -07:00
Xiang Li
8e2557697f
etcd: rename initTestServer -> newUnstartedTestServer
2014-09-03 09:20:08 -07:00
Xiang Li
3229c91dbb
etcd: replace buildServer with runServer in tests
2014-09-03 09:20:07 -07:00
Blake Mizerany
0881021e54
all config -> cfg
2014-09-03 09:20:07 -07:00
Blake Mizerany
a5eec89113
cfg/ -> conf/
2014-09-03 09:20:07 -07:00
Blake Mizerany
08b370ebe4
main: remove query_params*.go
2014-09-03 09:20:07 -07:00
Blake Mizerany
3653287c97
Revert "Documentation -> doc"
...
This reverts commit 9c179224aa04f0f25c52dd7b66576c3faf56cfc9.
2014-09-03 09:20:07 -07:00
Yicheng Qin
9203f68894
server: add /v2/stats/self
2014-09-03 09:20:07 -07:00
Yicheng Qin
5574b6e224
server: add /v2/stats/leader
2014-09-03 09:20:07 -07:00
Blake Mizerany
41ccf13393
config -> cfg
...
It is extremely confusing to use variables named the same as a package.
Please no longer do this.
2014-09-03 09:20:07 -07:00
Blake Mizerany
18c4be469f
move ./http to main
2014-09-03 09:20:07 -07:00
Blake Mizerany
6f3162af69
Documentation -> doc
2014-09-03 09:20:06 -07:00
Blake Mizerany
b4fd9353cf
remove fixtures
2014-09-03 09:20:06 -07:00
Blake Mizerany
a2b9f9310c
remove pkg/strings
2014-09-03 09:20:06 -07:00
Blake Mizerany
1039f3dcea
remove bench
2014-09-03 09:20:06 -07:00
Blake Mizerany
d77773acb3
server: ignore server in build/tests
2014-09-03 09:20:06 -07:00
Blake Mizerany
afc69b6a74
remove osext
2014-09-03 09:20:06 -07:00
Blake Mizerany
ecc0f97e27
remove go-log
2014-09-03 09:20:06 -07:00
Blake Mizerany
e2798405f6
remove test.sh
2014-09-03 09:20:06 -07:00
Blake Mizerany
7b2474681b
remove pkg/http
2014-09-03 09:20:06 -07:00
Blake Mizerany
0ecbe891b5
remove pkg/btrfs
2014-09-03 09:20:05 -07:00
Blake Mizerany
68b3644ac7
remove vestigial build script
2014-09-03 09:20:05 -07:00
Blake Mizerany
7aa0da7c91
remove go_version
2014-09-03 09:20:05 -07:00
Blake Mizerany
902f1864b1
remove contrib
2014-09-03 09:20:05 -07:00
Blake Mizerany
45dc778fbb
remove goprotobuf
2014-09-03 09:20:05 -07:00
Blake Mizerany
0f1e18f8f0
remove toml dep
2014-09-03 09:20:05 -07:00
Blake Mizerany
65f7833c22
remove go-httpclient
2014-09-03 09:20:05 -07:00
Blake Mizerany
91daf1da86
remove gorilla and its users
2014-09-03 09:20:05 -07:00
Blake Mizerany
7da180cfc5
metrics: remove old metrics
2014-09-03 09:20:05 -07:00
Blake Mizerany
e9a45ae35d
remove goraft
2014-09-03 09:20:05 -07:00
Blake Mizerany
1805c15093
config: remove toml
2014-09-03 09:20:04 -07:00
Xiang Li
622ee60d4f
etcd: remove unused field seeds in participant struct
2014-09-03 09:20:04 -07:00
Xiang Li
cc1b4b7ef0
etcd: no more mutex
2014-09-03 09:20:04 -07:00
Xiang Li
d9ff56d7b7
etcd: cleanup locking in run
2014-09-03 09:20:04 -07:00
Xiang Li
3af8c7da3c
etcd: we should trust people
2014-09-03 09:20:04 -07:00
Yicheng Qin
55c4a3307d
server: cleanup participant stop
2014-09-03 09:20:04 -07:00
Yicheng Qin
20c995c142
server: remove return value of func run
2014-09-03 09:20:04 -07:00
Xiang Li
d8424a15dd
etcd: remove unnecessary StopProposalWaiters function
2014-09-03 09:20:04 -07:00
Yicheng Qin
b5b2031d5b
wal: prune repeative logging
2014-09-03 09:20:04 -07:00
Blake Mizerany
c19932c9ba
raft: prune unnecessary logging - fixes #15
2014-09-03 09:20:04 -07:00
Yicheng Qin
f911196e5f
server: not add node that has been in the cluster
2014-09-03 09:20:04 -07:00
Yicheng Qin
c9edb762b7
server: add TLSHandshakeTimeout for peer hub client
2014-09-03 09:20:03 -07:00
Yicheng Qin
394893ff92
server: not set participant status for peer that points to itself
2014-09-03 09:20:03 -07:00
Yicheng Qin
01fdaea8a6
server: not create new peer if exists
2014-09-03 09:20:03 -07:00
Yicheng Qin
434bf8ca81
server: rewrite keepSetting in TestMultiNodeKillOne
...
It avoids blocking http request.
2014-09-03 09:20:03 -07:00
Yicheng Qin
b1426e2635
server: wait for entries to be committed in TestClusterConfigReload
2014-09-03 09:20:03 -07:00
Xiang Li
659eb5fd2a
wal: make record a protobuf type
2014-09-03 09:20:03 -07:00
Yicheng Qin
d0dc7427dd
server: serve /v2/admin on raftPubAddr
2014-09-03 09:20:03 -07:00
Xiang Li
8e06333d45
raft: make State a protobuf type
2014-09-03 09:20:03 -07:00
Xiang Li
b9e7c20a4c
etcd: make cmd a protobuf type
...
Conflicts:
etcd/v2_apply.go
etcd/v2_store.go
2014-09-03 09:20:03 -07:00
Xiang Li
d6c3ebb1a0
raft: make Info a protobuf type
2014-09-03 09:20:03 -07:00
Yicheng Qin
a191df10a3
server: p.Get -> p.QuorumGet
2014-09-03 09:20:03 -07:00
Yicheng Qin
cd4b35c841
server: add QuorumGet
2014-09-03 09:20:02 -07:00
Yicheng Qin
5ffc0adccc
server: participant.Get -> participant.Store.Get
2014-09-03 09:20:02 -07:00
Yicheng Qin
3529c381cf
server: add TODO for /v2/stats
2014-09-03 09:20:02 -07:00
Yicheng Qin
4b3c3203ff
server: stop timer when exit
2014-09-03 09:20:02 -07:00
Yicheng Qin
4f10917ce9
etcd: add a read/write timeout to server
...
The default is for connections to last forever[1]. This leads to fds
leaking. I set the timeout so high by default so that watches don't have
to keep retrying but perhaps we should set it slower.
Tested on a cluster with lots of clients and it seems to have relieved
the problem.
[1] https://groups.google.com/forum/#!msg/golang-nuts/JFhGwh1q9xU/heh4J8pul3QJ
Original Commit: 084dcb5596
From: philips <brandon@ifup.org >
2014-09-03 09:20:02 -07:00
Yicheng Qin
e587402c26
server: Flush headers when using wait=true and stream=true
...
Many http clients will missbehave unless they get an initial http-
response, even when long-polling. It also saves the user/client from
having to handle headers on the first action of the watch, but rather
handle the response immediately.
Original commit: 2338481bb1
From: Christoffer Vikström
2014-09-03 09:20:02 -07:00
Yicheng Qin
431ff3cce1
raft: minor change on code
2014-09-03 09:20:02 -07:00
Yicheng Qin
7c3e202c94
etcd: add recover
2014-09-03 09:20:02 -07:00
Yicheng Qin
15029381e1
raft: fix promotable
2014-09-03 09:20:02 -07:00
Yicheng Qin
01c40fcf50
raft: not recover from outdated snapshot
2014-09-03 09:20:02 -07:00
Yicheng Qin
ba63cf666d
raft: add recover
2014-09-03 09:20:02 -07:00
Xiang Li
6030261363
etcd/raft: add snap
2014-09-03 09:20:02 -07:00
Yicheng Qin
943fede19c
server: panic when fail to save in wal
2014-09-03 09:20:01 -07:00
Yicheng Qin
2d870fa65b
wal: add first level logging
2014-09-03 09:20:01 -07:00
Yicheng Qin
969b529b08
wal: fix O_RDONLY attr when opening old file
2014-09-03 09:20:01 -07:00
Xiang Li
38ec659cd6
raft: make Entry a protobuf type
2014-09-03 09:20:01 -07:00
Yicheng Qin
193679e041
server: wait longer in afterTest
...
Because we sets dial timeout to be 200ms, afterTest should wait
> 200ms.
2014-09-03 09:20:01 -07:00
Yicheng Qin
7bb6230588
peerHub: add response timeout for http client
2014-09-03 09:20:01 -07:00
Yicheng Qin
069a288a59
peer: wait a little before closing idle connections
...
It seems that it needs some time to set connections that just used
as idle.
2014-09-03 09:20:01 -07:00
Xiang Li
611d564865
raft: remove unused prevTerm field
2014-09-03 09:20:01 -07:00
Xiang Li
43c9ca895b
wal: fix append entry
2014-09-03 09:20:01 -07:00
Xiang Li
54b4f52e48
raft: add index to entry
2014-09-03 09:20:01 -07:00
Xiang Li
46eab903e9
etcd: do not generate id if next state is stop
2014-09-03 09:20:01 -07:00
Yicheng Qin
0197ce4c66
server: move TestMultiNodeKillAllAndRecovery to etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
215820dd40
server: move TestMultiNodeKillOne to etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
a0fbc289ec
server: move discovery tests to etcd/
...
TestDiscoveryDownNoBackupPeersWithDataDir -> TestRunByDataDir
remove TestDiscoveryRestart
2014-09-03 09:20:00 -07:00
Yicheng Qin
5283002132
server: set short dial timeout for raft communication
2014-09-03 09:20:00 -07:00
Yicheng Qin
28634fce47
wal: Flush -> Sync
2014-09-03 09:20:00 -07:00
Yicheng Qin
2b0936271c
server: fix 2nd watch timeout in TestSingleNodeRecovery
...
When recovering from data dir, the node needs election timeout to
elect itself to be the leader.
2014-09-03 09:20:00 -07:00
Yicheng Qin
01322cd243
server: move TestClusterConfigReload to etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
21fb7b4fbb
server: improve TestKillLeader and TestKillRandom
...
Remove testing on 11-node cluster due to lack of fds
2014-09-03 09:20:00 -07:00
Yicheng Qin
efaef49734
server: move TestSingleNodeRecovery under etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
ffa5eb08c3
server: apply ents when loading log
2014-09-03 09:20:00 -07:00
Yicheng Qin
a6132d459f
server: save correct nodeId for participant
2014-09-03 09:20:00 -07:00
Xiang Li
12dd380d26
etcd: use tmpDir as testing directory
2014-09-03 09:20:00 -07:00
Xiang Li
653a63fa00
etcd: add destoryCluster for testing
2014-09-03 09:19:59 -07:00
Yicheng Qin
88e5bce63d
wip: wal glue
2014-09-03 09:19:59 -07:00
Xiang Li
d70df4a15d
wal: reorgnize wal file
2014-09-03 09:19:59 -07:00
Xiang Li
a25cd45876
wal: add CoreOS copyright
2014-09-03 09:19:59 -07:00
Xiang Li
b383cd5acf
raft: refactor recover
2014-09-03 09:19:59 -07:00
Xiang Li
9f5c7b310c
wal: add newWal helper func
2014-09-03 09:19:59 -07:00
Xiang Li
9c6f2ed5bb
wal: use buffer
2014-09-03 09:19:59 -07:00
Xiang Li
5baefcce26
wal: cleanup
2014-09-03 09:19:59 -07:00
Yicheng Qin
363e952551
wal: add Read
2014-09-03 09:19:59 -07:00
Yicheng Qin
3c7935a21d
wal: check written data in tests
2014-09-03 09:19:59 -07:00
Yicheng Qin
2bd74bc328
raft: add Load
2014-09-03 09:19:59 -07:00
Xiang Li
d1cdc02afc
wal: add tests for write
2014-09-03 09:19:59 -07:00
Xiang Li
7b180d585e
wal: make new work
2014-09-03 09:19:58 -07:00
Xiang Li
e72e75876c
wal: init
2014-09-03 09:19:58 -07:00
Xiang Li
3fba10c8e6
etcd: add version handlers
2014-09-03 09:19:58 -07:00
Yicheng Qin
e850c644da
raft: return offset for unstableEnts
2014-09-03 09:19:58 -07:00
Xiang Li
311db876b0
raft: add unstableState
2014-09-03 09:19:58 -07:00
Xiang Li
609e13a240
raft: add node.Unstable
...
Be able to return all unstable log entries. Application must store unstable
log entries before send out any messages after calling step.
2014-09-03 09:19:58 -07:00
Yicheng Qin
05e77ecf90
server: move id to the head of log line
2014-09-03 09:19:58 -07:00
Yicheng Qin
e7bc7becf3
server: add first level logging
2014-09-03 09:19:58 -07:00
Xiang Li
1288e1f39d
raft: log->raftlog
2014-09-03 09:19:58 -07:00
Xiang Li
c7d1beaaa5
raft: add first level logging
...
We log the message to step and the state of the statemachine before and after
stepping the message.
2014-09-03 09:19:58 -07:00
Xiang Li
d7eef6a64e
etcd: add a bootstrap test
2014-09-03 09:19:58 -07:00
Xiang Li
b49cbc959b
etcd: fix start test goroutine leak
2014-09-03 09:19:57 -07:00
Xiang Li
b652a0d232
etcd: reorganize etce_start test
2014-09-03 09:19:57 -07:00
Yicheng Qin
93104f114e
all: discovery moved to etcd/ yet
2014-09-03 09:19:57 -07:00
Yicheng Qin
6534525cf8
server: add bootstrap tests
2014-09-03 09:19:57 -07:00
Yicheng Qin
c952e91c4f
server: add discovery
2014-09-03 09:19:57 -07:00
Xiang Li
2665cc1cc8
raft: heartbeat should not contain entries
2014-09-03 09:19:57 -07:00
Yicheng Qin
7aa9838d8d
server: move TestModeChange to functional tests
2014-09-03 09:19:57 -07:00
Xiang Li
0c26c0bfab
etcd: add a simple endtoend benchmark
2014-09-03 09:19:57 -07:00
Xiang Li
1be8550672
etcd: refactor waitCluster
2014-09-03 09:19:57 -07:00
Xiang Li
061fad12a9
main: do not pass id to etcd
2014-09-03 09:19:57 -07:00
Xiang Li
30099d9135
etcd: generate a id for the new participant after a mode switch
2014-09-03 09:19:57 -07:00
Xiang Li
8111930981
etcd: standby does not need to send join
2014-09-03 09:19:57 -07:00
Xiang Li
155bd09902
etcd: add clusterid to participant
2014-09-03 09:19:56 -07:00
Xiang Li
13ec81c87f
raft: fix panic in putVarint; varint can take up to 10 bytes for a 64bit integer.
2014-09-03 09:19:56 -07:00
Xiang Li
bb328d5aa5
etcd: fix standby test
2014-09-03 09:19:56 -07:00
Xiang Li
468c345e74
etcd: standby should not be in a tight loop
2014-09-03 09:19:56 -07:00
Xiang Li
060de128a7
raft: add clusterId
2014-09-03 09:19:56 -07:00
Yicheng Qin
9793c518ab
raft: forbid to use none as id
2014-09-03 09:19:56 -07:00
Yicheng Qin
79689872af
raft: use From field to distinguish local message
2014-09-03 09:19:56 -07:00
Xiang Li
daa49023cf
etcd: remove nodes in standby
2014-09-03 09:19:56 -07:00
Yicheng Qin
b4cf146a52
server: notice 2013 -> 2014
2014-09-03 09:19:56 -07:00
Yicheng Qin
0429fe04df
server: add notice comment to all files
2014-09-03 09:19:56 -07:00
Xiang Li
5bfaaa7964
etcd: fix serverHttp
2014-09-03 09:19:56 -07:00
Yicheng Qin
0b77b42cad
standby: fix leader var race
2014-09-03 09:19:55 -07:00
Yicheng Qin
92778afd0b
server: retry remove in TestBecomeStandby
...
To prevent from false error message.
2014-09-03 09:19:55 -07:00
Xiang Li
2f51735e8a
etcd: move raftprefix to raft_handler
2014-09-03 09:19:55 -07:00
Xiang Li
7e7cfb1ce8
etcd: remove participant.seeds
2014-09-03 09:19:55 -07:00
Xiang Li
9ffc0b9f2c
etcd: remove unncessary code in participant
2014-09-03 09:19:55 -07:00
Xiang Li
2e59635bea
etcd: fix a race in peer.go
2014-09-03 09:19:55 -07:00
Yicheng Qin
6dc49def25
server: move var noneId to standby.go
2014-09-03 09:19:55 -07:00
Yicheng Qin
d120962959
server: remove func barrier
...
It could be replaced by func watch.
2014-09-03 09:19:55 -07:00
Yicheng Qin
1c9928d721
participant: retry join more times
2014-09-03 09:19:55 -07:00
Yicheng Qin
e709f1b572
server: fix possible race when switching mode
2014-09-03 09:19:55 -07:00
Yicheng Qin
6059db1f4b
participant: stop http serving when stopped
2014-09-03 09:19:55 -07:00
Yicheng Qin
6d46fc39aa
server: remove modeC var
2014-09-03 09:19:55 -07:00
Xiang Li
5d498918bf
etcd: abstract out mode change logic
2014-09-03 09:19:54 -07:00
Xiang Li
4c324fe3a4
etcd: cleanup etcd.go
2014-09-03 09:19:54 -07:00
Yicheng Qin
6d81aabd48
server: refactor server
2014-09-03 09:19:54 -07:00
Xiang Li
447f6a16cc
etcd: stop peerhub
2014-09-03 09:19:54 -07:00
Xiang Li
d198173fd7
etcd: cleanup peerhub
2014-09-03 09:19:54 -07:00
Yicheng Qin
92cc288f6e
server: fix possible join back in TestRemove
2014-09-03 09:19:54 -07:00
Xiang Li
e02baf33c9
etcd: unknowNode -> unknownPeer
2014-09-03 09:19:54 -07:00
Xiang Li
e0e8495ace
etcd: move fetch logic into peerhub
2014-09-03 09:19:54 -07:00
Xiang Li
9756dba57a
etcd: fix cluster sync
2014-09-03 09:19:53 -07:00
Yicheng Qin
9746de91bf
server: clean new func
2014-09-03 09:19:53 -07:00
Yicheng Qin
46974ef473
server: add stop serving func to v2_client
2014-09-03 09:19:53 -07:00
Yicheng Qin
7bf3e062bd
server: fix standby waitgroup on doing requests
2014-09-03 09:19:53 -07:00
Xiang Li
6f481af383
etcd: clean up sync
2014-09-03 09:19:53 -07:00
Xiang Li
a922947bb0
etcd: move s.setClusterConfig to v2_admin.go
2014-09-03 09:19:53 -07:00
Xiang Li
a50857d38a
etcd: move s.ClusterConfig to v2_admin.go
2014-09-03 09:19:53 -07:00
Xiang Li
da19964959
etcd: fix mode change race
2014-09-03 09:19:53 -07:00
Xiang Li
8ea840c19a
store: fix index data race
2014-09-03 09:19:53 -07:00
Xiang Li
7adb765660
etcd: fix datarace in peer.go
2014-09-03 09:19:53 -07:00
Xiang Li
b8b5734689
etcd: transporter->rafthandler
2014-09-03 09:19:53 -07:00
Xiang Li
d2a553f6c4
etcd: refactor transporter
2014-09-03 09:19:53 -07:00
Yicheng Qin
5f9a5e6a5d
server: simplify mode transition
2014-09-03 09:19:52 -07:00
Yicheng Qin
18001dd779
server/v2_client: add func CloseConnections
2014-09-03 09:19:52 -07:00
Yicheng Qin
404dc96645
server: add TestBecomeStandby
2014-09-03 09:19:52 -07:00
Yicheng Qin
a274e5b192
server: use status for transporter
2014-09-03 09:19:52 -07:00
Yicheng Qin
429b9487f7
server: use transporter as raft HTTP handler
2014-09-03 09:19:52 -07:00
Yicheng Qin
a2c5c844a0
server: add standby
2014-09-03 09:19:52 -07:00
Yicheng Qin
54e39a30f7
server: refactor client
...
To be more readable and get rid of false error message.
2014-09-03 09:19:52 -07:00
Xiang Li
f21842cd04
etcd: reportLead -> getLead
2014-09-03 09:19:52 -07:00
Xiang Li
bea28933d3
raft: init lead to none
2014-09-03 09:19:52 -07:00
Xiang Li
0ccd09532b
etcd: add joinThroughFollower test
2014-09-03 09:19:52 -07:00
Xiang Li
638f36956b
etcd: fix transporter leak in test
2014-09-03 09:19:51 -07:00
Yicheng Qin
16e9aa77e3
server: clear proposal wait in time
2014-09-03 09:19:51 -07:00
Yicheng Qin
ee2d5d66af
v2_client: read whole response body before close
...
Client have to read whole response bodies
if they want the advantage of reusing TCP connections.
https://code.google.com/p/go/source/detail?r=d4e1ec84876c0f5611ab86a03826da14b866efb2&name=release-branch.go1.1&path=/src/pkg/net/http/transport.go
2014-09-03 09:19:51 -07:00
Yicheng Qin
984f309815
server: use buffer for proposal channel
2014-09-03 09:19:51 -07:00
Xiang Li
02922fa7a5
etcd: clean testAdd
2014-09-03 09:19:51 -07:00
Xiang Li
a0c0638744
tests: remove unnecessary test
2014-09-03 09:19:51 -07:00
Xiang Li
60c8dbe0c9
etcd: rewrite kill_leader and kill_random test
2014-09-03 09:19:51 -07:00
Yicheng Qin
83e1fe77c8
server: refactor add
2014-09-03 09:19:51 -07:00
Xiang Li
3ea913e76a
etcd: refactor remove
2014-09-03 09:19:51 -07:00
Xiang Li
b951aaf925
store: check remove func before call it
2014-09-03 09:19:50 -07:00
Xiang Li
2e86cf2dc8
raft: add more randomness
2014-09-03 09:19:50 -07:00
Xiang Li
9c8aff66a1
raft: randomize election timeout
2014-09-03 09:19:50 -07:00
Xiang Li
3921295b21
raft: update lead to none when receives vaild msgVote
2014-09-03 09:19:50 -07:00
Xiang Li
605c4ce702
etcd: fix TestGetAdminMachinesEndPoint
2014-09-03 09:19:50 -07:00
Xiang Li
a69e416604
etcd: group the prefix consts
2014-09-03 09:19:50 -07:00
Yicheng Qin
7b11dc1c05
server: maintain cluster members in nodes
var
2014-09-03 09:19:50 -07:00
Yicheng Qin
5562c3b4ec
server: v2 propose sends error back
2014-09-03 09:19:50 -07:00
Yicheng Qin
5af8fe9a84
server: use /v2/admin/machines/ http endpoint to join
2014-09-03 09:19:50 -07:00
Yicheng Qin
041524432d
server: implement join and remove http endpoint
2014-09-03 09:19:50 -07:00
Yicheng Qin
f34b77216f
server: add add function
2014-09-03 09:19:50 -07:00
Yicheng Qin
5fc5681cb4
server: make removal go through run loop
...
It should not send to raft endpoint directly.
2014-09-03 09:19:50 -07:00
Yicheng Qin
98fdbaaae0
server: add remove function
2014-09-03 09:19:50 -07:00
Yicheng Qin
f1853b4364
raft: add msgDenial to deny removed nodes
2014-09-03 09:19:49 -07:00
Yicheng Qin
690edb2c56
raft: update lead for follower sm when receiving msgApp
...
Or follower may take `none` as its leader forever if it just launched
a failed election whose term is the same as the current leader.
2014-09-03 09:19:49 -07:00
Yicheng Qin
edd8d7e534
etcd: add /v2/admin/machines/ endpoint
2014-09-03 09:19:49 -07:00
Yicheng Qin
f95f53e446
etcd: add /v2/admin/config endpoint
2014-09-03 09:19:49 -07:00
Xiang Li
447d7dc51b
raft: fix log append; add tests
2014-09-03 09:19:49 -07:00
Xiang Li
8ccb8b1f9f
etcd: fake standby
2014-09-03 09:19:49 -07:00
Xiang Li
44836d9099
etcd: move server/usage.go to etcd/v2_usage.go
2014-09-03 09:19:49 -07:00
Xiang Li
b8d71dfe70
v2: remove old tests
2014-09-03 09:19:49 -07:00
Yicheng Qin
02ced2c2d7
v1: deprecate v1 support
...
Etcd moves to 0.5 without the support of v1.
2014-09-03 09:19:49 -07:00
Xiang Li
8d758be3e4
server: remove unused file
2014-09-03 09:05:15 -07:00
Xiang Li
042a8e3d4f
etcd: move util to test
2014-09-03 09:05:15 -07:00
Xiang Li
00935c873f
etcd: refactor tests
2014-09-03 09:05:14 -07:00
Xiang Li
2ff3ce74c5
raft: add sm.Index
2014-09-03 09:05:14 -07:00
Xiang Li
0886e0ddf4
raft: change term to atomicInt
2014-09-03 09:05:14 -07:00
Xiang Li
30f4d9faea
raft: change index and term to int64
2014-09-03 09:05:14 -07:00
Xiang Li
e11c7f35b4
raft: add atomicInt
2014-09-03 09:05:14 -07:00
Xiang Li
284e76f0da
etcd: fix data race in transporter
2014-09-03 09:05:14 -07:00
Xiang Li
3f435571d3
raft: atomic load id
2014-09-03 09:05:14 -07:00
Xiang Li
18d95b336f
main: generate 64bit id
2014-09-03 09:05:14 -07:00
Xiang Li
c4e7432ef9
etcd: support cors
2014-09-03 09:05:14 -07:00
Xiang Li
45c6bf80e1
etcd: support etcd server tls
2014-09-03 09:05:14 -07:00
Xiang Li
4181f1b2e1
etcd: support raft tls
2014-09-03 09:05:14 -07:00
Xiang Li
c3f8eabac3
etcd: separate raft and client port
2014-09-03 09:05:13 -07:00
Xiang Li
10b2f88b83
etcd: support v2 store stats endpoint
2014-09-03 09:05:13 -07:00
Xiang Li
9a59f16964
etcd: support v2 peers endpoint
2014-09-03 09:05:13 -07:00
Xiang Li
f534d6c8f6
etcd: fix machines endpoint test
2014-09-03 09:05:13 -07:00
Xiang Li
6fb2c7c883
etcd: support v2 leader endpoint
2014-09-03 09:05:13 -07:00
Xiang Li
6234164f28
etcd: add a kv tests todo
2014-09-03 09:05:13 -07:00
Xiang Li
ac44e56ea0
etcd: support v2/machines endpoint
2014-09-03 09:05:13 -07:00
Xiang Li
5e486dd912
etcd: use v2 machines prefix
2014-09-03 09:05:13 -07:00
Xiang Li
a88f077348
config: remove unused map
2014-09-03 09:05:13 -07:00
Xiang Li
77233b26d0
etcd: support old flags
2014-09-03 09:05:13 -07:00
Xiang Li
02c854717b
config: make config a self-contained pkg
2014-09-03 09:05:13 -07:00
Xiang Li
60b1f2f437
config: remove deprecated flags
2014-09-03 09:05:13 -07:00
Xiang Li
fc35324ba7
etcd: pass v2 kv api tests
2014-09-03 09:05:13 -07:00
Xiang Li
2af0ad505a
raft: make id int64
2014-09-03 09:05:12 -07:00
Xiang Li
5651272ec8
raft: handle snapshot message
2014-09-03 09:05:12 -07:00
Xiang Li
2a11c1487c
raft: sm.compact and sm.restore
2014-09-03 09:05:12 -07:00
Yicheng Qin
62a90e77b3
raft: send Normal with nil Data when leader is elected out
2014-09-03 09:05:12 -07:00
Xiang Li
064004b899
raft: add log compact
2014-09-03 09:05:12 -07:00
Xiang Li
6a232dfc13
raft: add offset for log
2014-09-03 09:05:12 -07:00
Xiang Li
7be945f59b
etcd: glue
2014-09-03 09:05:12 -07:00
Yicheng Qin
8eac28350d
raft: avoid unexpected self-bootstrap state machine
2014-09-03 09:05:12 -07:00
Yicheng Qin
c86f484712
raft: make judge clear
2014-09-03 09:05:12 -07:00
Yicheng Qin
7dc02b947d
raft: refine TestVote
2014-09-03 09:05:12 -07:00
Yicheng Qin
095251f1fa
raft: Network supports discontinuous ids
2014-09-03 09:05:12 -07:00
Xiang Li
62bdcf6f49
raft: range over sm.ins
2014-09-03 09:05:12 -07:00
Xiang Li
e9cb510ef5
raft: node.Add needs the pubAddr field
2014-09-03 09:05:12 -07:00
Blake Mizerany
5778c49689
raft: set term in reset
2014-09-03 09:05:11 -07:00
Blake Mizerany
67808f8db1
raft: remove vestigial canStep
2014-09-03 09:05:11 -07:00
Blake Mizerany
6044b1a0d7
raft: break Step into pieces
2014-09-03 09:05:11 -07:00
Xiang Li
f387e3e27d
raft: add Entry.isConfig
2014-09-03 09:05:11 -07:00
Xiang Li
3817661f82
raft: rename ConfigAdd/ConfigRemove -> AddNode/RemoveNode
2014-09-03 09:05:11 -07:00
Xiang Li
9f315ffe10
raft: make entry type public
2014-09-03 09:05:11 -07:00
Xiang Li
584186c7ff
add HasLeader function
2014-09-03 09:05:11 -07:00
Blake Mizerany
dd94d5d4e8
raft: move tick comments into cases
2014-09-03 09:05:11 -07:00
Blake Mizerany
15a8b46359
raft: add/remove -> addNode/removeNode
2014-09-03 09:05:11 -07:00
Blake Mizerany
e5b9e22518
raft: Step returns ok
2014-09-03 09:05:11 -07:00
Blake Mizerany
a10461f60d
raft: Add/Remove -> add/remove
2014-09-03 09:05:11 -07:00
Blake Mizerany
8344303b1a
raft: addr -> id
2014-09-03 09:05:11 -07:00
Blake Mizerany
cb2095cddc
raft: fix typo
2014-09-03 09:05:10 -07:00
Xiang Li
cc3a8e26c8
raft: add leader change test for configuration
2014-09-03 09:05:10 -07:00
Blake Mizerany
3a85d97fd9
raft: group Node fields
2014-09-03 09:05:10 -07:00
Xiang Li
6e95448ad7
raft: correct comment for n.Next
2014-09-03 09:05:10 -07:00
Xiang Li
7e27d588ff
raft: return all the appliable entries
2014-09-03 09:05:10 -07:00
Blake Mizerany
f8a3ac9338
raft: make Msgs one line
2014-09-03 09:05:10 -07:00
Blake Mizerany
d12b2c39dd
raft: blake is OCD
2014-09-03 09:05:10 -07:00
Blake Mizerany
78bbb37018
raft: Config -> config
2014-09-03 09:05:10 -07:00
Blake Mizerany
fb1ca245a7
raft: remove unused ClusterId
2014-09-03 09:05:10 -07:00
Blake Mizerany
8c12d6d00f
raft: refactor Node.Add/Remove
2014-09-03 09:05:10 -07:00
Blake Mizerany
96059a496a
raft: replace Node.id
2014-09-03 09:05:10 -07:00
Blake Mizerany
abd2448931
raft: addr -> id
2014-09-03 09:05:10 -07:00
Blake Mizerany
c24b6b4150
raft: init stateMachine in New
2014-09-03 09:05:10 -07:00
Blake Mizerany
7cdd148e24
raft: StartCluster -> Dictate
2014-09-03 09:05:09 -07:00
Xiang Li
1a75beb57c
raft: add confAdd and confRemove entry type
2014-09-03 09:05:09 -07:00
Yicheng Qin
b5f887f5d2
raft: add cluster test
2014-09-03 09:05:09 -07:00
Yicheng Qin
5cad4e595c
raft: add create cluster of itself
2014-09-03 09:05:09 -07:00
Yicheng Qin
193756fa38
raft: add remove node
2014-09-03 09:05:09 -07:00
Xiang Li
961518c893
raft: execute log entries in node.step
2014-09-03 09:05:09 -07:00
Xiang Li
989f41477d
raft: rename peer -> peers
2014-09-03 09:05:09 -07:00
Xiang Li
8ce6b94e05
raft: add and remove
2014-09-03 09:05:09 -07:00
Xiang Li
d293c4915c
raft: fix pendingConf
2014-09-03 09:05:09 -07:00
Xiang Li
c03fbf68d6
raft: add conf safety
...
To make configuration change safe without adding configuration protocol:
1. We only allow to add/remove one node at a time.
2. We only allow one uncommitted configuration entry in the log.
These two rules can make sure there is no disjoint quorums in both current cluster and the
future(after applied any number of committed entries or uncommitted entries in log) clusters.
We add a type field in Entry structure for two reasons:
1. Statemachine needs to know if there is a pending configuration change.
2. Configuration entry should be executed by raft package rather application who is using raft.
2014-09-03 09:05:09 -07:00
Xiang Li
853a458a0d
raft: change ins from array to map
2014-09-03 09:05:09 -07:00
Yicheng Qin
f9c299da8b
raft: return after handling msgBeat
...
It makes the workflow more clear.
2014-09-03 09:05:09 -07:00
Xiang Li
c7e358922b
raft: add elaspe reset test
2014-09-03 09:05:09 -07:00
Xiang Li
5d710c0f7a
raft: add recvMsgBeat test
2014-09-03 09:05:08 -07:00
Xiang Li
12572e5412
raft: add state transition test
2014-09-03 09:05:08 -07:00
Xiang Li
920b80c41f
raft: add single node commit test
2014-09-03 09:05:08 -07:00
Xiang Li
8111d4fbb8
raft: introduce network.cut
2014-09-03 09:05:08 -07:00
Xiang Li
a6a63d116f
raft: add a test for commit rule
2014-09-03 09:05:08 -07:00
Xiang Li
28f87c2a43
raft: use sm.maybeCommit; should not call log.maybeCommit directly
2014-09-03 09:05:08 -07:00
Yicheng Qin
4d22ff90d5
raft: refactor network simulator
...
Signed-off-by: Blake Mizerany <blake.mizerany@gmail.com >
2014-09-03 09:05:08 -07:00
Yicheng Qin
a9c81088f8
raft: add new diff
...
Signed-off-by: Blake Mizerany <blake.mizerany@gmail.com >
2014-09-03 09:05:08 -07:00
Xiang Li
c32d34166e
raft: leader updates its own match; tries to commit after a prop
2014-09-03 09:05:08 -07:00
Xiang Li
6fa74b0e33
raft: do bcast when receiving msgBeat
2014-09-03 09:05:08 -07:00
Xiang Li
09d1575eeb
raft: node.tick
2014-09-03 09:05:08 -07:00
Xiang Li
eff3aadba1
raft: add full stop to every function comment
2014-09-03 09:05:08 -07:00
Xiang Li
167ef7e8b0
raft: test leader replies to appResp
2014-09-03 09:05:08 -07:00
Xiang Li
9bb7265d64
raft: leader only sends append to the unsynced peer when get a bad appResp
2014-09-03 09:05:07 -07:00
Xiang Li
88674a623a
raft: use if statement to handle voteResp
2014-09-03 09:05:07 -07:00
Xiang Li
b3de2b3450
raft: testVote - breaks state machine init to multiple lines
2014-09-03 09:05:07 -07:00
Xiang Li
59a720d8be
raft: vote test for candidate and leader
2014-09-03 09:05:07 -07:00
Xiang Li
828a8cf326
raft: leader denies vote with the same term
2014-09-03 09:05:07 -07:00
Xiang Li
93b08502e4
raft: check voteFor
2014-09-03 09:05:07 -07:00
Yicheng Qin
c1c45575be
raft: ins: []*index -> []index
...
It could make raft faster, use less storage.
2014-09-03 09:05:07 -07:00
Xiang Li
1170c21f89
raft: add a single candidate test
2014-09-03 09:05:07 -07:00
Xiang Li
2066ff5acb
raft: candidate should become leader directly if it is a one node cluster
2014-09-03 09:05:07 -07:00
Xiang Li
0cdd1b58a4
raft: rename log.commit to log.committed
2014-09-03 09:05:07 -07:00
Xiang Li
9cd3b2153f
raft: comment log.nextEnts
2014-09-03 09:05:07 -07:00
Xiang Li
a06729a96a
raft: use log.lastIndex()
2014-09-03 09:05:07 -07:00
Xiang Li
888ddacd3c
raft: remove the init cap of log entries
2014-09-03 09:05:06 -07:00
Xiang Li
2ef9498d6f
raft: remove TLA comment
2014-09-03 09:05:06 -07:00
Xiang Li
1f0e13e956
raft: remove sm.voteWorthy
2014-09-03 09:05:06 -07:00
Xiang Li
bee9d8bea5
raft: add log.maybeAppend
2014-09-03 09:05:06 -07:00
Xiang Li
b70be19653
raft: add log.maybeCommit
2014-09-03 09:05:06 -07:00
Xiang Li
092461d7c8
raft: rename log.len to log.lastIndex
2014-09-03 09:05:06 -07:00
Xiang Li
8f3d109c18
raft: rename log.isOk to log.matchTerm
2014-09-03 09:05:06 -07:00
Xiang Li
4c609ec59c
raft: new log struct
2014-09-03 09:05:06 -07:00
Xiang Li
cb7b75c15f
raft: remove unused function maybeAppend
...
Signed-off-by: Blake Mizerany <blake.mizerany@gmail.com >
2014-09-03 09:05:06 -07:00
Xiang Li
74737b76cc
raft: leader commit and test
...
Signed-off-by: Blake Mizerany <blake.mizerany@gmail.com >
2014-09-03 09:05:06 -07:00
Xiang Li
c223eca938
raft: clean stateMachine
2014-09-03 09:05:06 -07:00
Xiang Li
5b052e1e10
raft: prop msg type should be MsgProp
2014-09-03 09:05:06 -07:00
Xiang Li
ab79550693
raft: use becomeFollower in cadidate state
2014-09-03 09:05:06 -07:00
Xiang Li
73e3394d2d
raft: reverse sort to figure out the ci
2014-09-03 09:05:05 -07:00
Blake Mizerany
8ddcd9799d
raft: go fmt
2014-09-03 09:05:05 -07:00
Blake Mizerany
6e0a668455
raft: add Node.Next
2014-09-03 09:05:05 -07:00
Blake Mizerany
9545662c6b
raft: return *Node
2014-09-03 09:05:05 -07:00
Blake Mizerany
50e0db4038
raft: attempt first version of Interface
2014-09-03 09:05:05 -07:00
Blake Mizerany
8d7be33dd8
raft: move to raft pkg
2014-09-03 09:05:05 -07:00
Blake Mizerany
f6f4329899
raft: test logs converge
2014-09-03 09:05:05 -07:00
Blake Mizerany
935320289e
raft: remove defunct empty var
2014-09-03 09:05:05 -07:00
Blake Mizerany
8353340697
raft: remove defunct println
2014-09-03 09:05:05 -07:00
Blake Mizerany
45500c5e7b
raft: test candidate concede
2014-09-03 09:05:05 -07:00
Blake Mizerany
8942415933
raft: test failed election
2014-09-03 09:05:05 -07:00
Blake Mizerany
fcc7a42d6c
raft: remove heal from network
2014-09-03 09:05:05 -07:00
Blake Mizerany
13012ddd9a
raft: test vote
2014-09-03 09:05:04 -07:00
Blake Mizerany
706c6df2ce
raft: add TODO
2014-09-03 09:05:04 -07:00
Blake Mizerany
0ac49ba58d
raft: fix logDiff false positives
2014-09-03 09:05:04 -07:00
Blake Mizerany
b06c0cc3ec
raft: ignore old messages
2014-09-03 09:05:04 -07:00
Blake Mizerany
895d80d0e1
raft: test dualing proposers
2014-09-03 09:05:04 -07:00
Blake Mizerany
0ca153e1e5
raft: make testing logs easier
2014-09-03 09:05:04 -07:00
Blake Mizerany
9f8ede7b03
start new raft implementation
2014-09-03 09:05:04 -07:00
Yicheng Qin
0a2384bf4d
Merge pull request #969 from jurmous/patch-5
...
Add Etcd4j as a new Java client option
2014-08-29 09:15:16 -07:00
Jurriaan Mous
be0bb56525
Add Etcd4j as a new Java client option
2014-08-29 10:45:46 +02:00
Yicheng Qin
6e70dfc33a
Merge pull request #967 from jurmous/patch-3
...
Update clients-matrix.md
2014-08-28 14:38:58 -07:00
Jurriaan Mous
0e1f0a734b
Swapped the clients with the features on the clients matrix so it is more comprehensible. The old version got too large to show on the screen. This new layout added a language column so you can quickly see the language of the client library.
...
Added alphabetical sorting to the clients list.
Also moved v1-only clients to the bottom since v2 is what most people are looking for today.
2014-08-28 23:20:23 +02:00
Yicheng Qin
2b6e45d0ee
Merge pull request #966 from justintime/patch-1
...
Add link to etcd-browser under Tools heading
2014-08-28 11:11:19 -07:00
Justin Ellison
07217b8d7c
Add link to etcd-browser under Tools heading
2014-08-28 12:02:39 -05:00
jurmous
6ea8da077e
Merge pull request #1 from coreos/master
...
Pull coreos changes into this fork
2014-08-28 10:14:14 +02:00
Yicheng Qin
ab4bcc1869
Merge pull request #962 from aterreno/master
...
Added etc-clojure to the list of clients supporting V.2 api
2014-08-27 17:31:06 -07:00
Antonio Terreno
0e53287ea2
Added etc-clojure to the list of clients supporting V.2 api
2014-08-27 09:50:08 +01:00
Yicheng Qin
3fc68f00f0
Merge pull request #956 from jurmous/patch-2
...
Remove an invalid comma from api.md example
2014-08-25 08:20:31 -07:00
Yicheng Qin
4a04a89cb4
Merge pull request #955 from jurmous/patch-1
...
Adding missing comma to api.md
2014-08-25 08:18:21 -07:00
Yicheng Qin
b3970c8db1
Merge pull request #942 from robszumski/master
...
docs: clarify tuning timeouts
2014-08-25 08:16:33 -07:00
Yicheng Qin
36c57b7717
Merge pull request #939 from suzaku/ignore
...
Add .dockerignore to avoid including .git in docker build context
2014-08-25 08:15:03 -07:00
jurmous
8f629aae4b
Remove an invalid comma from api.md example
2014-08-25 11:09:15 +02:00
jurmous
dead5e0eef
Adding missing comma to api.md
...
Invalid json example
2014-08-25 10:55:56 +02:00
Yicheng Qin
fa156aaf53
Merge pull request #954 from ddysher/master
...
Fix Typo in api.md.
2014-08-24 13:36:49 -07:00
Deyuan Deng
e491c16afa
Fix Typo in api.md.
2014-08-24 10:42:47 -04:00
Jonathan Boulle
95fe075a17
Merge pull request #950 from zxc122333/patch-1
...
doc:[readme.md] fix Planning/Roadmap 404
2014-08-22 15:58:40 -07:00
qinghong.sheng
e698c378e7
doc:readme.md fix Planning/Roadmap 404
2014-08-21 16:08:03 +08:00
Yicheng Qin
b083766608
Merge pull request #937 from andybons/patch-3
...
Update to Go 1.3.1
2014-08-20 12:55:33 -07:00
Yicheng Qin
82db1e7919
Merge pull request #923 from unihorn/113
...
docs: set snapshot to be true in default configuration
2014-08-20 10:02:04 -07:00
Rob Szumski
7c7a70202b
docs: clarify tuning timeouts
2014-08-18 16:15:59 -04:00
satoru
f734ba9974
Add .dockerignore to avoid including .git in docker build context
...
.git is currently the biggest directory
2014-08-15 16:38:29 +08:00
Yicheng Qin
511ac3280f
Merge pull request #927 from bmatsuo/topic/Documentation/fix-tuning-timeout-toml
...
Documentation: fix timeout tuning TOML example
2014-08-14 00:52:39 -07:00
Andrew Bonventre
a32cd31d3b
Update to Go 1.3.1
2014-08-13 10:54:51 -07:00
Yicheng Qin
186879cce0
Merge pull request #928 from grossws/patch-1
...
Typo fixes
2014-08-12 11:40:27 -07:00
Yicheng Qin
dd9aa95f1f
Merge pull request #918 from edwardcapriolo/patch-1
...
Update libraries-and-tools.md
2014-08-12 11:38:36 -07:00
grossws
616db55e08
Typo fix
2014-08-11 15:57:00 +04:00
Bryan Matsuo
b52d4cdbb2
Documentation: fix timeout tuning TOML example
...
this makes the TOML example for tuning the peer election timeout
consistent with the guide's advice and with the other examples.
2014-08-10 20:09:14 -07:00
edwardcapriolo
d99567f698
Update clients-matrix.md
2014-08-10 16:48:59 -04:00
Yicheng Qin
629c578cea
docs: set snapshot to be true in default configuration
...
If snapshot is false, it will consume much memory and become rather
slow after several days. Make it on as default.
2014-08-09 09:35:29 -07:00
Brandon Philips
95d295da54
Documentation: remove "token" from discovery docs
...
It was a bit confusing how the term "token" was overriden in various ways in this doc. Clean it up by referring to it as a discovery URL.
2014-08-08 17:56:58 -07:00
edwardcapriolo
97a1ca1ad3
Update libraries-and-tools.md
...
Added a new small c++ library
2014-08-06 10:50:28 -04:00
Yicheng Qin
c9db87a302
server: bump to 0.4.6+git
2014-07-29 10:33:44 -07:00