Yicheng Qin
d78116c35b
Merge pull request #675 from unihorn/56
...
fix(peer_server): exit all server goroutines in Stop()
2014-05-07 08:09:14 -07:00
Yicheng Qin
6516cf854c
chore(server): rename daemon to startRoutine
...
For better understanding.
2014-05-07 07:51:44 -07:00
Yicheng Qin
e55512f60b
fix(peer_server): graceful stop for peer server run
...
Peer server will be started and stopped repeatedly in the design.
This step ensures its stop doesn't affect the next start.
The patch includes goroutine stop and timer trigger remove.
2014-05-07 07:43:27 -07:00
Yicheng Qin
0c95e1eabb
feat(peer_server): forbid rejoining with different name
...
Or it will confuse the cluster, especially the heartbeat between nodes.
2014-04-17 15:46:33 -07:00
Yicheng Qin
82dee82bfd
chore: gofmt go files
2014-04-17 08:47:48 -07:00
Yicheng Qin
67600603c5
chore: rename proxy mode to standby mode
...
It makes the name more reasonable.
2014-04-17 08:04:42 -07:00
Yicheng Qin
65b872c8b5
Merge pull request #725 from dougm/server-lifecycle-fixes
...
fix(server): avoid race conditions in Run/Stop
2014-04-15 11:54:35 -07:00
Yicheng Qin
adf4acf947
chore: gofmt go files
2014-04-15 09:42:25 -07:00
Doug MacEachern
d73390a674
fix(server): avoid race conditions in Run/Stop
...
- don't close ready channel until PeerServer is listening.
avoids possible panic in Stop() if PeerServer is nil.
- avoid data race in Run() (err variable was shared between 2 goroutines)
- avoid data race in PeerServer Start/Stop (PeerServer.closeChan)
2014-04-15 09:24:54 -07:00
Yicheng Qin
8bcfb2ecaf
Merge pull request #707 from unihorn/62
...
fix(peer_server): recover from outage with discovery
2014-04-14 13:58:43 -07:00
Yicheng Qin
03839ca806
fix(peer_server): recover from outage with discovery
...
This patch also contains the refactor of find cluster process.
It is changed based on @xiangli-cmu 's commits in 627 issue.
2014-04-14 13:56:47 -07:00
Xiang Li
0b790abd46
Merge pull request #705 from unihorn/61
...
feat: set NOCOW for log directory when in btrfs
2014-04-14 16:40:38 -04:00
Xiang Li
4fd9e627c0
fix(peer join) fix wrong join command redirection
...
1. We use PUT request to do a V2 join. So we should redirect a PUT request rather than a POST.
2. /admin only accept V2Join request. Send out V2Join instead of V1Join.
2014-04-13 21:33:02 -04:00
Yicheng Qin
56ef6fbcae
make necessary changes
2014-04-11 17:00:14 -07:00
Yicheng Qin
79a89dcb82
Revert "Revert "fix(server): only set NOCOW for log file""
...
This reverts commit 9540575690db92a362f66d9aa4f2671265b87eb1.
Conflicts:
etcd/etcd.go
2014-04-11 16:33:50 -07:00
Yicheng Qin
9540575690
Revert "fix(server): only set NOCOW for log file"
...
This reverts commit 1eff547af61c2453b106f65691f928ddf8088a6b.
2014-04-09 14:39:16 -07:00
Yicheng Qin
1eff547af6
fix(server): only set NOCOW for log file
2014-04-09 12:35:32 -07:00
Yicheng Qin
a3cbf02597
fix(tests): pass all tests using latest raft
2014-03-24 17:35:45 -07:00
Ben Johnson
62b89a128a
Merge branch 'master' of https://github.com/coreos/etcd into proxy
...
Conflicts:
config/config.go
server/peer_server.go
server/transporter.go
tests/server_utils.go
2014-03-24 15:30:14 -07:00
Ben Johnson
174b9ff343
bump(github.com/goraft/raft): 6bf34b9
...
Move from coreos/raft to goraft/raft and update to latest.
2014-03-24 15:09:47 -07:00
Ben Johnson
7d4fda550d
Machine join/remove v2 API.
2014-03-18 16:25:21 -06:00
Ben Johnson
c0a59b3a27
Add minimum active size and promote delay.
2014-03-10 14:44:04 -06:00
Ben Johnson
c91688315a
Minor fixes to proxies.
2014-03-07 07:38:40 -07:00
Ben Johnson
3fff1a8dcd
Add /machines and /machines/:name endpoints.
2014-03-06 15:11:31 -07:00
Ben Johnson
fe4dee03ab
Minor fixes.
2014-03-04 09:29:44 -07:00
Ben Johnson
c8d6b26dfd
Add auto-demotion after peer inactivity.
2014-03-03 11:15:05 -07:00
Yicheng Qin
349a802a82
chore(server): remove useless CancelWhenTimeout
...
Setting request timeout is covered by go-httpclient now.
2014-02-28 21:52:56 -08:00
Yicheng Qin
df49265674
fix(discovery): remove its own address from peer list to join
2014-02-27 14:31:28 -08:00
Ben Johnson
fddbf35df2
Add automatic node promotion / demotion.
2014-02-25 10:02:01 -07:00
Ben Johnson
f5698d3566
Proxy promotion.
2014-02-24 17:01:04 -07:00
Ben Johnson
1d961b8e56
Add proxy mode.
2014-02-22 15:02:20 -07:00
Yicheng Qin
3a4df1612c
feat(discovery): adjust boot order to find peers
...
The boot order for peers is -discovery, -peers, log data, forming
new cluster itself.
Special rules:
1. If discovery succeeds, it would find peers specified by discover URL
only.
2. Etcd would fail when meeting bad -discovery, no -peers and log data.
Add TestDiscoveryDownNoBackupPeersWithDataDir as the test.
2014-02-17 12:53:39 -08:00
Brandon Philips
76da437f29
bump(github.com/coreos/raft): ef3280ce54f60fff98a72012f547ed2b3415841f
2014-02-07 11:19:23 -08:00
Brandon Philips
1b3481fe25
fix(server/peer_server): stop the raftServer in Stop()
...
Stop() the raftServer if we stop the peerServer so that tests that start
and stop PeerServers exit cleanly.
2014-02-06 22:10:10 -08:00
Brandon Philips
468a68c96c
feat(server): make the RetryInterval of PeerServer tunable
...
For tests and other environments it would be nice to be able to tune how
long to sleep between retries.
2014-02-06 22:10:09 -08:00
Brandon Philips
72514f8ab2
feat(bootstrap): initial working code
...
This is an initial version of the bootstrap code that seems to work
under the normal circumstances. I need to mock out a server that will
test out all of the error cases now.
2014-02-05 09:27:39 -08:00
Brandon Philips
9e43e726a9
Merge pull request #507 from philips/turn-snapshots-on-by-default
...
feat(*): enable snapshots by default
2014-02-05 09:08:43 -08:00
Brandon Philips
13b6c1e684
chore(*): make everything use goven
...
for i in github.com/BurntSushi/toml github.com/coreos/go-etcd/etcd github.com/coreos/go-log/log github.com/gorilla/context github.com/rcrowley/go-metrics bitbucket.org/kardianos/osext github.com/coreos/go-systemd/journal github.com/coreos/raft code.google.com/p/goprotobuf/proto ; do goven -copy -rewrite $i; done
2014-02-01 23:44:18 -08:00
Brandon Philips
ea8a353545
chore(*): gofmt everything
2014-02-01 23:44:10 -08:00
Brandon Philips
9a0ddb3760
feat(server): log on snapshot success or failure
...
lila.local: snapshot of 12 events completed at index 479
lila.local: snapshot of 12 events at index 491 attempted and failed: handling snapshot
2014-01-24 07:13:01 -08:00
Brian Waldon
2fe22f1890
refactor(servers): emit http.Handlers from *Server
2014-01-22 11:17:58 -08:00
Brian Waldon
f158dfcd77
refactor(peerserver): Remove PeerServerConfig.Path
2014-01-22 11:17:58 -08:00
Brian Waldon
19980a7033
refactor(peerserver): remove timeouts from PeerServerConfig
2014-01-22 11:17:58 -08:00
Brian Waldon
0abd860f7e
refactor(server): drop Serve code; rename cors object
...
* server/cors.go renamed to http/cors.go
* all CORS code removed from Server and PeerServer
* Server and PeerServer fulfill http.Handler, now passed to http.Serve
* non-HTTP code in PeerServer.Serve moved to PeerServer.Start
2014-01-22 11:17:57 -08:00
Brian Waldon
a2ee620394
refactor(raft): init raft transporter & server in main
2014-01-22 11:17:56 -08:00
Brian Waldon
ffa2b07dc4
refactor(transporter): Pass in everything the transporter needs
2014-01-22 11:17:43 -08:00
Brian Waldon
60bbc57aeb
refactor(transporter): pass in timeouts
2014-01-22 11:17:43 -08:00
Brian Waldon
86718167e8
refactor(peer_server): move stats construction to factories
2014-01-22 11:17:42 -08:00
Brian Waldon
7bd4d05a38
refactor(peer-server): move listener init out of peer_server.go
2014-01-22 11:17:41 -08:00
Brian Waldon
91fc6aabd2
chore(gofmt): Run gofmt
2014-01-22 11:17:26 -08:00