Anthony Romano
d7ad721ede
etcdserver: stop if removed along with multiple conf changes
...
shouldstop would get clobbered when several conf changes are in an apply
2015-12-23 16:29:21 -08:00
Xiang Li
289de69632
Merge pull request #4048 from xiang90/util
...
etcdserver: move unti out of server.go
2015-12-22 15:41:39 -08:00
Xiang Li
d6d12b4d86
etcdserver: move unti out of server.go
...
etcdserver file is messy enough. Let's make it be less messy.
2015-12-22 15:17:14 -08:00
Xiang Li
59998dbc50
Merge pull request #3882 from colhom/etcd2-backup
...
contrib/systemd: etcd2-backup package and docs
2015-12-22 15:08:54 -08:00
Anthony Romano
c147da94a2
Merge pull request #4041 from heyitsanthony/v3-snapshot-low-latency
...
low latency V3 snapshot recovery
2015-12-22 15:03:35 -08:00
Colin Hom
85cd4d9647
contrib/systemd: etcd2-backup package and docs
...
multi-node backup and restore procedures for etcd2 clusters, presented as systemd jobs.
2015-12-22 14:52:10 -08:00
Anthony Romano
aca0c466ed
etcdserver: asynchronously notify applier when raft writes finish
...
The raft loop would block on the applier's done channel after
persisting the raft messages; the latency could cause dropped network
messages. Instead, asynchronously notify the applier with a buffered
channel when the raft writes complete.
2015-12-22 14:15:14 -08:00
Anthony Romano
9d05a0d959
etcdserver: apply v3 database updates outside server event loop
...
raft's applyc writes block on the server loop's database IO since
the next applyc read must wait on the db operation to finish.
Instead, stream applyc to a run queue outside the server loop.
2015-12-22 14:15:09 -08:00
Anthony Romano
23d645babd
Merge pull request #4046 from heyitsanthony/etcdserver-server-select-refactor
...
etcdserver: refactor server.go select loop
2015-12-22 12:29:10 -08:00
Anthony Romano
7e00325fe9
etcdserver: refactor server.go select loop
...
splits out the apply case into smaller functions
2015-12-22 12:13:39 -08:00
Xiang Li
79fa03081c
Merge pull request #4045 from philips/add-raftexample-to-raft-docs
...
raft: add raftexample to the docs
2015-12-22 12:06:23 -08:00
Brandon Philips
c72e4ae112
raft: add raftexample to the docs
...
To help people wanting use this package get started point to the
raftexample package.
2015-12-22 12:04:39 -08:00
Jonathan Boulle
b79dae287d
Merge pull request #4042 from jonboulle/master
...
pkg: fix tiny docstring typo in ioutil
2015-12-22 17:00:17 +01:00
Jonathan Boulle
50efd01e34
pkg: fix tiny docstring typo in ioutil
2015-12-22 16:37:22 +01:00
Gyu-Ho Lee
eaaf98348c
Merge pull request #4040 from gyuho/godep_20151221
...
Godeps: add missing dependencies
2015-12-21 22:30:04 -08:00
Gyu-Ho Lee
293103cc24
Godeps: add missing dependencies
...
I reran Godep after this patch https://github.com/tools/godep/pull/352 .
2015-12-21 22:20:07 -08:00
Gyu-Ho Lee
b1138a42a2
Merge pull request #4036 from gyuho/storage_test_unsynced
...
storage: add more tests for synced, unsynced for watchable store
2015-12-21 20:30:43 -08:00
Gyu-Ho Lee
28d0e473a7
storage: add more tests for synced, unsynced for watchable store
...
This adds more tests on functions that updates synced and unsynced in watchable
store. Preparatory change for https://github.com/coreos/etcd/issues/3848 .
2015-12-21 20:20:08 -08:00
Xiang Li
f3f5726b8a
Merge pull request #4037 from xiang90/proxy
...
etcdmain: fix incomplete proxy config file
2015-12-21 16:37:55 -08:00
Xiang Li
4bcd7587e2
etcdmain: fix incomplete proxy config file
...
etcd might generate incomplete proxy config file after a power failure.
It is because we use ioutil.WriteFile. And iotuile.WriteFile does
not call Sync before closing the file.
2015-12-21 16:15:00 -08:00
Anthony Romano
d639e4f7f6
Merge pull request #4033 from heyitsanthony/raftexample-tests
...
Raftexample tests
2015-12-21 13:14:28 -08:00
chz
63bc804253
contrib/raftexample: shutdown rafthttp on closed proposal channel
...
Otherwise listening ports leak across unit tests and ports won't bind.
2015-12-21 13:03:42 -08:00
chz
b73a11ff45
contrib/raftexample: follow pipeline guidelines closer
...
close raft commit channel before issuing raft error since it's done
sending
2015-12-21 13:03:42 -08:00
chz
b7cf2385e6
contrib/raftexample: add test, fix dead lock on proposal channel
...
deadlock if no leader; node selects on propc=nil and writes to Ready,
client blocks on propC in same select as Ready reader, and so progress
of raft state machine deadlocks.
2015-12-21 13:03:35 -08:00
Xiang Li
2681137fe0
Merge pull request #4020 from xiang90/ctl_04
...
etcdctl: support etcd0.4
2015-12-21 12:55:03 -08:00
Xiang Li
541f2e5200
etcdctl: support basic operations with etcd 0.4.
...
For CoreOS users, they will get a updated version of etcdctl without updating
the etcd server version. And the users cannot really control this behavior.
We do not want to suddenly break them without enough communication.
So we still want the most basic opeartions like get, set, watch of etcdctl2 work
with etcd 0.4. This patches solve the incompability issue.
2015-12-21 11:59:13 -08:00
Xiang Li
5587c4aa9a
client: support reset Endpoints.
...
ResetEndpoints is useful when the there is a scheduled cluster
changes or when manually manage the cluster without auto-sync
enabled.
2015-12-21 11:59:13 -08:00
Gyu-Ho Lee
7e26fe9c16
Merge pull request #4032 from gyuho/one_mutex_for_storage
...
storage: use only one mutex for store struct
2015-12-21 11:58:44 -08:00
Gyu-Ho Lee
84d777305d
storage: use only one mutex for store struct
...
Mutex is a variable, which means there needs to be only one mutex
value per scope. We don't need a separate mutex inside store struct,
**if we assume that `TxnPut` and `TxnRange` are called ONLY ONCE
per transaction (between `TxnBegin` and `TxnEnd`)**, as documented.
2015-12-21 11:42:40 -08:00
Xiang Li
2a351e62f1
Merge pull request #4024 from heyitsanthony/add-command-argusage
...
etcdctl: member add command argusage to help
2015-12-21 10:59:07 -08:00
Anthony Romano
2974c4ec27
etcdctl: fill out ArgsUsage fields for help
...
USAGE in help now names positional arguments (e.g., "member remove <memberID>"
instead of "member remove [arguments...]")
Fixes #4021
2015-12-21 09:05:37 -08:00
Xiang Li
c4732eb6e1
Merge pull request #4028 from gyuho/storage_test_variable
...
storage: remove unnecessary test variable assignment
2015-12-20 15:33:52 -08:00
Gyu-Ho Lee
2377ef870a
storage: remove unnecessary test variable assignment
...
There is no need to assign a separate variable since 'base' is already defined
as a local variable within the loop.
2015-12-20 14:23:27 -08:00
Jonathan Boulle
98c1745278
Merge pull request #4026 from jonboulle/master
...
tests: update + enable check for leaked goroutines
2015-12-20 20:31:15 +01:00
Jonathan Boulle
b126ff77fb
tests: only check for go1.5+ once
2015-12-20 19:51:53 +01:00
Jonathan Boulle
d50fbe384a
tests: ignore leaked readLoop on go <1.5
2015-12-20 19:51:06 +01:00
Jonathan Boulle
e1fe7350a2
tests: update + enable check for leaked goroutines
...
Go 1.4 landed a new testing.M type [1][1] which allows for start-up and
shutdown hooks when running tests. The standard library now uses this
for checking for leaked goroutines in net/http [2][2].
This patch essentially re-ports the updated code from the net/http test
(we were using an older version of it) - in detail:
- updates the test to use `TestMain` instead of relying on
`TestGoroutinesRunning` to be implicitly run after all other tests
- adds a few new goroutines to the list of exceptions (the test itself,
as well as the golang/glog package and pkg/log.MergeLogger, both of
which spin off goroutines to handle log flushing/merging respectively)
- removes a couple of TODOs in the test for extra goroutines that's run
after individual tests (one of these re-enables the http package's
`.readLoop` and the other was an out-of-date TODO)
- re-enables the test
[1]: https://golang.org/pkg/testing/#M
[2]: https://github.com/golang/go/blob/release-branch.go1.4/src/net/http/main_test.go#L18
2015-12-20 19:51:06 +01:00
Xiang Li
dd76ee5801
Merge pull request #4027 from jcderr/patch-1
...
Radius Intelligence Use Case
2015-12-20 10:48:04 -08:00
Jeremy Derr
a5f9403f8f
Update production-users.md
...
Adding use case for Radius Intelligence.
2015-12-20 10:12:48 -08:00
Jonathan Boulle
2e736b51cc
Merge pull request #4025 from jonboulle/sjpotter-api-nits
...
docs/api: add version & health, split out members
2015-12-19 17:42:32 +01:00
Jonathan Boulle
c18549261f
docs: split out members API into own document
...
Also changes a few references to settle consistently on "members API"
instead of "member API" or "member APIs".
2015-12-19 15:57:15 +01:00
Shaya Potter
899dc4a6a6
docs: move /version to other_apis and add /health
...
moved /version http endpoint to other_api document and added health with
an example
2015-12-19 15:57:01 +01:00
Jonathan Boulle
cfd030fabf
Merge pull request #4014 from ppalucki/functional
...
tools: add functional tester with Docker
2015-12-19 15:17:13 +01:00
Anthony Romano
9ee9e552e6
Godep: update codegangsta/cli dependency
...
Update codegangsta/cli dependency to the newer version for ArgsUsage
2015-12-18 17:48:04 -08:00
Pawel Palucki
4f5f999847
tools/functional-test: add docker support
...
Commit adds docker bits to run functional tester within containers.
requires:
- docker 1.9 (networking)
- docker-compose
2015-12-18 15:56:18 +01:00
Xiang Li
bff857dc28
Merge pull request #4011 from heyitsanthony/raftexample
...
contrib: example key-value store using raft
2015-12-17 15:05:59 -08:00
Anthony Romano
1f858e10c8
contrib: example key-value store using raft
2015-12-17 14:41:37 -08:00
Jonathan Boulle
afee51eeda
Merge pull request #4013 from mickep76/update-libraries-and-tools
...
libraries-and-tools: name change for etcd-export to etcdtool
2015-12-17 14:34:36 +01:00
Michael Persson
e4e2a7933f
libraries-and-tools: name change for etcd-export to etcdtool
2015-12-17 13:52:14 +01:00
Xiang Li
9b0b15c9be
Merge pull request #4006 from mitake/kvtest-deadlock
...
storage, test: unlock transaction in the retry loop
2015-12-16 18:06:14 -08:00