258 Commits

Author SHA1 Message Date
Yicheng Qin
76ac1da7ea feat(server): add HEAD for v1/watch 2014-04-08 17:37:05 -07:00
Yicheng Qin
89d3df242c chore(server): handle HEAD for key space efficiently
Implement HEAD in server/v1 and server/v2 functions to avoid
time wasting on JSON marhsal.
2014-04-07 18:55:07 -07:00
Yicheng Qin
28f19dec60 feat(server): make header-only requests work 2014-04-07 13:51:33 -07:00
Brandon Philips
eeca12a4c0 Merge pull request #663 from tsenart/master
Making code formatting consistent.
2014-03-27 17:08:12 -07:00
Tomás Senart
b6053d6a86 Making code formatting consistent.
$ gofmt -s -w  && goimports -w
2014-03-27 14:19:08 +01:00
Yicheng Qin
8afa93ed59 chore(server/listener): improve comment 2014-03-25 22:51:52 -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
Yicheng Qin
df2b565397 fix(test/server): avoid watch test timeout by moving json decode
These tests were timing out because the combination of the GET and JSON
decode was taking longer than the timeout. Pull the JSON decode out of
the go routine that is being timed.
2014-03-18 08:49:14 -07:00
Xiang Li
3ae792b159 refactor(listener) refactor listener related code
Remove duplicate code around creating http listener.
Start to listen incoming http requests just before serving them.
2014-03-13 15:47:27 -07:00
Xiang Li
c8e65c1315 Merge pull request #616 from xiangli-cmu/add_snapshot_post
fix(server/transporter.go) fix the short timeout problem of sending snapshot
2014-03-11 18:51:47 -07:00
Ben Johnson
e9a1ac15d9 Allow partial cluster config updates. 2014-03-10 16:05:03 -07:00
Ben Johnson
c0a59b3a27 Add minimum active size and promote delay. 2014-03-10 14:44:04 -06:00
Mikhail Goncharov
074c78d725 fix(store): corrected CAS and CAD fail cause in response
specifically when both prevIndex and prevValue are provided
2014-03-08 14:50:34 +07:00
Xiang Li
312ac5d066 fix(server/transporter.go) fix the short timeout problem of sending snapshot
Snapshot can be tens of MB. We need to have a minute level timeout for sending snapshot.
We add a separate snapshot http client for snapshot request, which has 120s timeout.
2014-03-08 00:15:47 -05: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
3cd83c61c4 Fix PUT /config response and log errors. 2014-03-06 13:35:46 -07:00
Ben Johnson
fe4dee03ab Minor fixes. 2014-03-04 09:29:44 -07:00
Ben Johnson
c3b4afc139 Fix JoinCommand comment. 2014-03-04 08:56:10 -07:00
Ben Johnson
063f3b574c Check for peer before demotion. 2014-03-04 08:53:13 -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
69adb78433 fix(transporter): CancelRequest doesn't work on HTTPS connections blocked
Currently this is a workaround. And it should be fixed in Go1.3.
2014-02-27 14:31:46 -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
46d817f91b Merge pull request #577 from unihorn/6
chore: rename 'heartbeat timeout' to 'heartbeat interval'
2014-02-18 17:11:31 -08:00
Yicheng Qin
f434177a9a chore: rename 'heartbeat timeout' to 'heartbeat interval'
Heartbeat timeout means the period length that indicates heartbeat is
out of service, which is different from heartbeat interval.

So we should use '-peer-heartbeat-interval' instead of
'-peer-heartbeat-timeout' in etcd.

'-peer-heartbeat-timeout' is deprecated but still could be used.
2014-02-18 16:37:20 -08:00
Brandon Philips
8485987b74 Merge pull request #524 from yifan-gu/remove_omitempty_on_value
remove omitempty on value
2014-02-18 07:08:00 -08:00
evan-gu
9cfd8c5f0b fix(store): make NodeExtern.Value a *string
Before this change if the value of a Node was "" it would get dropped from the json
encoding and the Node.Value field would be missing. Fix this problem by making
NodeExtern.Value a *string so that an empty string will be encoded but a nil value
will drop the field.
2014-02-18 00:50:44 -05:00
Yicheng Qin
04f21b5976 Merge pull request #569 from unihorn/5
Ordering and functionality of `-discovery` `-peers` and data dir to find peers
2014-02-17 14:34:53 -08: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
Yicheng Qin
bd56b15b6e fix(tests/discovery): use host as -peers parameter instead of url
Or it cannot test the functionality correctly.
Moreover, add TestDiscoveryNoWithBackupPeers as the test for it.
2014-02-14 18:23:41 -08:00
Brandon Philips
fccecd4a05 fix(etcd): get consistent with etcdctl on printing versions
Lets get a bit more consistent in printing the versions:

```
$ ./bin/etcd -version
etcd version 0.3.0+git
$ ./bin/etcdctl -v
etcdctl version 0.3.0+git
```
2014-02-13 07:54:44 -08:00
Brandon Philips
db1b53fde7 chore(server): add +git to the version
we need to automate this but make sure versions built from git have
+git after the version number.
2014-02-12 22:02:00 -08:00
Brandon Philips
7015214fbb Merge pull request #554 from mfischer-zd/tls_fixes
fix(server/tls_info): use all certificates in CA file
2014-02-11 10:17:33 -08:00
Michael S. Fischer
e1af3dbde6 fix(server/tls_info): use all certificates in CA file
fixes coreos/etcd#553
2014-02-10 22:31:22 -08:00
Michael Marineau
f206db2cee add(server/v1/tests): Port many of the v2 HTTP handler tests to v1
This should cover most aspects of the v1 API but being new to the etcd
code base I cannot promise that or that the tests are even correct.
They do pass though :)
2014-02-10 22:18:06 -08:00
Brandon Philips
68383b1293 fix(server/v1): don't fail put on new v1 key
We weren't checking for PrevNode being nil in the v1 code path. Do this
and add a test.

Fixes #557
2014-02-10 18:59:56 -08:00
Brandon Philips
ddc40e5b45 doc(CHANGELOG): document v0.3.0 2014-02-07 15:54:45 -08:00
Brian Waldon
42363001b4 fix(v2): Use case-insensitive check on bool query params
Fix issue #261
2014-02-07 14:29:08 -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
Brian Waldon
63fa35c99f refactor(tls): clarify & simplify tls configuration 2014-02-06 21:15:38 -08:00
Brandon Philips
1c91c167fc feat(config): remove the info file
The info file was meant to help the user from accidently making a
mistake but often times it just confuses people:

https://github.com/coreos/etcd/issues/356
https://github.com/coreos/etcd/issues/531
https://github.com/coreos/etcd/issues/318

Lets remove the info file for this next release.
2014-02-05 16:20:50 -08:00