Compare commits

...

745 Commits

Author SHA1 Message Date
4fb6087f4a CHANGELOG: release 0.4.4 2014-06-24 10:56:53 -07:00
5524131a9e Merge pull request #865 from robstrong/hotfix/contentType
fix(peer_server) set content type to application/json in admin
2014-06-23 16:31:49 -07:00
3efb4d837b Merge pull request #844 from unihorn/102
chore(peer_server): improve log for auto removal
2014-06-23 14:19:48 -07:00
494d2c67aa fix(peer_server) set content type to application/json in admin 2014-06-21 13:13:10 -04:00
fb32a999a6 doc: add note about removal of leader mod 2014-06-19 17:10:34 -07:00
d2f5934aa1 mod: remove defunct leader test 2014-06-19 17:10:34 -07:00
4f3fb5a702 Merge pull request #861 from andybons/patch-2
Update to Go v1.3
2014-06-19 13:54:34 -07:00
9f5ec7732e Update to Go v1.3
Now I’m just being OCD about it.
2014-06-19 10:25:52 -04:00
eb00f200d3 Merge pull request #856 from robn/patch-1
Add p5-etcd (Perl client lib) to clients-matrix
2014-06-18 10:45:11 -07:00
38d16775ab Merge pull request #858 from mikeumus/patch-1
docs(readme.md): spelling fix "oon" to "on"
2014-06-17 23:20:23 -07:00
690fd12b07 docs(readme.md): spelling fix "oon" to "on" 2014-06-18 02:11:32 -04:00
b31483b2be Merge pull request #850 from robszumski/update-config
feat(docs): add cluster config section
2014-06-17 17:45:50 -07:00
e9a21dda4b Merge pull request #851 from unihorn/103
docs(configuration): add cluster configuration
2014-06-17 17:44:51 -07:00
2134036942 Merge pull request #857 from tarnfeld/tools-discodns
Added discodns to the list of tools using etcd
2014-06-17 16:10:57 -07:00
6bd2ee4c49 Added discodns to the list of tools using etcd 2014-06-18 00:08:21 +01:00
fcd429467e Add p5-etcd (Perl client lib) to clients-matrix 2014-06-18 08:15:03 +10:00
e5e759b962 docs(config): refine cluster configuration 2014-06-17 09:31:08 -07:00
d8a08f53e3 feat(docs): add cluster config section 2014-06-16 22:31:13 -07:00
3e95bf0fa3 Merge pull request #854 from brianredbeard/moarthings
docs(libraries-and-tools.md) Add vulcan proxy and kubernetes
2014-06-16 20:05:43 -07:00
0d2512cb99 docs(libraries-and-tools.md) Add vulcan proxy and kubernetes
Both vulcan proxy (vulcand) and Google kubernetes utilize etcd as
as storage engine.
2014-06-16 20:03:47 -07:00
a29f6fb799 docs(configuration): add cluster configuration 2014-06-16 13:58:00 -07:00
fc2afe1ed2 Merge pull request #847 from pwaller/patch-1
docs(production-ready.md): Tiny typo fix
2014-06-13 08:58:33 -07:00
24a442383b docs(production-ready.md): Tiny typo fix 2014-06-13 14:41:23 +01:00
f387bf8464 chore(peer_server): improve log for auto removal 2014-06-12 10:02:56 -07:00
83b06c0715 Merge pull request #841 from andybons/patch-1
Update to Go v1.2.2
2014-06-11 09:43:25 -07:00
75dc10c39d Update to Go v1.2.2 2014-06-09 16:03:01 -04:00
66acf8a4e9 Merge pull request #839 from jonboulle/jonboulle-master
docs(cluster-discovery): fix bad link and confusing port references
2014-06-09 09:47:58 -07:00
1359d29fa4 docs(cluster-discovery): fix bad link and confusing port references 2014-06-08 23:58:14 -07:00
dc1f4adcd0 chore(server): bump to 0.4.3+git 2014-06-07 18:17:54 -07:00
9970141f76 chore(server): bump to 0.4.3 2014-06-07 18:17:05 -07:00
16c2bcf951 chore(server): go fmt
blame me for not running test first.
2014-06-07 18:03:22 -07:00
868b7f7902 Merge pull request #836 from philips/reduce-heartbeat-logs
fix(server): reduce the screaming heartbeat logs
2014-06-07 17:48:22 -07:00
1c958f8fc3 fix(server): reduce the screaming heartbeat logs
Currently the only way we know that a peer isn't getting a heartbeat is
an edge triggered event from go raft on every missed heartbeat. This
means that we need to do some book keeping in order to do exponential
backoff.

The upside is that instead of screaming thousands of log lines before a
machine hits the default removal of 30 minutes it is only ~100.
2014-06-07 17:47:10 -07:00
dfeecd2537 Merge pull request #835 from unihorn/101
chore(server): set DefaultRemoveDelay to 30mins
2014-06-06 17:56:01 -07:00
ed58193ebe chore(server): set DefaultRemoveDelay to 30mins
Its value was 5s before, which could remove the node insanely fast.
2014-06-06 16:57:35 -07:00
79c650d900 Merge pull request #834 from unihorn/100
fix(raft/protobuf): avoid panic on unexcepted data
2014-06-06 15:08:13 -07:00
a451cf2333 fix(raft/protobuf): avoid panic on unexcepted data 2014-06-06 14:34:32 -07:00
3455431da3 Merge pull request #833 from unihorn/99
bump(code.google.com/p/gogoprotobuf): 7fd1620f09
2014-06-06 13:48:47 -07:00
9424a10f49 bump(code.google.com/p/gogoprotobuf): 7fd1620f09 2014-06-06 13:35:59 -07:00
fbcfe8e1c4 Merge pull request #807 from Shopify/raft-server-stats-struct-field-tag-fix
style(server): changed a LeaderInfo struct field from "startTime" to "StartTime"
2014-06-05 12:45:34 -07:00
757bb3af13 Merge pull request #830 from unihorn/98
fix(raft/log): truncate file and reset offset correctly
2014-06-05 12:40:23 -07:00
2cd367e9d9 fix(raft/log): truncate file and reset offset correctly 2014-06-05 12:09:25 -07:00
a974bbfe4f chore(server): bump to 0.4.2+git 2014-06-02 15:26:06 -07:00
99dcc8c322 chore(server): bump back to 0.4.2 2014-06-02 15:25:03 -07:00
3d2523e7e0 Merge pull request #825 from unihorn/98
fix(multi_node_kill_all_and_recovery_test): ensure cluster is up
2014-06-02 15:12:05 -07:00
25e69d9659 fix(multi_node_kill_all_and_recovery_test): ensure cluster is up 2014-06-02 14:43:51 -07:00
707174b56a chore(server): bump to 0.4.2+git 2014-06-02 14:19:52 -07:00
ce92cc3dc5 feat(CHANGELOG): bump to v0.4.2 2014-06-02 14:17:38 -07:00
5bfbf3a48c Merge pull request #824 from unihorn/97
fix(remove_node_test): remove unnecessary cluster configuration
2014-06-02 14:12:08 -07:00
e04a188358 fix(remove_node_test): remove unnecessary cluster configuration
The cluster configuration operation is originally to make sure
the instance won't be added back automatically between removal and
check for the number of existing peer-mode instances. But this
could make some node removed before the removal command.

Use longer sync interval instead to avoid this problem.
2014-06-02 13:30:19 -07:00
a51fda3e5e Merge pull request #822 from philips/add-notes-about-discovery
docs(cluster-discovery): add caution to use old discovery endpoint
2014-06-02 12:06:00 -07:00
ca44801650 docs(cluster-discovery): add caution to use old discovery endpoint 2014-06-02 11:34:56 -07:00
2387ef3f21 Merge pull request #819 from unihorn/97
fix(server): joinIndex is not set after recovery from full outage
2014-06-02 11:04:07 -07:00
d5bfca9465 Merge pull request #814 from unihorn/91
fix(server/v2): set correct content-type for etcdError response
2014-06-02 10:38:36 -07:00
7cb126967c fix(simple_snapshot_test): enlarge reasonable index range 2014-05-31 10:42:31 -07:00
444e017c05 fix(remove_node_test): ensure cluster config is activated 2014-05-31 10:32:03 -07:00
356675b70f fix(multi_node_kill_all_and_recovery_test): ensure cluster running 2014-05-31 10:15:03 -07:00
d7768635fd fix(server): set joinIndex when recovered 2014-05-31 10:03:39 -07:00
37796ed84c tests: add TestMultiNodeKillAllAndRecorveryAndRemoveLeader
This one breaks because it doesn't set joinIndex correctly.
2014-05-31 10:01:45 -07:00
f007cf321d Merge pull request #818 from unihorn/96
fix(standby_server): able to join the cluster containing itself
2014-05-30 18:36:58 -07:00
ca29691543 tests(standby_test): comments 2014-05-30 18:36:23 -07:00
4bebb538eb fix(standby_server): able to join the cluster containing itself
Standby server will switch to peer server if it finds that
it has been contained in the cluster.
2014-05-30 14:03:49 -07:00
c27db1ec5e Merge pull request #816 from unihorn/95
docs(clustering): limit for peer-address changing
2014-05-30 13:45:12 -07:00
a5fc1d214d Merge pull request #817 from cholcombe973/master
Adding autodock into the libraries and tools section
2014-05-30 13:41:32 -07:00
1df0b941d7 Adding autodock into the libraries and tools section 2014-05-30 13:20:28 -07:00
3a71eb9d72 Merge pull request #808 from robszumski/update-optimal-size
fix(docs): add information about standbys
2014-05-30 12:26:07 -07:00
001cceb1cd fix(docs): update doc with standby info 2014-05-30 12:23:22 -07:00
98ff4af7f2 docs(clustering): limit for peer-address changing 2014-05-30 08:50:16 -07:00
db4c5e0eaa fix(server/v2): set correct content-type for etcdError response
"net/http".Error reset the content type, so we get rid of it and
write our own one.
2014-05-29 14:18:50 -07:00
b3c5ed60bd chore(pkg/btrfs): remove accidental swp file. 2014-05-22 09:50:40 -07:00
673d90728e style(server): changed a LeaderInfo struct field from "startTime" to "StartTime"
Changed the LeaderInfo struct "start time" field from "startTime" to "StartTime" so that it is an exported identifier. This required adding the `json:"startTime"` structure field tag so that the encoding/json package correctly performs JSON encoding (i.e. the correct property name --> startTime).
2014-05-21 11:19:56 -04:00
22c944d8ef chore(server): bump 0.4.0+git 2014-05-20 20:55:57 -07:00
a2d16b52bb chore(server): bump to 0.4.1 2014-05-20 20:46:46 -07:00
b637b3a607 Merge pull request #806 from philips/add-machine-api-docs
fix(server): add user facing remove API
2014-05-20 20:41:21 -07:00
0eba3c9000 feat(Documentation): document the entire admin machines API
Flesh out this document a bit more completely.
2014-05-20 20:25:34 -07:00
c3aab42959 fix(Documentation): update based on standby refactor
These docs were not updated after the refactoring of the standy mode.
Fix that now.
2014-05-20 20:07:47 -07:00
62560f9959 fix(server): add user facing remove API
This was accidently removed as we refactored the standy stuff. Re-add this
user facing remove endpoint that matches the config endpoints.
2014-05-20 20:01:10 -07:00
3c04f8b664 fix(scripts/build-release): put everything into a release dir 2014-05-20 17:53:17 -07:00
cc37c58103 chore(server): bump to 0.4.0+git 2014-05-20 17:10:28 -07:00
07d1eb0edb chore(server): bump to 0.4.0 2014-05-20 17:09:22 -07:00
9a006d673b doc(README): add note about 32bit systems - fixes 358 2014-05-20 16:23:33 -07:00
6860bfdd28 Merge pull request #805 from xiangli-cmu/fix_test
fix(test/remove_node_test.go) fix a deadlock in the test
2014-05-20 14:37:53 -07:00
aaedf32c04 fix(test/remove_node_test.go) fix a deadlock in the test
The go-etcd client waits for the response from the paused node. And the test waits for the reponse to continue.
Actually we do not even need that small test, since we will check the machine status afterwards.
2014-05-20 14:34:59 -07:00
16d89c906b Merge pull request #804 from xiangli-cmu/fix_curr_index_race
fix(store): synchronize access to CurrentIndex
2014-05-20 14:32:45 -07:00
516ebdb49e fix(store): synchronize access to CurrentIndex 2014-05-20 13:53:47 -07:00
1e7a7b11dd Merge pull request #799 from xiangli-cmu/deny_unknow_peer
hack(server): notify removed peers when they try to become candidates
2014-05-20 13:37:14 -07:00
4c953a7ca2 Merge pull request #803 from unihorn/94
fix(peer_server): set store and registry when setting raft server
2014-05-20 13:36:16 -07:00
934c28d498 fix(peer_server): set store and registry when setting raft server
New raft server needs new store and registry.
2014-05-20 13:12:12 -07:00
0c8b13c04f Merge pull request #19 from unihorn/92
tests(remove_node): add TestRemovePausedNode
2014-05-20 11:06:00 -07:00
9e5b12f591 tests(remove_node): add TestRemovePausedNode 2014-05-20 11:01:14 -07:00
189fece683 hack(server): notify removed peers when they try to become candidates
A peer might be removed during a network partiton. When it comes back it
will not have received any of the log entries that would have notified
it of its removal and go onto propose a vote. This will disrupt the
cluster and the cluster should give the machine feedback that it is no
longer a member.

The term of a denied vote is MaxUint64. The notification of the removal
is a raft event. These two modification are quick heck.

In reaction to this notification the machine should shutdown. In this
case the shutdown just moves it towards becoming a standby server.
2014-05-20 10:17:32 -07:00
ad27aa0f70 Merge pull request #791 from yifan-gu/ipv6_zone_fix
Ipv6 zone fix
2014-05-20 09:37:28 -07:00
dffe460210 Merge pull request #793 from binocarlos/patch-1
Added the -peer-heartbeat-interval option
2014-05-20 09:30:11 -07:00
b4e4bf4b75 fix(config.go)
return a valid URL struct from sanitizeURL()
pass the URL struct above to sanitizeBindAddr()

Since url.Parse() will return an error when parsing an already-parsed
ipv6 url string, (e.g. [http://[fe80::6203:8ff:fe9e:ace%25eth0]:7001),
so I just return the valid URL struct from sanitizeURL() and send it to
sanitizeBindAddr(), then there is no need to parse it again in sanitizeBindAddr().

Besides, for IPV6 url, the percent sign should be escaped, see:
http://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices
2014-05-18 12:42:47 -07:00
e9482167a8 Added the -peer-heartbeat-interval option 2014-05-18 19:22:48 +01:00
cbcf55dabb Merge pull request #744 from unihorn/71
docs(api): add Cluster Config API
2014-05-18 10:09:07 -07:00
1084e51320 Merge pull request #786 from unihorn/91
feat(standby_server): write cluster info to disk
2014-05-18 10:08:52 -07:00
ad9155c82a Merge pull request #789 from bass3m/master
Add Julia etcd client
2014-05-17 16:15:35 -07:00
84f71b6c87 chore(standby_server): remove error return
because standby server should be started in best efforts.
2014-05-16 18:07:49 -04:00
d2d68f96fc Add Julia etcd client 2014-05-16 10:11:31 -07:00
71679bcf56 feat(standby_server): make atomic move for file
to avoid the risk of writing out a corrupted file.
2014-05-16 01:00:07 -04:00
a824be4c14 feat(standby_server): save/load Running into disk 2014-05-16 00:10:15 -04:00
35cc81e22f feat(standby_server): save/load syncInterval to disk 2014-05-15 23:57:58 -04:00
716496ec42 chore(standby_server): still sleep for the first time 2014-05-15 23:18:59 -04:00
e5ce4fca2e docs(standbys): clarify pseudocode 2014-05-15 22:47:12 -04:00
9940347eea Merge pull request #788 from alex-sherwin/patch-1
fix(doc): fixed typo for etcd lock examples
2014-05-15 18:30:15 -07:00
d2a2cc13b0 fixed typo for etcd lock examples 2014-05-15 21:27:50 -04:00
b7d9fdbd39 feat(standby_server): write cluster info to disk
For better fault tolerance and availability.
2014-05-15 07:47:15 -04:00
7cf8a4a8d0 Merge pull request #779 from unihorn/89
feat: implement standby mode
2014-05-14 10:03:03 -07:00
851026362a chore(standby_server): let syncInterval represent in second unit
This is done to keep consistency with other namings.
2014-05-14 10:13:05 -04:00
fc77b3e9e6 fix(simple_snapshot_test): enlarge reasonable index range 2014-05-13 22:28:28 -04:00
f6591b95c7 chore(standby): minor changes based on comments 2014-05-13 22:19:52 -04:00
403f709ebd chore(cluster_config): set default timeout to 5s
Or the leader death could let the standbys down for a rather long time.
2014-05-13 16:13:44 -04:00
cbb706cd47 bump(goraft/raft): c76c5d95 2014-05-13 11:08:03 -04:00
c0027bfc78 feat(cluster_config): change field from int to float64
This is modified for better flexibility, especially for testing.
2014-05-12 22:42:18 -04:00
735ffb3092 Merge pull request #782 from unihorn/90
fix(TestV1Watch): ensure server has started
2014-05-09 15:51:48 -07:00
6a64141962 fix(TestV1Watch): ensure server has started 2014-05-09 15:42:18 -07:00
5367c1c998 chore(standby): minor changes based on comments 2014-05-09 15:38:03 -07:00
c6b1a738c3 feat(option): add cluster config option
It will be used when creating a brand-new cluster.
2014-05-09 15:22:11 -07:00
6d4f018887 chore(cluster_config): rename SyncClusterInterval to SyncInterval
for better naming
2014-05-09 13:28:21 -07:00
765cd5d8b3 refactor(find_cluster): make it simpler 2014-05-09 02:27:04 -07:00
baadf63912 feat: implement standby mode
Change log:
1. PeerServer
- estimate initial mode from its log through removedInLog variable
- refactor FindCluster to return the estimation
- refactor Start to call FindCluster explicitly
- move raftServer start and cluster init from FindCluster to Start
- remove stopNotify from PeerServer because it is not used anymore
2. Etcd
- refactor Run logic to fit the specification
3. ClusterConfig
- rename promoteDelay to removeDelay for better naming
- add SyncClusterInterval field to ClusterConfig
- commit command to set default cluster config when cluster is created
- store cluster config info into key space for consistency
- reload cluster config when reboot
4. add StandbyServer
5. Error
- remove unused EcodePromoteError
2014-05-09 01:56:55 -07:00
5bd08a327d docs(standbys): specification for standby module 2014-05-08 15:02:55 -07:00
f1c13e2d9d Merge pull request #774 from unihorn/83
feat(join): check cluster conditions before join
2014-05-08 14:08:38 -07:00
6c950eaf97 Merge pull request #772 from unihorn/81
feat(peer_server): stop service when removed
2014-05-08 14:02:09 -07:00
5c7a963cf0 chore(peer_server): adjust code to make it more clear 2014-05-08 13:20:46 -07:00
c92231c91a Merge branch 'master' of github.com:coreos/etcd
Conflicts:
	server/peer_server_handlers.go
2014-05-08 13:17:51 -07:00
e960a0e03c chore(client): minor changes based on comments
The changes are made on error handling, comments and constant.
2014-05-08 13:15:10 -07:00
015d228b04 Merge pull request #763 from unihorn/77
fix(raft_server_stats): set startTime when init
2014-05-08 12:28:44 -07:00
e31249fa22 Merge pull request #778 from unihorn/88
fix(TestV2Watch): ensure server has started
2014-05-08 12:26:56 -07:00
b3e66ee980 fix(TestV2Watch): ensure server has started 2014-05-08 12:18:08 -07:00
af33d61774 Merge pull request #775 from unihorn/84
refactor(tests/server_utils): use etcd instance
2014-05-08 11:53:46 -07:00
bc4a98c386 Merge pull request #776 from unihorn/85
feat(peer_server): add State field to machineMessage
2014-05-08 11:53:26 -07:00
fb17ccf5ee chore(cors): more explanation for flush in ServeHTTP 2014-05-08 10:54:50 -07:00
04f09d2fd0 feat(peer_server): add State field to machineMessage
State field indicates the state of each machine.
For now, its value could be follower or leader.
2014-05-08 10:25:39 -07:00
6450d6dfb9 Merge pull request #777 from unihorn/86
fix(registry): fetch peers from store instead of cache
2014-05-08 09:11:04 -07:00
0558b546ff fix(registry): fetch peers from store instead of cache
The current cache implmentation may contain removed machines, so we
fetch peers from store for correctness.
2014-05-08 08:44:32 -07:00
5465201292 chore(peer_server): more explanation for asyncRemove 2014-05-07 16:31:17 -07:00
ae81f843f1 refactor(client): remove useless logic in redirection 2014-05-07 16:09:08 -07:00
c9ce14c857 chore(peer_server): set client transporter separately
It also moves the hack on timeout from raft transporter to
client transporter.
2014-05-07 13:26:05 -07:00
bed20b7837 chore(peer_server): add more function description 2014-05-07 12:51:41 -07:00
206881bfec fix(peer_server): check running status before start/stop
This makes peer server more robust.
2014-05-07 12:44:48 -07:00
cf25650b3c fix(etcd): exit 0 when removed 2014-05-07 12:39:07 -07:00
7dce4c8fbb refactor(tests/server_utils): use etcd instance
Remove duplicated etcd start code.
2014-05-07 11:49:03 -07:00
b0ffb4fd10 chore(config): move Sanitize and Force check to boot process
Make Load function just load parameters. So etcd instance could
use Config struct to start service.
2014-05-07 11:48:53 -07:00
001b1fcd46 feat(join): check cluster conditions before join 2014-05-07 11:46:21 -07:00
4e14604e5c refactor(server): add Client struct
This is used to send request to web API.
It will do this behavior a lot in standby mode, so I abstract this
struct first.
2014-05-07 11:46:15 -07:00
b56aa62bcc Merge pull request #773 from unihorn/82
tests(snapshot): expand reasonable range for index
2014-05-07 13:02:41 -04:00
ba36a16bc5 feat(peer_server): stop service when removed
It doesn't modify the exit logic, but makes external code know
when removal happens and be able to determine what it should do.
2014-05-07 10:00:27 -07:00
997e7d3bf4 Merge pull request #771 from unihorn/80
refactor(peer_server): remove standby mode in peer server
2014-05-07 09:57:02 -07:00
c4cd86e094 tests(snapshot): expand reasonable range for index
snapshot file was createed with name '0_503.ss' and '0_1010.ss' when testing.
2014-05-07 09:41:36 -07:00
17e299995c refactor(peer_server): remove standby mode in peer server 2014-05-07 09:10:09 -07:00
e11fd7cd40 Merge pull request #770 from shawnps/patch-1
Fix comment typo
2014-05-07 11:09:34 -04:00
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
6516cf854c chore(server): rename daemon to startRoutine
For better understanding.
2014-05-07 07:51:44 -07:00
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
43ad623965 Merge pull request #740 from unihorn/67
docs(upgrade): instructions for upgrade to v0.4
2014-05-07 07:01:20 -07:00
2d5c7d7fb0 docs(upgrade): instructions for upgrade to v0.4 2014-05-07 07:00:35 -07:00
38b88589da Merge pull request #748 from unihorn/73
docs(discovery): update discovery process based on the change
2014-05-07 06:55:59 -07:00
c6be7887e5 docs(discovery): update cluster finding process 2014-05-07 06:55:09 -07:00
da3bbc5206 Fix typo 2014-05-07 21:50:48 +09:00
8b5d9cc1fb docs(api): make Cluster Config API part clearer 2014-05-05 18:49:21 -07:00
c692a8f0a7 fix(raft_server_stats): set startTime when init
This helps one-node cluster get rid of bogus startTime.
2014-04-29 09:59:02 -07:00
a563d82f95 Merge pull request #752 from unihorn/75
fix(server): dispatch SetClusterConfigCommand correctly
2014-04-22 14:55:17 -07:00
c7116a37c0 fix(server): dispatch SetClusterConfigCommand correctly 2014-04-22 14:02:54 -07:00
9af9438ed0 Merge pull request #751 from unihorn/75
Revert "Merge pull request #631 from metaflow/fix-delete-key-as-director...
2014-04-21 17:59:07 -07:00
fa54866e99 Revert "Merge pull request #631 from metaflow/fix-delete-key-as-directory"
This reverts commit b87972713e, reversing
changes made to bd8d45ce28.
2014-04-21 17:55:44 -07:00
ff172ae3a5 Merge pull request #749 from unihorn/74
chore: gofmt go files
2014-04-21 15:03:05 -07:00
32d23fdb11 chore: gofmt go files 2014-04-21 14:59:06 -07:00
14ae764283 Merge pull request #712 from sym3tri/dashboard-rewrite
Dashboard rewrite
2014-04-21 12:11:09 -07:00
b87972713e Merge pull request #631 from metaflow/fix-delete-key-as-directory
Fix delete key as directory
2014-04-21 11:45:18 -07:00
bd8d45ce28 Merge pull request #746 from andybons/patch-1
Update to Go v1.2.1
2014-04-21 11:37:29 -07:00
7cebc3999a api(delete) now you get an error trying to delete files a directory (http.StatusForbidden) 2014-04-21 19:50:57 +07:00
1b78cc1389 Update to Go v1.2.1 2014-04-19 13:09:33 -04:00
204f2d38af docs(api): add Cluster Config API 2014-04-18 18:24:19 -07:00
215ff2839d Merge pull request #743 from unihorn/70
fix(btrfs): build btrfs based on platform
2014-04-18 14:34:58 -07:00
ece25833aa Merge pull request #738 from unihorn/68
feat(peer_server): forbid rejoining with different name
2014-04-18 11:49:36 -07:00
21693b70f7 Merge pull request #737 from ghodss/fix-dir-ttl-response
fix(store.go) include node.dir = true when updating a directory's ttl
2014-04-18 11:47:29 -07:00
7bf1936df3 fix(btrfs): build btrfs based on platform 2014-04-18 11:20:38 -07:00
000e3ba651 chore(rejoin_test): rewrite some printout 2014-04-18 10:48:14 -07:00
9f228550a2 Merge pull request #730 from unihorn/65
chore(server): deprecate mod temporarily
2014-04-18 10:46:09 -07:00
a2749bad53 docs(modules): make reasons for deprecation much more clear 2014-04-18 10:36:59 -07:00
e0fbe27c99 fix(join_command): use RaftURL as peer address 2014-04-18 10:28:24 -07:00
5602d4a2ee docs(modules): make reasons for deprecation more clear 2014-04-18 09:31:57 -07:00
b742af56ec Merge pull request #723 from unihorn/63
tests: add TestJoinThroughFollower
2014-04-17 19:44:46 -07:00
b17703a9e4 chore(tests/join): adjust output 2014-04-17 19:28:58 -07:00
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
b0ac8a4b4b Merge pull request #624 from unihorn/36
chore(server/transporter): set RequestTimout reasonable
2014-04-17 15:19:10 -07:00
3ae0a1e1a6 fix(store.go) include node.dir = true when updating a directory's ttl, fixes coreos/etcd#736 2014-04-17 15:15:41 -07:00
cc329bfa55 Merge pull request #643 from unihorn/45
fix(server): rejoin cluster with different ip
2014-04-17 10:24:04 -07:00
732fb7c160 tests(rejoin): add TestReplaceWithDifferentPeerAddress
The functionality has not been implemented yet.
2014-04-17 10:17:26 -07:00
6988676f43 docs(clustering): docs about rejoin 2014-04-17 10:16:53 -07:00
273c293645 fix(server): rejoin cluster with different ip 2014-04-17 10:16:30 -07:00
d368405d05 Merge pull request #734 from unihorn/67
chore: gofmt go files
2014-04-17 08:49:46 -07:00
82dee82bfd chore: gofmt go files 2014-04-17 08:47:48 -07:00
93d1293b9d Merge pull request #733 from unihorn/66
chore: rename proxy mode to standby mode
2014-04-17 08:40:50 -07:00
67600603c5 chore: rename proxy mode to standby mode
It makes the name more reasonable.
2014-04-17 08:04:42 -07:00
1eaa9c9899 docs: record module deprecation 2014-04-16 23:24:11 -07:00
a1a91ab75a chore(server): deprecate mod temporarily 2014-04-15 12:50:36 -07:00
9caa801469 chore(server/transporter): remove unnecessary timeout 2014-04-15 12:08:58 -07:00
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
3a5cb26973 chore(etcd): loose request timeout
This is a hack to improve multi-etcd boot process.
It could make users alwasy start etcd cluster successfully.
2014-04-15 11:48:22 -07:00
26c77fcf9e chore(config): reset retry interval
Make retry interval random one to avoid join collision.
2014-04-15 11:48:18 -07:00
68afedbd16 chore(server/transporter): set RequestTimout reasonable 2014-04-15 11:13:43 -07:00
63d965133f Merge pull request #729 from unihorn/65
chore: gofmt go files
2014-04-15 10:00:13 -07:00
adf4acf947 chore: gofmt go files 2014-04-15 09:42:25 -07:00
fa95ca0aa8 Merge pull request #728 from unihorn/64
fix(tests/v1_migration): correct HTTP response
2014-04-15 09:35:32 -07:00
d88b52c5f3 fix(tests/v1_migration): correct HTTP response
The bug is introduced in 03839ca8 due to the mistake.
2014-04-15 09:25:14 -07:00
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
66c552d048 Merge pull request #724 from bcwaldon/doc-fleet
doc(tools): Add fleet to list of projects using etcd
2014-04-14 14:44:15 -07:00
f5ee9b97de doc(tools): Add fleet to list of projects using etcd 2014-04-14 14:43:37 -07:00
8bcfb2ecaf Merge pull request #707 from unihorn/62
fix(peer_server): recover from outage with discovery
2014-04-14 13:58:43 -07:00
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
de9c318436 tests: add TestJoinThroughFollower 2014-04-14 13:41:45 -07:00
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
2dc182189a Merge pull request #710 from xiangli-cmu/fix_race
Fix race
2014-04-14 15:53:04 -04:00
8d68e2f5f0 chore(dashboard): recompile with new resources 2014-04-14 12:16:33 -07:00
af6d5efb83 chore(dashboard/fonts): remove unused font files 2014-04-14 12:16:29 -07:00
c08bcb6f5b fix(dashboard/build): update gruntfile for release build 2014-04-14 12:16:24 -07:00
ef99b9ac49 feat(dashboard/stats): stats page 2014-04-14 12:16:18 -07:00
689de466de chore(dashboard/stats): add vega depencency 2014-04-14 12:16:11 -07:00
9e5ada880d feat(dashboard): key/value browser. 2014-04-14 12:13:04 -07:00
151b9c6ed2 feat(dashboard): project setup 2014-04-14 12:13:04 -07:00
35ddb6627e chore(dashboard): move dashboard server & fix routing. 2014-04-14 12:13:00 -07:00
d266f9dec7 Merge pull request #713 from unihorn/63
fix(server/key): unable to update unexpired ttl
2014-04-14 11:06:31 -07:00
1af51ca0c5 docs(ttl): the way to unset ttl 2014-04-14 11:05:52 -07:00
c8de5eee85 fix(server/key): unable to update unexpired ttl 2014-04-14 11:03:46 -07:00
842dd5cab0 chore(dashboard): remove old dashboard 2014-04-14 10:52:26 -07:00
77270c6b00 feat(dashboard): add sigle-page-app html5 pushstate support 2014-04-14 10:50:37 -07:00
d4b33c7e12 Merge pull request #718 from bmizerany/master
docs(production-ready): explain the state of etcd clearly
2014-04-14 00:43:15 -04:00
a05ff7f83d docs(production-ready): explain the state of etcd clearly 2014-04-13 21:38:38 -07:00
8071dd054c Merge pull request #717 from xiangli-cmu/fix_join_redirection
fix(peer join) fix wrong join command redirection
2014-04-13 21:59:39 -04:00
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
56ef6fbcae make necessary changes 2014-04-11 17:00:14 -07:00
bc70cdc242 tests(snapshot_test) loose the timing assumption for snapshot test
Test run slowly on drone after open race option.
2014-04-11 19:49:57 -04:00
dce461dbd7 tests(test.sh) open race option 2014-04-11 19:49:41 -04:00
79a89dcb82 Revert "Revert "fix(server): only set NOCOW for log file""
This reverts commit 9540575690.

Conflicts:
	etcd/etcd.go
2014-04-11 16:33:50 -07:00
fc84da29e8 fix(internal_version_test.go) protect the checkedVersion by a lock 2014-04-10 23:35:55 -04:00
2817baf3f8 fix(discovery_test.go) protect the garbageHandler by a lock 2014-04-10 23:28:40 -04:00
a9dff278b5 fix(store.go) send event to watcher after we finish modifying it 2014-04-10 23:27:50 -04:00
af87fa40c2 fix(registry.go) protect the peer and proxy map in the registry by lock 2014-04-10 23:24:09 -04:00
6d08976cbe fix(raft_server_stats.go) protect raft stats by a lock 2014-04-10 22:50:44 -04:00
11525d357f fix(CONTRIBUTING): point to new mailing list 2014-04-10 15:20:28 -07:00
2a8c2c6a0b fix(README): use the new etcd-dev mailing list
We moved to google groups, update the URLs
2014-04-10 15:18:13 -07:00
bda8849c3b chore(btrfs): rename fs to btrfs
This is because the actions is specific for btrfs.
2014-04-09 15:06:17 -07:00
375aeb57af fix(fs): make check on NOCOW 2014-04-09 14:44:54 -07:00
9540575690 Revert "fix(server): only set NOCOW for log file"
This reverts commit 1eff547af6.
2014-04-09 14:39:16 -07:00
8c0c427870 Merge pull request #694 from unihorn/59
chore(discovery): adjust error message
2014-04-09 13:50:28 -07:00
6d77e4dfd6 fix(fs): rewrite test to avoid side effect 2014-04-09 13:11:23 -07:00
fe5eb31ca7 Merge pull request #706 from unihorn/62
bump(goraft/raft): cfa43a115
2014-04-09 12:53:25 -07:00
66ce075ce1 bump(goraft/raft): cfa43a115 2014-04-09 12:42:20 -07:00
1eff547af6 fix(server): only set NOCOW for log file 2014-04-09 12:35:32 -07:00
d871324e93 chore(pkg/fs): rewrite comment 2014-04-09 10:15:28 -07:00
b06d2796f8 feat: set NOCOW for log directory when in btrfs 2014-04-09 10:00:21 -07:00
84ad6ddd79 chore(build): set build path to gopath/
With this, pkg/ could be used as normal directory, and it doesn't need
to gitignore pkg/, which shields pkg/http and pkg/strings.
2014-04-09 09:51:58 -07:00
4ce8c3499b Merge pull request #702 from unihorn/60
feat(server): make header-only requests work
2014-04-08 17:58:38 -07:00
76ac1da7ea feat(server): add HEAD for v1/watch 2014-04-08 17:37:05 -07:00
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
28f19dec60 feat(server): make header-only requests work 2014-04-07 13:51:33 -07:00
3b2d039664 Merge pull request #699 from stevecrozz/suppress-debconf-warnings
fix(Dockerfile): debconf use noninteractive
2014-04-07 09:33:29 -07:00
d66efc550d fix(Dockerfile): debconf use noninteractive
DEBIAN_FRONTEND=noninteractive tells apt-get install to use the
noninteractive front end for debconf. This keeps the system from
attempting to interact with the user during package configuration.
Without it, debconf issues warnings like:
```
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (@INC contains:
/etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl .) at
/usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
```
2014-04-05 14:06:19 -07:00
2c65e9852c Merge pull request #698 from unihorn/61
bump(goraft/raft): 585c58026c
2014-04-04 17:13:58 -07:00
ef98f6051c bump(goraft/raft): 585c58026c 2014-04-04 17:10:18 -07:00
e650329eac Merge pull request #697 from unihorn/60
correctly restart etcd node after snapshotting
2014-04-04 16:56:14 -07:00
d2c0a008ce bump(goraft/raft): f94d98c 2014-04-04 16:45:15 -07:00
1c40f327be test(snapshot): test restart with snapshot 2014-04-04 16:45:02 -07:00
be9ee58a52 Merge pull request #696 from joshuaconner/fix_https_googlefonts_error
dashboard: remove protocol from google fonts links so they work with https
2014-04-04 16:05:35 -07:00
5987917c0a dashboard: remove protocol from google fonts links so they work with htttps 2014-04-04 15:40:39 -07:00
12b106c0f0 Merge pull request #692 from jonboulle/master
Clean up README and merge new contribution guidelines
2014-04-04 14:11:30 -07:00
dbaa2cbdee chore(discovery): adjust error message 2014-04-04 12:59:22 -07:00
cbcd0aff9e Merge pull request #693 from unihorn/58
fix test error
2014-04-04 11:46:42 -07:00
e624d4ef33 fix(build): make build run well
1. remove unnecessary target directory
2. comparison update to run on linux
2014-04-04 11:32:19 -07:00
fd9ad4fa2c docs(readme/contrib): clean up README, merge changes from CONTRIBUTING.md and split out DCO 2014-04-04 10:58:34 -07:00
0a4b6570e1 chore(tests): start TLS cluster slowly to evade problem 2014-04-04 10:57:11 -07:00
d8a53ca716 Merge pull request #635 from metaflow/benchmarking
feat(benchmark) fix of flag arguments and updated logging
2014-04-04 09:57:36 -07:00
bec7d7f614 Merge pull request #688 from unihorn/57
fix test error
2014-04-03 17:36:14 -07:00
915cc53d83 chore(test.sh): move gofmt check to the end of testing
So it won't be blocked on gofmt check.
2014-04-03 17:04:35 -07:00
f0dee63716 chore(build): update gofmt target 2014-04-03 17:03:50 -07:00
9129475a51 Merge pull request #646 from metaflow/api-doc-release-lock
doc(api) correct release lock curl command
2014-04-03 16:59:31 -07:00
41ad9ebb48 Merge pull request #665 from unihorn/52
feat(test): check format conditions in test
2014-04-02 17:58:28 -07:00
3fece6a716 feat(test): check format conditions in test
And add option '--fmt' in build script to gofmt files automatically.
2014-04-02 17:57:53 -07:00
1f12e163de Merge pull request #650 from cenkalti/main
refactor(main): move main logic to separate package
2014-04-01 15:19:54 -07:00
7c1b7d764a fix(main): remove duplicate line in etcd.go 2014-04-01 14:22:07 -07:00
58e1e02688 refactor(main): return only receiving channel from Etcd.ReadyNotify() 2014-04-01 12:54:38 -07:00
d000ba3ed3 chore(main): add a space line between the two if statements 2014-04-01 12:54:38 -07:00
1b59eacb72 refactor(main): rename etcd.go to main.go 2014-04-01 12:54:38 -07:00
3eb74fc32c chore(main): add todo item and update comments 2014-04-01 12:54:37 -07:00
a9e77c022c refactor(main): reorder code 2014-04-01 12:54:37 -07:00
dfbabc5a77 refactor(main): remove Etcd.StopNotify() method 2014-04-01 12:50:44 -07:00
c5632b039a fix(main): stop PeerServer on Etcd.Stop() 2014-04-01 12:50:43 -07:00
46623c00a8 fix(main): fix ready notifier 2014-04-01 12:50:43 -07:00
ccb960f47f refactor(main): close peer server first 2014-04-01 12:41:33 -07:00
561ad16757 refactor(main): rename Etcd.Close() to Etcd.Stop() 2014-04-01 12:41:33 -07:00
399f491fd7 feat(main): add close and ready notifiers for etcd instance 2014-04-01 12:41:33 -07:00
c463293d39 feature(main): add Etcd.Close() method 2014-04-01 12:41:33 -07:00
094cc6347d refactor(main): move main logic to separate package
The use case is to make it easy to embed etcd into another programs.
Currently, the only way of doing this to copy and paste the contents
of the `main()` in etcd.go.
With this commit, contents of the `main()` is moved into `Etcd.Run()`.
2014-04-01 12:41:33 -07:00
022908f1fa Merge pull request #670 from daniel-garcia/patch-1
Update clients-matrix.md
2014-04-01 11:09:03 -07:00
2ad9ea8c57 Update clients-matrix.md
go-etcd does not currently support Lock or Leader modules.
2014-04-01 09:24:00 -05:00
b2f787a2fd Merge pull request #653 from unihorn/49
chore(etcd): print out go-etcd log in VeryVeryVerbose Mode
2014-03-31 16:55:20 -07:00
ea701b3adb chore(etcd): print out go-etcd log in VeryVeryVerbose Mode 2014-03-31 16:53:48 -07:00
eb21381ddd fix(Documentation/cluster-discovery): link to optimal cluster size 2014-03-31 14:48:25 -07:00
534b5feca6 Merge pull request #668 from darron/patch-1
2 nodes isn't durable - to be somewhat expected.
2014-03-31 14:46:33 -07:00
754159b60f Update cluster-discovery.md 2014-03-31 15:45:23 -06:00
fa7c77a6e0 2 nodes isn't durable - to be somewhat expected.
So maybe we add this small documentation patch to show minimum 3 nodes.
2014-03-31 15:07:18 -06:00
5b4a473f14 Merge pull request #667 from unihorn/53
chore(tests): test TestTLSMultiNodeKillAllAndRecovery now
2014-03-27 22:40:09 -04:00
eeca12a4c0 Merge pull request #663 from tsenart/master
Making code formatting consistent.
2014-03-27 17:08:12 -07:00
4e747d24dd chore(tests): test TestTLSMultiNodeKillAllAndRecovery now
It is fixed.
2014-03-27 17:06:18 -07:00
4f1607b775 Merge pull request #651 from unihorn/48
fix(tests): pass all tests using latest raft
2014-03-27 16:19:59 -07:00
140329d927 Merge pull request #654 from robszumski/timeout-docs
feat(docs): document peer timeout flag and env var
2014-03-27 07:27:52 -07:00
b6053d6a86 Making code formatting consistent.
$ gofmt -s -w  && goimports -w
2014-03-27 14:19:08 +01:00
1f10c4d352 Merge pull request #662 from bmizerany/skip
test(tests/functional): skip TestTLSMultiNodeKillAllAndRecovery until fi...
2014-03-26 19:24:43 -07:00
4bce3e4810 test(tests/functional): skip TestTLSMultiNodeKillAllAndRecovery until fixed 2014-03-26 19:22:59 -07:00
99c8b097d1 ignore .etcd dirs 2014-03-26 12:19:20 -07:00
f4aaef5955 Merge branch 'master' of https://github.com/coreos/etcd 2014-03-26 10:43:37 -06:00
85301dbc4e Add mod/lock timeout.
Added timeout goroutine to stop waiting on lock after timeout
expiration.

This necessitated reworking the flow of the acquire handler.  createNode
now _only_ creates the node; it no longer waits on the lock itself.
getLockIndex (perhaps this is poorly named) extracts out the lock
checking routine so that it can be used by "get" and "watch", both.
get() was added to instantaneously attempt to acquire a lock with no
waiting.

If a lock fails to acquire, for whatever reason, an error is returned,
resulting in a code 500 to the client.
2014-03-26 10:39:48 -06:00
8afa93ed59 chore(server/listener): improve comment 2014-03-25 22:51:52 -07:00
2bba9a984e Merge pull request #657 from cenkalti/errors
refactor(errors): use map literal syntax
2014-03-26 00:19:18 -04:00
303a3096d4 refactor(errors): use map literal syntax
Error strings align better this way.
2014-03-25 20:17:21 -07:00
e86fe8e749 feat(docs): document peer timeout flag and env var 2014-03-25 13:07:22 -07:00
a3cbf02597 fix(tests): pass all tests using latest raft 2014-03-24 17:35:45 -07:00
802aaf59db Merge pull request #582 from benbjohnson/proxy
Proxies & Config API
2014-03-24 16:30:47 -06:00
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
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
a20ce3e7a5 doc(api) correct release lock curl command
related to #638 issue - DELETE request body is ignored
typo fixed
2014-03-23 21:53:54 +07:00
aeb9e0633a Merge pull request #641 from mdlayher/patch-1
docs(Documentation/api): fix JSON spacing, syntax highlighting
2014-03-22 09:30:21 -07:00
38631395b6 docs(Documentation/api): fix JSON spacing, syntax highlighting 2014-03-20 02:36:35 -04:00
7d4fda550d Machine join/remove v2 API. 2014-03-18 16:25:21 -06:00
4b5765e2c7 Merge pull request #634 from unihorn/42
fix(test/server): minimize the process of getting watch result
2014-03-18 11:44:31 -07:00
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
1a8a6ce872 Merge pull request #637 from xetorthio/patch-1
Add etcd-fs as a tool
2014-03-18 07:53:28 -07:00
bb3b71a43f Add etcd-fs as a tool 2014-03-18 10:37:24 -04:00
803aeb8fae feat(benchmark) fix of flag arguments and updated logging 2014-03-18 12:33:19 +07:00
15126a680f Merge pull request #621 from unihorn/34
chore(fixtures/ca): make all certificates generated by etcd-ca
2014-03-17 13:47:59 -07:00
50d9e6a7fd chore(fixtures/ca): make all certificates generated by etcd-ca 2014-03-17 12:32:55 -07:00
838a945862 feat(Vagrantfile): Add Vagrantfile for easy start 2014-03-15 12:48:48 -07:00
79e4c838f4 Merge pull request #626 from xiangli-cmu/refactor_listener
refactor(listener) refactor listener related code
2014-03-13 20:05:54 -07:00
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
a9d5cc5a50 Merge pull request #610 from metaflow/master
docs(api) added note for CAS about prevIndex=0 and `cause` meaning in server response
2014-03-11 20:25:31 -07:00
b8f59340af docs(api): updated examples and description of CAS and CAD 2014-03-12 09:33:47 +07:00
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
0ea6141dc8 Merge pull request #614 from metaflow/fix-611
fix Compare and swap returns incorrect cause
2014-03-10 18:16:49 -07:00
e9a1ac15d9 Allow partial cluster config updates. 2014-03-10 16:05:03 -07:00
c0a59b3a27 Add minimum active size and promote delay. 2014-03-10 14:44:04 -06:00
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
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
c91688315a Minor fixes to proxies. 2014-03-07 07:38:40 -07:00
653274b9f6 fix(CONTRIBUTING): minor grammar fixes 2014-03-06 14:12:51 -08:00
3fff1a8dcd Add /machines and /machines/:name endpoints. 2014-03-06 15:11:31 -07:00
12c334a141 Merge pull request #613 from unihorn/29
docs(CONTRIBUTING): add code style section
2014-03-06 16:53:55 -05:00
e80a35edbe docs(CONTRIBUTING): add code style section 2014-03-06 13:38:20 -08:00
c3247755ea Merge branch 'proxy' of https://github.com/benbjohnson/etcd into proxy 2014-03-06 13:39:05 -07:00
3cd83c61c4 Fix PUT /config response and log errors. 2014-03-06 13:35:46 -07:00
2a7fdfe189 Merge pull request #4 from philips/benbjohnson-proxy
feat(scripts/test-cluster): create three proxy nodes
2014-03-06 10:13:13 -08:00
ac872b3855 Merge pull request #607 from Asmod4n/patch-1
Added Error 107 to Documentation
2014-03-05 09:18:44 -08:00
b1916b30fb Merge pull request #612 from congpeijun/master
Add PHP library.
2014-03-05 09:17:23 -08:00
3a1d9e683b Add PHP library.
We implement the api client useing php.
2014-03-05 20:01:42 +08:00
148ac97742 docs(errorcode.md): add the EcodeRootROnly error 2014-03-05 09:18:10 +01:00
ddce52c44e feat(scripts/test-cluster): create three proxy nodes
This uses some sleep hackery to make sure that window 1 has followers
and window 2 has proxy machines. Seems to work!
2014-03-04 18:58:39 -08:00
fe4dee03ab Minor fixes. 2014-03-04 09:29:44 -07:00
c3b4afc139 Fix JoinCommand comment. 2014-03-04 08:56:10 -07:00
063f3b574c Check for peer before demotion. 2014-03-04 08:53:13 -07:00
49253d8fdf Merge pull request #604 from ccding/master
fix trivial issues as I see them
2014-03-03 16:21:04 -08:00
dbed0f7d6a fix(Documentation/*): fix various typos 2014-03-03 16:12:15 -08:00
c8d6b26dfd Add auto-demotion after peer inactivity. 2014-03-03 11:15:05 -07:00
f3cc456385 Merge pull request #598 from unihorn/19
fix bugs that are found in issue #579
2014-03-01 00:30:58 -08:00
349a802a82 chore(server): remove useless CancelWhenTimeout
Setting request timeout is covered by go-httpclient now.
2014-02-28 21:52:56 -08:00
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
e99bc99dcc fix(tests/multi_node_kill_all_and_recovery): wait for cluter to build over 2014-02-27 14:31:46 -08:00
df49265674 fix(discovery): remove its own address from peer list to join 2014-02-27 14:31:28 -08:00
e5797a54a1 fix(README): remove the drone.io badge
the drone.io badge is either cached wrong by github or links to a wrong version when we build a branch, just remove it.
2014-02-27 12:48:07 -08:00
a60481c6b1 Merge pull request #593 from benbjohnson/lock-fix
fix(mod/lock): correct watch index to remove cpu load
2014-02-26 17:34:22 -07:00
dde2b71850 fix(mod/lock): correct watch index to remove cpu load
The waitIndex was being pulled from the wrong node in the lock parent which caused the watch to be returned immediately. This caused a continuous set of calls while a client was waiting for a lock.
2014-02-26 17:26:25 -07:00
fddbf35df2 Add automatic node promotion / demotion. 2014-02-25 10:02:01 -07:00
23ffafefc0 Merge pull request #596 from philips/add-file-upload-docs
feat(Documentation/api): document file upload
2014-02-24 18:49:11 -08:00
f5698d3566 Proxy promotion. 2014-02-24 17:01:04 -07:00
02a053a4b8 feat(Documentation/api): document file upload
This gets asked about a lot int IRC/mailinglist/etc. Fixes this issue:
https://github.com/coreos/etcd/issues/383#issuecomment-31183603
2014-02-23 10:17:05 -08:00
4c17dc3431 Merge pull request #592 from Plasma/patch-1
Trivial formatting correction
2014-02-22 18:49:57 -08:00
e6e6f7d8d0 Trivial formatting correction 2014-02-23 12:48:35 +11:00
1d961b8e56 Add proxy mode. 2014-02-22 15:02:20 -07:00
f922a08a27 Merge pull request #586 from wereHamster/patch-1
docs: Add links to haskell bindings and scrz project
2014-02-21 10:03:35 -08:00
7289224af9 Merge pull request #585 from philips/document-consistent
feat(Documentation): add a section on consistent reads
2014-02-21 09:40:47 -08:00
035bbc6913 feat(Documentation): add a section on consistent reads
We have waited too long to document `consistent=true`. Document it!
2014-02-21 09:39:54 -08:00
ae8d416c57 Add links to haskell bindings and scrz project 2014-02-21 02:59:38 +00:00
46d817f91b Merge pull request #577 from unihorn/6
chore: rename 'heartbeat timeout' to 'heartbeat interval'
2014-02-18 17:11:31 -08:00
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
8485987b74 Merge pull request #524 from yifan-gu/remove_omitempty_on_value
remove omitempty on value
2014-02-18 07:08:00 -08:00
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
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
cf38910601 docs: boot order to find peers 2014-02-17 14:17:14 -08:00
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
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
a72f913a60 fix(tests/functional): some squashing mistakes in PR merge
accidental squash mistake in the last PR that was merged caused a
function to be renamed but not it's caller.
2014-02-14 18:17:30 -08:00
7599a285c3 Merge pull request #574 from unihorn/6
Fix the bug that TestSimpleMultiNodeTls may error sometimes
2014-02-14 18:08:01 -08:00
efdc741e5c feat(tests/util): wait until server is up when creating cluster
Wait until server is up instead of for some time
2014-02-14 18:06:43 -08:00
93a02b619e Merge pull request #573 from cenkalti/stream-bug
Store: Fix slow consumer bug
2014-02-14 20:46:37 -05:00
e69118ade7 chore(tests/multi_node_kill_one): check function-call result
To stop test in time if error occurs
2014-02-14 17:36:11 -08:00
8bed1e1f15 fix(store/watch): fix the slow consumer bug 2014-02-14 16:52:40 -08:00
e73e61f238 test(store/watch): add test case for slow event consumers 2014-02-14 16:12:53 -08:00
9247486576 Merge pull request #568 from pjjw/fix-dash
Fix directory browsing in dashboard
2014-02-14 14:41:29 -08:00
1cc60df5f3 fix(Documentation): example of discovery in conf and env vars 2014-02-14 08:59:17 -08:00
b85eb2a44c feat(README): link to raft homepage 2014-02-13 21:58:39 -08:00
5de1caf057 Fix directory browsing in dashboard 2014-02-13 22:42:21 -05:00
be069d5918 fix(Documentation/tuning): fix incorrect comment about snapshot 2014-02-13 13:54:09 -08:00
bb911e6ab8 Merge pull request #566 from unihorn/3
chore(test): remove useless node1.etcd dir
2014-02-13 10:01:58 -08:00
7ad2dadabf chore(test): remove useless node1.etcd dir
It is a directory checked in from an etcd test run in mistake.
2014-02-13 08:52:16 -08:00
98396e8367 Merge pull request #565 from philips/cleanup-version
fix(etcd): get consistent with etcdctl on printing versions
2014-02-13 07:59:27 -08:00
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
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
c423f38700 Merge pull request #563 from benbjohnson/raft
bump(github.com/coreos/raft): cff0a00
2014-02-11 16:34:50 -07:00
193fe2df71 bump(github.com/coreos/raft): cff0a00 2014-02-11 16:09:04 -07:00
6f14467383 Merge pull request #559 from philips/document-missing-stats
fix(Documentation): single machine clusters have some stats undefined
2014-02-11 10:17:45 -08:00
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
e1af3dbde6 fix(server/tls_info): use all certificates in CA file
fixes coreos/etcd#553
2014-02-10 22:31:22 -08:00
040c1f591e Merge pull request #560 from marineam/test-v1
add(server/v1/tests): Port many of the v2 HTTP handler tests to v1
2014-02-10 22:29:35 -08:00
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
ba8e5d7add fix(Documentation): single machine clusters have some stats undefined
document that single machine clusters will omit sendBandwidthRate and
sendPkgRate.

Via http://thread.gmane.org/gmane.comp.distributed.etcd/218
2014-02-10 21:58:09 -08:00
ac5e35101c Merge pull request #558 from philips/v1-put-crash-fix
fix(server/v1): don't fail put on new v1 key
2014-02-10 19:57:00 -08:00
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
137f87c414 Merge branch 'mod-lock-fixes' of https://github.com/nabeken/etcd into nabeken-mod-lock-fixes
Conflicts:
	mod/lock/v2/acquire_handler.go
2014-02-10 08:05:57 -07:00
f5be7c9136 Merge pull request #551 from bcwaldon/doc-compareAndDelete
Document CompareAndDelete
2014-02-09 15:29:24 -08:00
a00bf38f16 feat(scripts): use zip for windows and darwin
zip files are more common on OSX and windows. Use those file formats for
those two platforms.
2014-02-09 12:11:14 -08:00
c34a2b85ed Merge pull request #550 from badboy/patch-1
Change token example to use returned value only
2014-02-08 09:22:45 -08:00
60a2709213 chore(gofmt): gofmt compare_and_delete_command.go 2014-02-08 07:28:16 -08:00
1fcbc83503 doc(CompareAndSwap): clarify prevIndex in CAS 2014-02-08 07:27:59 -08:00
08818886b2 doc(CompareAndDelete): Add missing CAD docs
Fixes issue #549
2014-02-08 07:27:33 -08:00
c6910a96de Change token example to use returned value only
The discovery.etcd.io/new already returns a complete URL containing the host, so there is no need to specify it on the command line.
2014-02-08 09:58:24 +01:00
86546c68b4 fix(README): move contact closer to contributing 2014-02-07 18:23:26 -08:00
0cc69abc70 bump(README): increase the version of the README to 0.3.0 2014-02-07 18:22:39 -08:00
f9d27c37aa Merge pull request #548 from philips/0.3.0
doc(CHANGELOG): document v0.3.0
2014-02-07 15:57:08 -08:00
ddc40e5b45 doc(CHANGELOG): document v0.3.0 2014-02-07 15:54:45 -08:00
0c2287b201 fix(scripts/build-release): use cross compilation 2014-02-07 15:50:57 -08:00
102d8e543d bump(mod/dashboard): rebuild the dashboard for the latest fixes 2014-02-07 15:17:00 -08:00
b4d5534c75 Merge pull request #546 from sym3tri/dashboard-tabindexes
fix(dashboard): disable some tab indexes.
2014-02-07 15:10:09 -08:00
4f72403acd Merge pull request #544 from bcwaldon/case-insensitive-query-params
fix(v2): Use case-insensitive check on bool query params
2014-02-07 15:09:51 -08:00
4c0c256a9d fix(dashboard): disable some tab indexes. 2014-02-07 15:09:30 -08:00
d0f254a278 Merge pull request #545 from bcwaldon/doc-prevNode
doc(api): Document prevNode
2014-02-07 15:08:28 -08:00
0696e5026f doc(api): Document prevNode 2014-02-07 15:03:15 -08:00
42363001b4 fix(v2): Use case-insensitive check on bool query params
Fix issue #261
2014-02-07 14:29:08 -08:00
ed3d63248a Merge pull request #543 from philips/bump-goraft
bump(github.com/coreos/raft): ef3280ce54f60fff98a72012f547ed2b3415841f
2014-02-07 12:33:25 -08:00
2a2714a4bf Merge pull request #514 from cenkalti/prevNode
feat(prevNode): add "prevNode" to "Set" response
2014-02-07 12:04:18 -08:00
27cb38f38c fix(Documentation): add etcd-dump to libraries and tools
Fixes #325
2014-02-07 11:35:19 -08:00
e8be43d4c6 Merge pull request #528 from coreos/restructure-dashboard
Restructure dashboard & bug fixes
2014-02-07 11:26:18 -08:00
76da437f29 bump(github.com/coreos/raft): ef3280ce54f60fff98a72012f547ed2b3415841f 2014-02-07 11:19:23 -08:00
b4635b0b80 Merge pull request #542 from philips/fix-the-build
Fix the tests
2014-02-07 07:01:00 -08:00
147235f8f5 fix(test.sh): re-add the config tests
These tests were left behind in the move to put config in its own
package.
2014-02-06 22:52:50 -08:00
aa5c8b8ffd test(config): unexport ETCD_DISCOVERY
if this is exported the next tests will try and use it and fail.
2014-02-06 22:52:18 -08:00
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
21d7d14178 chore(tests/discovery): remove errant debug statement 2014-02-06 22:10:10 -08:00
14f15c33fe fix(tests/server_utils): use a WaitGroup for RunServer
Make sure that all of the servers exit before we return by using a
WaitGroup in each handler. This was used to help track down the issue
with the TestDiscoverySecondPeerUp test and the hung go-etcd watcher.
2014-02-06 22:10:10 -08:00
bfbc539321 hack(tests/discovery): don't use go-etcd for watch
go-etcd has a bug in the watcher that holds open a goroutine. Avoid
goetcd for this operation until it is fixed.
2014-02-06 22:10:10 -08:00
5f124166eb feat(tests/discovery): use low retry interval
In TestDiscoverySecondPeerFirstNoResponse use a low retryinterval so the
test doesn't take forever.
2014-02-06 22:10:10 -08:00
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
da3fe920cb fix(tests/v1_migration): add a -name flag
The info flag is ignored as of 1c91c167fc
so in order for this test to work we need to add `-name` flag.
2014-02-06 21:23:00 -08:00
3d9fc3846c fix(scripts/test-cluster): fix backwards logic on peers add 2014-02-06 21:15:38 -08:00
63fa35c99f refactor(tls): clarify & simplify tls configuration 2014-02-06 21:15:38 -08:00
68305181f9 Merge pull request #538 from xiangli-cmu/fix_hidden_watch
fix(watcher_hub)
2014-02-06 12:39:18 -05:00
c844fccf2a fix(watcher_hub) isHidden checks the length of the watchPath before getting subString of keyPath 2014-02-06 11:09:47 -05:00
f2452a4a3c fix(build): Use ngmin. Fix all introduced erros in previous commits. 2014-02-05 22:41:10 -08:00
4e21405647 fix(dashboard): bugs in key browser and stats page.
Fixed key add, key delete bugs. More refactoring.
2014-02-05 22:40:04 -08:00
06f990236c refactor(dashboard): Restructured front-end dashboard code. 2014-02-05 22:39:46 -08:00
8a172322ff Merge pull request #537 from xiangli-cmu/fix_hidden_watch
fix(watch hidden key)
2014-02-05 23:43:41 -05:00
1b5f9eb013 test (isHidden) add unit test for isHidden function 2014-02-05 23:32:12 -05:00
5851cb5b8d chrod(watcher_hub) add comment to isHidden function 2014-02-05 23:31:38 -05:00
ba98de6ef0 fix(watch hidden key) Fix hidden keys preventing deeper recursive watches from receiving events
If a watcher has given the correct hidden directory, we should allow it to watch the non-hidden events under that hidden directory. This pull request achieves this by checking if the path after the watching prefix has a "/_" which indicates a hidden key.
2014-02-05 22:34:41 -05:00
d2a0f8f2fd Merge pull request #535 from robszumski/master
fix(docs): explicitly create links instead of using the markdown parser
2014-02-05 16:53:56 -08:00
445b584333 fix(docs): explicitly create links instead of using the markdown parser 2014-02-05 16:52:31 -08:00
f7dae0de02 Merge pull request #533 from robszumski/master
fix(docs): add full command example and link to discovery spec
2014-02-05 16:29:43 -08:00
1c6a41dda4 Merge pull request #532 from philips/remove-info-file
feat(config): remove the info file
2014-02-05 16:21:27 -08:00
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
39518b463a Merge pull request #534 from philips/discovery-protocol-fix
fix(discovery): use prevExist instead of prevValue=init
2014-02-05 15:15:08 -08:00
cbdf4a738c fix(discovery): use prevExist instead of prevValue=init
Use PUT /_state?prevExist=true in the protocol instead of PUT
/_state?prevValue=init. This lets people point one vanilla etcd at the
key prefix of another vanilla etcd and have it just work.
2014-02-05 15:14:57 -08:00
1d4912b22f fix merge conflicts 2014-02-05 14:39:48 -08:00
bc7297c2d0 feat(docs): add cluster discovery documentation 2014-02-05 14:37:40 -08:00
39ddb29e63 Merge pull request #515 from robszumski/master
feat(docs): add cluster discovery documentation
2014-02-05 11:53:31 -08:00
fe35839a77 feat(docs): add cluster discovery documentation 2014-02-05 10:54:28 -08:00
297832ff91 Merge pull request #512 from philips/bootstrap-protocol
feat(discovery): initial working code
2014-02-05 09:27:52 -08:00
2d75ef0c7a feat(Documentation/discovery-protocol): explain heartbeating
Explain more information about how the TTL works and etcds role.
2014-02-05 09:27:40 -08:00
2822b9c579 tests(tests/functional): add tests for Discovery
This tests a variety of failure cases for the Discovery service
including:

- Initial leader failures
- Discovery service failures
- Positive tests for discovery working flawlessly
2014-02-05 09:27:39 -08:00
ff6090836c fix(tests/server_utils): add a metrics bucket
This is required to avoid getting nil pointer exceptions if a peer joins
this test server.
2014-02-05 09:27:39 -08:00
a8b07b1b48 chore(config): go fmt 2014-02-05 09:27:39 -08:00
8687dd3802 feat(discovery): fully working discovery now 2014-02-05 09:27:39 -08:00
40021ab72e bump(github.com/coreos/go-etcd): 526d936ffe75284ca80290ea6386f883f573c232 2014-02-05 09:27:39 -08:00
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
40a8542c22 feat(bootstrap): wire up the flag
This wires up `-bootstrap-url` to some code (which crashes) :)
2014-02-05 09:27:39 -08:00
f56965b1c0 refactor(config): make config its own package
Refactor config into its own package. Trying to tease the config from
the server so that all of the control surfaces are exposed in the Server
for easier testing.
2014-02-05 09:27:39 -08:00
69922340f6 refactor(server): move utilities into pkg
like camlistore lets move these utilities into a `pkg` prefix.
2014-02-05 09:27:39 -08:00
0e50d9787a feat(*): bootstrap initial commit
Setup the flags, and checkin the docs. Lets do this!
2014-02-05 09:27:39 -08:00
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
03cadc543f Merge pull request #525 from yifan-gu/fix_comments
fix some typos in comments in store.go
2014-02-04 11:46:29 -08:00
b61cf9cb8e fix a format error in libraries-and-tools.md 2014-02-04 14:30:40 -05:00
8d2a8e1c7a fix some typos in comments in store.go 2014-02-04 14:17:44 -05:00
72b393ca53 Merge pull request #519 from philips/fixup-server-tls-client-config
fix(server): fix client certificate verification
2014-02-03 17:33:45 -08:00
6398206e4f Merge pull request #1 from bcwaldon/fixup-server-tls-client-config
test(TLS): Add test coverage for etcd TLS
2014-02-03 17:33:34 -08:00
226c20c097 test(TLS): Add test coverage for etcd TLS 2014-02-03 17:32:24 -08:00
0b9c5c975e fix(test.sh): use . not source 2014-02-02 17:01:21 -08:00
272dc343ef Merge pull request #520 from philips/use-goven
Use goven for all third party dependencies
2014-02-02 16:58:07 -08:00
d7d20d1c3d bump(github.com/stretchr/testify): 9cc77fa25329013ce07362c7742952ff887361f2 2014-02-02 16:57:36 -08:00
2557992b70 fix(tests): use correct raft package 2014-02-02 16:57:36 -08:00
33be0e09fe fix(build/test.sh): use new GOPATH setup 2014-02-02 16:57:36 -08:00
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
ea8a353545 chore(*): gofmt everything 2014-02-01 23:44:10 -08:00
0566bf2d5d Revert "Fix compile bug in peer_server_handlers.go "
This reverts commit e1ed380f04.
2014-02-01 20:09:53 -08:00
93a129e55a Merge pull request #516 from augustoroman/patch-1
fix(server compilation): compile bug in peer_server_handlers.go
2014-02-01 19:52:08 -08:00
58e1f12240 doc(server): some basic docs on the tls_config object
This should be refactored but something to remember while refactoring.
2014-01-31 17:08:37 -08:00
0fa6d38574 fix(server): fix client certificate verification
In d0c4916fe9 the TLS CA Certificate
verification broke.

This was bisected using the following basic test:

```
./bin/etcd -f -name machine0 -data-dir machine0 -ca-file=/tmp/ca/ca.crt -cert-file=/tmp/ca/server.crt -key-file=/tmp/ca/server.key.insecure
```

And in another window doing

```
curl --key /tmp/ca/server2.key.insecure  --cert /tmp/ca/server2.crt -k -L https://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar -v
```

Before merging this PR there are a few things that need to be fixed up:

1) Tests for client certs both positive and negative
2) Refactor (or at least documentation of) the TLSConfig types
2014-01-31 16:56:15 -08:00
e1ed380f04 Fix compile bug in peer_server_handlers.go
resp.Success is a func() bool, not a bool.  Call it.
2014-01-30 15:31:36 -08:00
354a91290e feat(prevNode): add test for prevNode 2014-01-29 17:52:25 -08:00
3ec7004421 feat(prevNode): add "prevNode" to "Set" response 2014-01-29 17:30:33 -08:00
a542a7804b Merge pull request #508 from jonboulle/master
Various cleanup to API documentation
2014-01-25 13:06:29 -08:00
03ff4c8b76 Missed one 2014-01-25 12:22:37 -08:00
7992448f6a Various cleanup to API documentation 2014-01-25 12:08:57 -08:00
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
7ee7e910eb feat(*): enable snapshots by default
Ben recently added test coverage for snapshots so we should enable it in
etcd. Lets do this.

1d66f6a111
2014-01-23 20:53:22 -08:00
281b0e7e59 Merge pull request #506 from philips/add-freebsd-docs
feat(Documentation): add instructions on freebsd
2014-01-23 16:44:38 -08:00
50e6256058 feat(Documentation): add instructions on freebsd 2014-01-23 16:43:38 -08:00
1b00c449a5 Revert "Better error message when setting values on directories"
This reverts commit d13dd50d51.
2014-01-23 11:22:11 -08:00
9848072d21 Merge pull request #487 from intjonathan/patch-1
English clarity in filesystem documentation.
2014-01-23 04:03:05 -08:00
2652e46d66 Merge pull request #504 from kelseyhightower/master
Better error message when setting values on directories
2014-01-23 03:59:40 -08:00
d13dd50d51 Better error message when setting values on directories
Without this commit etcd returns the following error message when
setting values on directories:

    {
      "errorCode":102,
      "message":"Not a file",
      "cause":"/postgres",
      "index":2
    }

While the above error message is accurate it's not very descriptive.
This commit adds a new error code/message which better describes why the
write operation failed. etcd now returns the following:

    {
      "errorCode":109,
      "message":"Cannot set value on directory",
      "cause":"/postgres",
      "index":2
    }
2014-01-22 23:02:33 -08:00
8fece992eb Update filesystem documenation for clarity. 2014-01-22 20:43:54 -08:00
3264b51a74 Merge pull request #501 from benbjohnson/snapshot-documentation
Add snapshot documentation
2014-01-22 15:26:53 -08:00
0692097a73 Add snapshot documentation. 2014-01-22 16:06:25 -07:00
19ef1042d6 Merge pull request #497 from philips/store-bench-no-rand
fix(store/store_bench): don't use rand
2014-01-22 13:19:04 -08:00
394e651591 Merge pull request #484 from bcwaldon/server-config
Refactor server init code
2014-01-22 11:39:27 -08:00
2fe22f1890 refactor(servers): emit http.Handlers from *Server 2014-01-22 11:17:58 -08:00
089021ca6d refacotor(transporter): make TLS config explicit 2014-01-22 11:17:58 -08:00
f158dfcd77 refactor(peerserver): Remove PeerServerConfig.Path 2014-01-22 11:17:58 -08:00
19980a7033 refactor(peerserver): remove timeouts from PeerServerConfig 2014-01-22 11:17:58 -08:00
a7d9efa900 refactor(server): Remove ServerConfig struct 2014-01-22 11:17:58 -08:00
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
5c3a3db2d8 refactor(server): treat Server as an http.Handler 2014-01-22 11:17:57 -08:00
074099a1b2 refactor(cors): Simplify corsInfo struct 2014-01-22 11:17:57 -08:00
a2ee620394 refactor(raft): init raft transporter & server in main 2014-01-22 11:17:56 -08:00
ffa2b07dc4 refactor(transporter): Pass in everything the transporter needs 2014-01-22 11:17:43 -08:00
60bbc57aeb refactor(transporter): pass in timeouts 2014-01-22 11:17:43 -08:00
86718167e8 refactor(peer_server): move stats construction to factories 2014-01-22 11:17:42 -08:00
7bd4d05a38 refactor(peer-server): move listener init out of peer_server.go 2014-01-22 11:17:41 -08:00
d0c4916fe9 refactor(server): move listener init out of server.go 2014-01-22 11:17:26 -08:00
91fc6aabd2 chore(gofmt): Run gofmt 2014-01-22 11:17:26 -08:00
c0ff8f6026 chore(imports): Shift around some imports 2014-01-22 11:17:26 -08:00
a93d60be90 refactor(cors): Break apart CORS data and middleware 2014-01-22 11:17:26 -08:00
c47760382e refactor(Server): Use a config struct in Server 2014-01-22 11:17:25 -08:00
9c8a23c333 refactor(PeerServer): Use a config struct in PeerServer 2014-01-22 11:17:03 -08:00
91f768f9ae refactor(cors): Rename cors_handler.go to cors.go 2014-01-22 10:59:12 -08:00
6c48466bfe Merge pull request #500 from drusellers/patch-2
adding .net client to the matrix
2014-01-22 09:26:44 -08:00
5bf667851c adding .net client to the matrix 2014-01-22 10:00:22 -06:00
d77e3a203f Merge pull request #499 from drusellers/patch-1
adding .net client
2014-01-22 07:29:09 -08:00
c32dfa013d adding .net client 2014-01-22 09:24:54 -06:00
6b70efbe30 Merge pull request #498 from tobz/actually-hidden-keys
fix(store): properly hide hidden keys from watchers, not just gets
2014-01-22 06:52:31 -08:00
641edd4e6e test(store): group together all store tests that deal with hidden keys 2014-01-22 09:29:53 -05:00
823fdfab12 fix(store): make isHidden see if any portion of the path is hidden, not just the last element 2014-01-22 09:29:33 -05:00
0cacb6cba4 test(store): exercise watchers receiving notifications of non-hidden keys within hidden directories 2014-01-22 09:20:57 -05:00
7a948746a8 fix(store): move logic to handle whether or not to notify (re: hidden keys) entirely into watcher hub 2014-01-22 09:02:42 -05:00
1273875a00 fix(mod/lock): Use CreatedIndex in the first node to watch
ModifiedIndex in the lock directory is not incremented and the event
store has only 1000 histories for now.

Acquiring a lock is not queued while (index - ModifiedIndex) > 1000 and
prevIndex exists.
2014-01-22 20:00:15 +09:00
4c2942f9f9 fix(mod/lock): Use dedicated channel to shutdown goroutine properly
If closeChan is available and stopWatchChan was closed by defer
select selects a single channel randomly. This causes a panic sending to closed
channel.
2014-01-22 19:42:07 +09:00
139f59f7d1 fix(store): properly hide hidden keys from watchers, not just gets 2014-01-21 20:26:56 -05:00
80c22a4fb2 fix(store/store_bench): don't use rand
rand just introduces more noise to the results, don't use it.
2014-01-21 17:01:26 -08:00
a417782151 Merge pull request #483 from bcwaldon/metrics
Integrate go-metrics
2014-01-21 14:17:03 -08:00
e87f3231a1 Merge pull request #496 from bcwaldon/droneio
test(ci): Replace travis.ci with drone.io
2014-01-21 12:28:52 -08:00
fe39288ebf test(ci): Replace travis.ci with drone.io 2014-01-21 11:50:36 -08:00
97bc5b260d feat(metrics): Publish peer heartbeat events as metrics 2014-01-21 11:44:22 -08:00
47f24d1088 bump(github.com/coreos/raft): bf7accb84ce4fe446983abffe00dd18a6b8cbc18 2014-01-21 11:18:50 -08:00
3a75d0a465 Merge pull request #493 from xiangli-cmu/bench_watcher
test(store_bench_test.go) add watch bench
2014-01-21 07:35:18 -08:00
17c8f6d2e8 test(store_bench_test.go) add watch bench 2014-01-21 06:51:40 -05:00
7eaad5c8e0 feat(metrics): enable some metrics; push to graphite
* -trace flag controls whether or not to enable metrics-gathering
  and the /debug/* HTTP endpoints
* -graphite-host flag controls where metrics should be sent
* timer.ae.handle metric tracks execution time of AppendEntriesRequest
2014-01-20 15:39:36 -08:00
3e7c2dff96 feat(metrics): Add documentation and contrib scripts 2014-01-20 15:37:31 -08:00
14c96306a0 feat(metrics): Add metrics pkg 2014-01-20 13:32:42 -08:00
d122ed3bcd Merge pull request #492 from rwindelz/fix-ttl
fix(store): TTL should range 1..n rather than 1..n+1
2014-01-20 09:28:38 -08:00
451e874696 Merge pull request #480 from xiangli-cmu/store_bench
feat(store/store_bench_test.go) add a benchmark for set operation
2014-01-20 07:00:54 -08:00
290ca6bbc7 Merge pull request #491 from jkakar/master
Trivial typo fix in API documentation
2014-01-19 21:53:26 -08:00
a2e5bae951 fix(store): TTL should range 1..n rather than 1..n+1
was experiencing intermittent functional test fails where TTL was eg 101
when 100 was expected
informal testing on a windows platform shows Go times resolving to the
nanosecond but with an accuracy of approximately 1 millisecond
I believe some of the functional test steps would run in under a
millisecond and cause the TTL to be recomputed with the same time.Now()
value resulting in a TTL that was +1 from the expected
2014-01-19 21:45:53 -08:00
823e744ed9 - Fix typo. 2014-01-18 18:28:33 -08:00
35c89c7537 feat(metrics): Add github.com/rcrowley/go-metrics 2014-01-17 16:12:18 -08:00
77887e8253 fix(bench): remove trailing slash
Remove trailing slash. This works around
https://github.com/coreos/go-etcd/issues/82
2014-01-17 16:03:46 -08:00
1e6c0dee24 Merge pull request #488 from robszumski/master
feat(docs): Prepare to sync security doc to CoreOS website
2014-01-17 13:11:49 -08:00
e89e42382a fix(docs): remove header 2014-01-17 13:06:59 -08:00
184a5901e6 feat(docs): modify for sync to CoreOS website 2014-01-17 12:25:36 -08:00
6f8b0dc7ef add delete bench 2014-01-17 15:18:11 +08:00
21f0c6f9d4 feat(store_bench) add set bench for different value sizes 2014-01-17 14:19:31 +08:00
bd2b3793a6 Merge pull request #486 from philips/document-profiling-binary
fix(Documentation/profiling): note about using the right binary
2014-01-16 17:09:43 -08:00
25caac370f bump(github.com/coreos/go-log): 70d039bee4b0e389e5be560491d8291708506f59 2014-01-16 16:56:10 -08:00
0c8329a3fb fix(scripts/test-cluster): use v2 flags and find the path for etcd 2014-01-16 16:40:49 -08:00
444b5d329c fix(Documentation/profiling): note about using the right binary 2014-01-16 15:51:30 -08:00
7a7f6aea00 Merge pull request #479 from philips/add-debug-endpoint
add-debug-endpoint
2014-01-16 11:28:52 -08:00
b226b14eb2 add mem stats for sets benchmark 2014-01-16 16:06:18 +08:00
72b165ad4c Merge pull request #482 from bcwaldon/etcdbench
etcdbench -endpoint flag; error reporting
2014-01-15 22:37:33 -08:00
bd04905154 fix(etcdbench): Check for error in etcdbench set operation 2014-01-15 22:33:34 -08:00
471c40735c feat(etcdbench): Add -endpoint flag to etcdbench 2014-01-15 22:33:25 -08:00
c2d1dc4f51 add a setWithJson test 2014-01-16 09:16:33 +08:00
000290dc94 Merge pull request #481 from philips/fixup-test-cluster
fix(scripts/test-cluster): use ./bin/etcd now
2014-01-15 17:15:53 -08:00
3f3a324108 fix(scripts/test-cluster): use ./bin/etcd now 2014-01-15 17:15:18 -08:00
77477b3e43 feat(store/store_bench_test.go) add a benchmark for set operation of store pkg
We randomly generage N 3 level keys. We benchmark the speed of setting each key into etcd store.
2014-01-16 09:03:42 +08:00
c2077ed0b6 feat(server): add net/http/pprof endpoints
Add some basic profiling endpoints over http to start digging into
memory and request latencies.
2014-01-15 15:03:29 -08:00
ceefa98c76 Merge pull request #476 from ekristen/master
fixes bug with the etcd docker image not being able to run
2014-01-15 10:39:38 -08:00
d3fb9f0f0f etcd is in the bin directory, fixes bug with the docker image not working 2014-01-15 12:46:09 -05:00
d9088a5f18 Merge pull request #473 from bcwaldon/fix-peer-timeouts
Use election and heartbeat timeouts when building peer transporter
2014-01-15 02:11:40 -08:00
87113f985f Merge pull request #472 from benbjohnson/fix-error-codes
Fix mod/lock and mod/leader return error codes.
2014-01-15 01:14:59 -08:00
4da933e4a4 Merge pull request #475 from philips/fixup-travis
fix(travis): fixes from the third_party.go merge
2014-01-14 22:41:34 -08:00
56909bb6a3 fix(travis): fixes from the third_party.go merge 2014-01-14 22:36:40 -08:00
ecd73acc01 Merge pull request #460 from philips/use-third-party.go
chore(build): use third_party.go
2014-01-14 22:16:15 -08:00
e2e0853492 fix(server/release_version): checkin to git 2014-01-14 22:14:47 -08:00
0f97e3528a chore(build): use third_party.go
use the third_party.go project to replace our update script. This
requires moving a few things around and gets rid of a few annoying bugs:

- You can now bump individual packages
- A new src directory isn't created on build
- Less shell scripting!
- Things get built into ./bin/
2014-01-14 22:14:47 -08:00
89074ffcea Merge pull request #474 from jpetazzo/switch-to-go-1.2
Download and build Go 1.2 in the Dockerfile.
2014-01-14 21:54:14 -08:00
6b14fe7747 Download and build Go 1.2 in the Dockerfile.
The dependency BurntSushi/toml actually needs Go 1.2, because it uses
encoding.TextUnmarshaler, which didn't exist in Go 1.1. Since the PPA
that we use doesn't have Go 1.2 yet, we will use the same method as
Docker, i.e. download Go source tarball and compile it.
2014-01-14 18:19:37 -08:00
48e36422b5 chore(gofmt): Run gofmt on server/config.go 2014-01-14 09:18:09 -08:00
32df6f92fc fix(peer): Pass peer server timeouts through factory
The peer's heartbeat and election timeouts are needed to build
the transporter in the factory method.
2014-01-14 09:18:03 -08:00
cde184fdbf Fix mod/lock and mod/leader return error codes. 2014-01-14 07:57:30 -07:00
97f1363afa Merge pull request #470 from ranjib/consistent_curl_examples
style(Documentation/api): keep curl based examples consistent and correct
2014-01-12 21:54:39 -08:00
8b8b8d74fe style(Documentation/api): keep curl based examples consistent and correct
- fix curl examples where `http://` was missing.
- consistent passing HTTP method parameter (all examples now have -X ACTION at
 the end or the url, GET is implicit)
- quote url when it contains `&` , instead of escaping
2014-01-11 20:51:25 -08:00
5821a1390a Merge pull request #466 from bcwaldon/verbosity
Add more control over verbose logging
2014-01-10 14:30:32 -08:00
ae2130952b fix(config): Set VeryVerbose properly 2014-01-10 11:45:04 -08:00
b0cdf73565 feat(logging): Add VeryVeryVerbose opt to control raft trace info
Set very_very_verbose=true in a config file or use the -vvv CLI
option to get raft trace logs in addition to etcd debug logs.
2014-01-10 11:45:04 -08:00
c64c739fab Merge pull request #461 from xiangli-cmu/stream_watcher
feat(stream watchers) add stream watcher support
2014-01-10 08:42:31 -08:00
feb6f2dad7 Merge pull request #465 from philips/add-note-that-the-dahboard-is-compiled-in
feat(Documentation/modules): note the dashboard is compiled in
2014-01-10 06:10:36 -08:00
2c42271cea Merge pull request #18 from cenkalti/li
feat(stream watchers) fix locking issue
2014-01-10 06:07:14 -08:00
8597904bc2 feat(stream watchers) fix locking issue 2014-01-10 16:04:23 +02:00
227ea57c37 Merge pull request #17 from cenkalti/li
feat(stream watchers) disable double chunking
2014-01-10 05:17:44 -08:00
5b924dfd4e feat(stream watchers) disable double chunking 2014-01-10 15:09:35 +02:00
181805bb87 feat(Documentation/modules): note the dashboard is compiled in 2014-01-09 17:57:14 -08:00
63c06d6c79 Merge pull request #463 from robszumski/master
feat(docs): make clustering examples more complete
2014-01-09 17:07:12 -08:00
782166dadd feat(docs): make clustering examples more complete 2014-01-09 14:37:04 -08:00
7bfd11679b Merge pull request #462 from xiangli-cmu/sync_cnt_for_snapshot
fix(snapshot) count num of log entries rather than etcd transcations
2014-01-09 05:29:18 -08:00
f250649a5e fix(snapshot) count num of log entries rather than etcd transcations 2014-01-09 21:28:09 +08:00
629a827ee2 Merge pull request #16 from cenkalti/li
feat(stream watchers) end streaming if too many notifications
2014-01-09 04:21:26 -08:00
c247d807af feat(stream watchers) end streaming if too many notifications 2014-01-09 14:15:36 +02:00
22a25a18b3 feat(stream watchers) add stream watcher support 2014-01-09 15:28:33 +08:00
6b77b94127 Merge pull request #420 from benbjohnson/logging
Logging
2014-01-08 21:36:52 -08:00
2bfb8f5e4f Merge pull request #418 from xiangli-cmu/cancel_watcher
cancel watcher
2014-01-08 21:34:32 -08:00
dd6623be2f Merge pull request #454 from dsoprea/master
Added HTTPS for python-etcd-client.
2014-01-08 21:32:59 -08:00
fa3b4a7941 refactor(watcher) change newWatcher to Watch 2014-01-09 13:29:04 +08:00
8047cfd48e Merge pull request #447 from robszumski/master
Prepare docs to be synced to website
2014-01-08 16:38:44 -08:00
53477af1eb Merge branch 'master' of https://github.com/coreos/etcd into logging 2014-01-08 16:50:51 -07:00
355bd6df9b Fix Travis CI. 2014-01-08 16:41:01 -07:00
8d25dac1ba Revert test.sh changes. 2014-01-08 16:21:22 -07:00
b47042634a Add ThresholdMonitorTimeout. 2014-01-08 15:51:13 -07:00
e02441acb1 Merge pull request #455 from philips/fixup-cas-header
chore(Documentation/api): introduce acronym later in the text
2014-01-08 10:46:46 -08:00
ddd8e85146 chore(Documentation/api): introduce acronym later in the text 2014-01-08 10:46:05 -08:00
68546de2cb Merge pull request #444 from philips/document-stats-api
Documentation: document the stats API
2014-01-08 10:41:29 -08:00
7553a92232 feat(Documentation/api): document the store statistics 2014-01-08 10:40:57 -08:00
c7e642baa2 fix(Documentation/api): fixup the names in stats
This was fixed in #449
2014-01-08 10:36:44 -08:00
0377ea751d Added additional separator column. 2014-01-08 10:48:29 -05:00
5efad911d5 Added HTTPS for python-etcd-client. 2014-01-08 09:57:45 -05:00
d38a260e00 Merge pull request #452 from xiangli-cmu/fix_client-matrix_link
doc(Documentation/libraries-and-tools.md) fix link to clients-matrix
2014-01-07 22:32:51 -08:00
0cc2e8887f doc(Documentation/libraries-and-tools.md) fix link to clients-matrix 2014-01-08 14:26:56 +08:00
3736b7678a Merge pull request #449 from xiangli-cmu/fix_stats
fix(peer_server.go) init name field and update leader field
2014-01-07 19:21:30 -08:00
e373c9ac8c fix(docs): suggest cors flag for using dashboard 2014-01-07 17:08:15 -08:00
5f2d9b38dc fix(docs): reference correct cors flag 2014-01-07 17:03:45 -08:00
a7eeb01bc8 fix(docs): reference correct cors flag 2014-01-07 17:03:11 -08:00
c26215a740 Merge pull request #450 from dsoprea/master
Updated client matrix.
2014-01-07 16:06:10 -08:00
4e8828c5c4 Merge pull request #451 from philips/use-the-right-port
fix(README): use 4002 not 4001
2014-01-07 15:58:20 -08:00
2dde2cbb6f fix(README): use 4002 not 4001
The default port is 4001 not 4002. Fix this.
2014-01-07 15:57:18 -08:00
88e0263d08 Add heartbeat and timeout threshold loggers. 2014-01-07 16:17:48 -07:00
28652ed7af Updated client matrix. 2014-01-07 00:49:28 -05:00
60c2680bfd fix(peer_server.go) init name field and update leader field 2014-01-07 12:30:20 +08:00
9a8bd96ad3 feat(Documentation/api): add a statistics section 2014-01-05 23:06:56 -08:00
66271fe986 chore(Documentation/api): remove some whitespace 2014-01-05 23:05:15 -08:00
1caa3245e6 feat(Documentation/api): add some intro material
add some intro material and normalize the headers to the rest of the
coreos/docs.
2014-01-05 23:04:27 -08:00
04720bd8bf Merge pull request #442 from philips/remove-ETCD_WEB_URL
chore(server): remove web url
2014-01-05 20:41:28 -08:00
ecc96df699 chore(server): remove web url
web URL is not longer used so remove it from tests and configuration
documents.
2014-01-05 20:39:39 -08:00
0b47d6888d Merge pull request #441 from lavagetto/matrix
docs(clients-matrix.md): Introducing the library features matrix.
2014-01-05 20:27:10 -08:00
e9b85264ab docs(clients-matrix.md): Introducing the library features matrix.
As support for etcd features is very uneven between different clients,
a feature matrix can help application developers to understand what a
client library can offer them, and also help client libraries
developers to understand what they should work on. I assessed the
features of all client libraries by looking at their master branch on
github, to the best of my knowledge.
2014-01-05 11:30:11 +01:00
d397e83a05 Merge pull request #440 from philips/splitup-README
feat(README): splitup the sections into individual files
2014-01-04 17:59:17 -08:00
801b642dea fix(Documentation): fixup headers
fixup the headers on the api and tuning sections
2014-01-04 17:58:39 -08:00
e7527ebb45 fix(README): link to the configuration file too 2014-01-03 14:39:23 -08:00
bfde27a99d feat(README): splitup the sections into individual files
The README is getting rather large so split it into individual files.

The next step will be rendering these into HTML pages with a TOC so that
they are a bit more navigable.

What do people think of this?
2014-01-03 14:37:53 -08:00
c65f8fc7ad Merge pull request #439 from lavagetto/master
docs(README.md): update client libraries and projects.
2014-01-03 10:29:12 -08:00
547c05685e Merge pull request #438 from robszumski/master
feat(docs): add cluster size guide
2014-01-03 10:28:59 -08:00
5794d70881 docs(README.md): update client libraries and projects.
This commit adds information about API version support for all
clients - clearly listing which clients support API v2.

Also, a new nodejs client is added, and a new project as well.
2014-01-03 17:34:18 +01:00
009b84c5fc feat(docs): add cluster size guide 2014-01-02 16:11:25 -08:00
b5426d967e Fix TOML. 2014-01-02 16:48:50 -07:00
60827ebd5a bump(code.google.com/p/go.net): d4afe896f927+ 2014-01-02 16:41:38 -07:00
ae10b6226d bump(github.com/gorilla/mux): 9ede152210fa25c1377d33e867cb828c19316445 2014-01-02 16:41:33 -07:00
d32fd00bbb bump(github.com/coreos/go-systemd): 05a794e41e912eca8ebe1538241815f80da76d69 2014-01-02 16:41:31 -07:00
7c29d5bf5c bump(github.com/coreos/go-log/log): 2014-01-02 16:41:31 -07:00
f37d9df118 bump(github.com/coreos/go-etcd): 9de519a68a870466f217c35f476ba658f1694bbe 2014-01-02 16:41:28 -07:00
7da85d66fd bump(github.com/coreos/raft): 20e384681d014100733dd69d287fe254d685f319 2014-01-02 16:41:27 -07:00
cf656ccfdd bump(github.com/BurntSushi/toml): 2fffd0e6ca4b88558be4bcab497231c95270cd07 2014-01-02 16:41:25 -07:00
d7087ed61a Merge branch 'master' of https://github.com/coreos/etcd into logging 2014-01-02 16:30:09 -07:00
98351b9756 Merge pull request #436 from thwarted/help-version-fixups
docs(server/config.go): minor formatting changes
2014-01-02 13:50:19 -08:00
5260c7c939 Merge pull request #434 from rwindelz/master
fix (scripts/release-version.ps1): fix windows build
2014-01-02 12:39:15 -08:00
78e2fc1bc8 Merge pull request #437 from bcwaldon/README-indexes
chore(README): Expand README with more info about indexes
2014-01-02 12:33:49 -08:00
c17ad07bdb chore(README): Expand README with more info about indexes 2014-01-02 11:35:17 -08:00
5b105ed156 fix deprecated option tests 2014-01-02 11:11:27 -06:00
af3240fa18 docs(server/config.go): minor formatting changes
When -version or -help are given, don't warn about having to derive
the data directory name.
Print warnings about deprecated options on separate lines so the log
isn't screwy.
2014-01-02 04:30:38 -06:00
45b4d6d194 fix(build.ps1): not required to be admin to run build in windows
mklink /D in windows requires elevated privilege (Runas Administrator),
'/J' to create a directory junction point runs with user privilege
use an explicit fully qualified path for junction target
2014-01-01 22:23:07 -08:00
04ad7a91dd fix (scripts/release-version.ps1): fix windows build
fix reflects changes made in commit
7670c85d70
2014-01-01 21:16:40 -08:00
fd0d0813ce Merge pull request #432 from btipling/fix_trimsplit
Trimsplit Wasn't using separator, more efficient.
2014-01-01 13:46:08 -08:00
5a4c41be37 Don't copy strings. 2014-01-01 13:44:04 -08:00
57f94f65a8 Merge pull request #433 from xiangli-cmu/prevNode
feat(node_extern.go) add prevNode field
2014-01-01 12:59:41 -08:00
189b98c03f refactor(node_extern.go) remove unused prevValue field 2014-01-01 20:01:29 +08:00
f46fdbf078 feat(node_extern.go) add prevNode field 2014-01-01 19:50:07 +08:00
ed2d7d64cd Trimsplit Wasn't using separator, more efficient. 2013-12-31 09:13:41 -08:00
cc10b1084d Merge branch 'master' of https://github.com/coreos/etcd into logging
Conflicts:
	tests/functional/simple_snapshot_test.go
2013-12-30 16:19:57 -07:00
c49711ae2c Merge pull request #429 from philips/README-remove-prevValue
fix(README): remove prevValue references in the README
2013-12-30 13:53:17 -08:00
b7be38da12 Merge pull request #430 from philips/remove-old-release-version
chore(release_version): remove this unused file
2013-12-30 13:52:44 -08:00
6b8b6cda66 Merge pull request #431 from btipling/master
Weird grammar, not sure I fixed it well enough.
2013-12-30 13:06:09 -08:00
850cbf6018 Weird grammar, not sure I fixed it well enough. 2013-12-30 12:49:19 -08:00
dcabc6ae80 chore(release_version): remove this unused file
Fixes #425
2013-12-30 11:37:32 -08:00
1ab3db18bb fix(README): remove prevValue references in the README
We plan on adding a PrevNode field in the Response object but it hasn't
been needed thus far. Discussion was here:

http://thread.gmane.org/gmane.comp.distributed.etcd/56

Fixes #428
2013-12-30 10:44:35 -08:00
8edc1f30d9 Merge pull request #424 from xiangli-cmu/fix_lock_doc
docs(README.md) fix wrong index value in lock section
2013-12-29 17:26:26 -08:00
5266968b61 docs(README.md) fix wrong index value in lock section 2013-12-30 09:24:18 +08:00
9bd36f173e Merge pull request #422 from dsoprea/master
Add documentation for enumerating sorted, in-order keys.
2013-12-29 10:09:01 -08:00
a9e20aecc6 Raft fixes, integrate logging. 2013-12-29 10:40:10 -07:00
e66f6d76e6 Modified doc. 2013-12-28 11:38:59 -05:00
c62603ba73 Added documentation for sorted listings. 2013-12-28 11:37:32 -05:00
4692d6e966 Merge pull request #421 from philips/README-api-versioning
feat(README): add an API versioning section
2013-12-28 07:33:13 -08:00
9049a2afd5 feat(README): add an API versioning section
Based on a question on the mailing list. Add a section about API
versioning.
2013-12-28 07:13:41 -08:00
bbbf8fd574 fix(watcher_hub.go) decrease count when remove a watcher 2013-12-28 15:51:16 +08:00
d66dc3c1c7 refactor(watcher_hub.go) refactor notifyWatchers() 2013-12-28 15:49:05 +08:00
59ccefee0f fix(watchhub.go) add a lock to protect the hashmap 2013-12-28 14:55:50 +08:00
3b485e20bb Merge pull request #419 from kula/fix-leader-documentation
fix(README): fixup leader docs
2013-12-27 22:48:31 -08:00
44af8ea190 bump(github.com/coreos/raft): ca61124b291fe38a2ab592a8b42f1423e3c31cc4 2013-12-27 15:24:37 -07:00
2504c4ad34 bump(code.google.com/p/goprotobuf): dd4df9b5c0cf 2013-12-27 15:23:35 -07:00
d447ba52ad fix(README): fixup leader docs
The leader module uses PUT to set a leader value and DELETE to delete one. Fix
the documents to reflect that.
2013-12-27 15:15:19 -05:00
5e499456f0 init cancel watcher 2013-12-26 22:06:15 +08:00
e96234382a Merge pull request #417 from philips/fixup-readme
fix(README): Remove excress backticks
2013-12-25 23:06:25 -08:00
78e2a27ee0 fix(README): Remove excress backticks 2013-12-25 19:28:43 -08:00
715b4d7bfc Merge pull request #408 from xiangli-cmu/compareAndDelete
Compare and delete
2013-12-25 13:16:27 -08:00
c36f306a1d test(delete_handler_test.go) fix inconsistent between test case and comments 2013-12-25 19:05:40 +08:00
bfa7d54b02 refactor(store.go) handle short condition first 2013-12-25 19:01:04 +08:00
4ff773aaaf bump(github.com/coreos/raft): 0c36c972a25343e7e353257284ef6df5c8676a3d 2013-12-23 16:08:10 -07:00
0611c81e88 bump(code.google.com/p/go.net): 127da548775d 2013-12-23 16:02:02 -07:00
6b4f7cf861 bump(github.com/coreos/go-etcd): d2eb551cc057fdaf9848d6130292187bb1368208 2013-12-23 16:01:54 -07:00
51406a3582 bump(github.com/coreos/raft): 0409b22a50cb2576318f294eba5c1092316dbea1 2013-12-23 16:01:53 -07:00
9ebac0b9fd bump(github.com/BurntSushi/toml): da57f3b4c85ec56cf139d7dc05396fa98a040773 2013-12-23 16:01:51 -07:00
4acfc26c5e Add event-based debugging output. 2013-12-23 16:01:05 -07:00
3bd2d0da88 bump(code.google.com/p/goprotobuf): 8ba95f2a7335 2013-12-20 15:39:30 -07:00
b7854354ff bump(code.google.com/p/go.net): a1b606ad6242 2013-12-20 15:39:29 -07:00
80bc68eb49 bump(github.com/stretchr/testify/mock): 2013-12-20 15:39:26 -07:00
8c8ab6a4cb bump(github.com/gorilla/mux): 9ede152210fa25c1377d33e867cb828c19316445 2013-12-20 15:39:24 -07:00
985db7838c bump(github.com/gorilla/context): a08edd30ad9e104612741163dc087a613829a23c 2013-12-20 15:39:23 -07:00
04c98d0a75 bump(github.com/coreos/go-systemd): 700560af03f8e1df35839041745c9f1fccba7c72 2013-12-20 15:39:22 -07:00
53436af899 bump(github.com/coreos/go-etcd): 925b981b19b370a2fe073c2395e8f76cfc241124 2013-12-20 15:39:19 -07:00
81a73dbc80 bump(github.com/coreos/raft): ac7be58b1bec49dfcfc7216df4ae27173da1fa57 2013-12-20 15:39:17 -07:00
c4179829d6 tests(get_handler) loosen the time assumption for the un 2013-12-20 08:23:50 +08:00
9cf1fcc987 refactor(compareAndDelete) 2013-12-20 05:10:22 +08:00
e2fa89d554 merge compareAndDelete 2013-12-19 22:19:49 +08:00
3d16633a94 update the v2 server to support recursive on CompareAndDelete events 2013-12-01 13:56:32 -07:00
d2d7e37990 implement recursive for CompareAndDelete in the store 2013-12-01 13:38:09 -07:00
f8985d731f keep the Delete tests together 2013-12-01 13:28:14 -07:00
373199fe46 support CreateAndDelete through the v2 server 2013-11-30 16:25:26 -07:00
171072c736 add the CompareAndDelete command 2013-11-30 16:24:23 -07:00
90a8f56c96 add compareAndDelete event action 2013-11-30 10:08:25 -07:00
5b739f6166 track CompareAndDelete stats 2013-11-30 10:05:48 -07:00
702cf1cc36 teach store.Store about CompareAndDelete 2013-11-30 10:02:03 -07:00
881 changed files with 63501 additions and 100047 deletions

9
.gitignore vendored
View File

@ -1,7 +1,6 @@
src/
pkg/
/etcd
/etcdbench
/server/release_version.go
/gopath
/go-bindata
/machine*
/bin
.vagrant
*.etcd

View File

@ -1,13 +0,0 @@
language: go
go: 1.1
install:
- echo "Skip install"
script:
- ./test.sh
# temporarily fix Travis
env:
global:
- TRAVIS_BUILD_DIR=/home/travis/build/coreos/etcd

View File

@ -1,4 +1,45 @@
v0.2
v0.4.4
* Fix `--no-sync` flag in etcdctl (#83)
* Improved logging for machine removal (#844)
* Various documentation improvements (#858, #851, #847)
v0.4.3
* Avoid panic() on truncated or unexpected log data (#834, #833)
* Fix missing stats field (#807)
* Lengthen default peer removal delay to 30mins (#835)
* Reduce logging on heartbeat timeouts (#836)
v0.4.2
* Improvements to the clustering documents
* Set content-type properly on errors (#469)
* Standbys re-join if they should be part of the cluster (#810, #815, #818)
v0.4.1
* Re-introduce DELETE on the machines endpoint
* Document the machines endpoint
v0.4.0
* Introduced standby mode
* Added HEAD requests
* Set logs NOCOW flag when BTRFS is detected to avoid fsync overhead
* Fix all known data races, and pass Go race detector (TODO: re-run race detector)
* Fixed timeouts when using HTTPS
* Improved snapshot stability
* Migration of machine names to new IPs
* Updated peer discovery ordering
v0.3.0
* Add Compare-and-Delete support.
* Added prevNode to response objects.
* Added Discovery API.
* Add tracing and debug endpoints (Documentation/debugging.md).
* Improved logging of cluster events.
* go get github.com/coreos/etcd works.
* info file is no longer used.
* Snapshots are on by default.
* Statistics APIs documented.
v0.2.0
* Support directory creation and removal.
* Add Compare-and-Swap (CAS) support.
* Support recursive GETs.

View File

@ -1,17 +1,13 @@
# How to contribute
etcd is open source, Apache 2.0 licensed and accepts contributions via Github pull requests.
This document outlines some of the conventions on commit message formatting, contact points for developers and other resources to make getting your contribution into etcd easier.
etcd is Apache 2.0 licensed and accepts contributions via Github pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers and other resources to make getting your contribution into etcd easier.
# Email and chat
For simplicity etcd discussions happen on coreos-dev and in #coreos-dev.
As the community grows we will move to a dedicated mailing list and IRC channel.
- Email: [coreos-dev](https://groups.google.com/forum/#!forum/coreos-dev)
- Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev)
- IRC: #[coreos](irc://irc.freenode.org:6667/#coreos) IRC channel on freenode.org
## Getting Started
## Getting started
- Fork the repository on GitHub
- Read the README.md for build instructions
@ -22,16 +18,21 @@ This is a rough outline of what a contributor's workflow looks like:
- Create a topic branch from where you want to base your work. This is usually master.
- Make commits of logical units.
- Make sure your commit messages are in the proper format, see below
- Make sure your commit messages are in the proper format (see below).
- Push your changes to a topic branch in your fork of the repository.
- Submit a pull request to coreos/etcd
- Submit a pull request to coreos/etcd.
Thanks for you contributions!
Thanks for your contributions!
### Code style
The coding style suggested by the Golang community is used in etcd. See [style doc](https://code.google.com/p/go-wiki/wiki/Style) for details.
Please follow this style to make etcd easy to review, maintain and develop.
### Format of the commit message
etcd follow a rough convention for commit messages borrowed from Angularjs.
This is an example of a commit:
etcd follows a rough convention for commit messages borrowed from Angularjs. This is an example of a commit:
```
feat(scripts/test-cluster): add a cluster test command
@ -40,7 +41,7 @@ This is an example of a commit:
start for debugging.
```
To make it more formal it looks something like this:
The format can be more formally described as follows:
```
<type>(<scope>): <subject>
@ -50,14 +51,14 @@ To make it more formal it looks something like this:
<footer>
```
The first line is the subject and should not be longer than 70 characters, the second line is always blank and other lines should be wrapped at 80 characters.
This allows the message to be easier to read on github as well as in various git tools.
The first line is the subject and should be no longer than 70 characters, the second line is always blank, and other lines should be wrapped at 80 characters. This allows the message to be easier to read on github as well as
in various git tools.
### Subject line
The subject line contains succinct description of the change.
The subject line contains a succinct description of the change.
### Allowed <type>
### Allowed <type>s
- feat (feature)
- fix (bug fix)
- docs (documentation)
@ -66,9 +67,9 @@ The subject line contains succinct description of the change.
- test (when adding missing tests)
- chore (maintain)
### Allowed <scope>
### Allowed <scope>s
Scopes could be anything specifying place of the commit change. For example store, api, etc.
Scopes can be anything specifying the place of the commit change within the repository. For example, "store", "API", etc.
### More details on commits

36
DCO Normal file
View File

@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

View File

@ -1,11 +1,12 @@
FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y python-software-properties git
RUN add-apt-repository -y ppa:duh/golang
RUN apt-get update
RUN apt-get install -y golang
# Let's install go just like Docker (from source).
RUN apt-get update -q
RUN DEBIAN_FRONTEND=noninteractive apt-get install -qy build-essential curl git
RUN curl -s https://storage.googleapis.com/golang/go1.3.src.tar.gz | tar -v -C /usr/local -xz
RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
ENV PATH /usr/local/go/bin:$PATH
ADD . /opt/etcd
RUN cd /opt/etcd && ./build
EXPOSE 4001 7001
ENTRYPOINT ["/opt/etcd/etcd"]
ENTRYPOINT ["/opt/etcd/bin/etcd"]

1291
Documentation/api.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
# Client libraries support matrix for etcd
As etcd features support is really uneven between client libraries, a compatibility matrix can be important.
We will consider in detail only the features of clients supporting the v2 API. Clients still supporting the v1 API *only* are listed below.
## v1-only clients
Clients supporting only the API version 1
- [justinsb/jetcd](https://github.com/justinsb/jetcd) Java
- [transitorykris/etcd-py](https://github.com/transitorykris/etcd-py) Python
- [russellhaering/txetcd](https://github.com/russellhaering/txetcd) Python
- [iconara/etcd-rb](https://github.com/iconara/etcd-rb) Ruby
- [jpfuentes2/etcd-ruby](https://github.com/jpfuentes2/etcd-ruby) Ruby
- [aterreno/etcd-clojure](https://github.com/aterreno/etcd-clojure) Clojure
- [marshall-lee/etcd.erl](https://github.com/marshall-lee/etcd.erl) Erlang
## v2 clients
The v2 API has a lot of features, we will categorize them in a few categories:
- **HTTPS Auth**: Support for SSL-certificate based authentication
- **Reconnect**: If the client is able to reconnect automatically to another server if one fails.
- **Mod/Lock**: Support for the locking module
- **Mod/Leader**: Support for the leader election module
- **GET,PUT,POST,DEL Features**: Support for all the modifiers when calling the etcd server with said HTTP method.
### Supported features matrix
| Client| [go-etcd](https://github.com/coreos/go-etcd) | [jetcd](https://github.com/diwakergupta/jetcd) | [python-etcd](https://github.com/jplana/python-etcd) | [python-etcd-client](https://github.com/dsoprea/PythonEtcdClient) | [node-etcd](https://github.com/stianeikeland/node-etcd) | [nodejs-etcd](https://github.com/lavagetto/nodejs-etcd) | [etcd-ruby](https://github.com/ranjib/etcd-ruby) | [etcd-api](https://github.com/jdarcy/etcd-api) | [cetcd](https://github.com/dwwoelfel/cetcd) | [clj-etcd](https://github.com/rthomas/clj-etcd) | [etcetera](https://github.com/drusellers/etcetera)| [Etcd.jl](https://github.com/forio/Etcd.jl) | [p5-etcd](https://metacpan.org/release/Etcd)
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| **HTTPS Auth** | Y | Y | Y | Y | Y | Y | - | - | - | - | - | - | - |
| **Reconnect** | Y | - | Y | Y | - | - | - | Y | - | - | - | - | - |
| **Mod/Lock** | - | - | Y | Y | - | - | - | - | - | - | - | Y | - |
| **Mod/Leader** | - | - | - | Y | - | - | - | - | - | - | - | Y | - |
| **GET Features** | F | B | F | F | F | F | F | B | F | G | F | F | F |
| **PUT Features** | F | B | F | F | F | F | F | G | F | G | F | F | F |
| **POST Features** | F | - | F | F | - | F | F | - | - | - | F | F | F |
| **DEL Features** | F | B | F | F | F | F | F | B | G | B | F | F | F |
**Legend**
**F**: Full support **G**: Good support **B**: Basic support
**Y**: Feature supported **-**: Feature not supported

View File

@ -0,0 +1,60 @@
# Cluster Discovery
## Overview
Starting an etcd cluster requires that each node knows another in the cluster. If you are trying to bring up a cluster all at once, say using a cloud formation, you also need to coordinate who will be the initial cluster leader. The discovery protocol helps you by providing an automated way to discover other existing peers in a cluster.
For more information on how etcd can locate the cluster, see the [finding the cluster][cluster-finding] documentation.
Please note - at least 3 nodes are required for [cluster availability][optimal-cluster-size].
[cluster-finding]: https://github.com/coreos/etcd/blob/master/Documentation/design/cluster-finding.md
[optimal-cluster-size]: https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md
## Using discovery.etcd.io
### Create a Token
To use the discovery API, you must first create a token for your etcd cluster. Visit [https://discovery.etcd.io/new](https://discovery.etcd.io/new) to create a new token.
You can inspect the list of peers by viewing `https://discovery.etcd.io/<token>`.
### Start etcd With the Discovery Flag
Specify the `-discovery` flag when you start each etcd instance. The list of existing peers in the cluster will be downloaded and configured. If the instance is the first peer, it will start as the leader of the cluster.
Here's a full example:
```
TOKEN=$(curl https://discovery.etcd.io/new)
./etcd -name instance1 -peer-addr 10.1.2.3:7001 -addr 10.1.2.3:4001 -discovery $TOKEN
./etcd -name instance2 -peer-addr 10.1.2.4:7001 -addr 10.1.2.4:4001 -discovery $TOKEN
./etcd -name instance3 -peer-addr 10.1.2.5:7001 -addr 10.1.2.5:4001 -discovery $TOKEN
```
## Running Your Own Discovery Endpoint
The discovery API communicates with a separate etcd cluster to store and retrieve the list of peers. CoreOS provides [https://discovery.etcd.io](https://discovery.etcd.io) as a free service, but you can easily run your own etcd cluster for this purpose. Here's an example using an etcd cluster located at `10.10.10.10:4001`:
```
TOKEN="testcluster"
./etcd -name instance1 -peer-addr 10.1.2.3:7001 -addr 10.1.2.3:4001 -discovery http://10.10.10.10:4001/v2/keys/$TOKEN
./etcd -name instance2 -peer-addr 10.1.2.4:7001 -addr 10.1.2.4:4001 -discovery http://10.10.10.10:4001/v2/keys/$TOKEN
./etcd -name instance3 -peer-addr 10.1.2.5:7001 -addr 10.1.2.5:4001 -discovery http://10.10.10.10:4001/v2/keys/$TOKEN
```
If you're interested in how to discovery API works behind the scenes, read about the [Discovery Protocol](https://github.com/coreos/etcd/blob/master/Documentation/discovery-protocol.md).
## Setting Peer Addresses Correctly
The Discovery API submits the `-peer-addr` of each etcd instance to the configured Discovery endpoint. It's important to select an address that *all* peers in the cluster can communicate with. For example, if you're located in two regions of a cloud provider, configuring a private `10.x` address will not work between the two regions, and communication will not be possible between all peers.
## Stale Peers
The discovery API will automatically clean up the address of a stale peer that is no longer part of the cluster. The TTL for this process is a week, which should be long enough to handle any extremely long outage you may encounter. There is no harm in having stale peers in the list until they are cleaned up, since an etcd instance only needs to connect to one valid peer in the cluster to join.
## Lifetime of a Discovery URL
A discovery URL identifies a single etcd cluster. Do not re-use discovery URLs for new clusters.
When a machine starts with a new discovery URL the discovery URL will be activated and record the machine's metadata. If you destroy the whole cluster and attempt to bring the cluster back up with the same discovery URL it will fail. This is intentional because all of the registered machines are gone including their logs so there is nothing to recover the killed cluster.

169
Documentation/clustering.md Normal file
View File

@ -0,0 +1,169 @@
## Clustering
### Example cluster of three machines
Let's explore the use of etcd clustering.
We use Raft as the underlying distributed protocol which provides consistency and persistence of the data across all of the etcd instances.
Let start by creating 3 new etcd instances.
We use `-peer-addr` to specify server port and `-addr` to specify client port and `-data-dir` to specify the directory to store the log and info of the machine in the cluster:
```sh
./etcd -peer-addr 127.0.0.1:7001 -addr 127.0.0.1:4001 -data-dir machines/machine1 -name machine1
```
**Note:** If you want to run etcd on an external IP address and still have access locally, you'll need to add `-bind-addr 0.0.0.0` so that it will listen on both external and localhost addresses.
A similar argument `-peer-bind-addr` is used to setup the listening address for the server port.
Let's join two more machines to this cluster using the `-peers` argument. A single connection to any peer will allow a new machine to join, but multiple can be specified for greater resiliency.
```sh
./etcd -peer-addr 127.0.0.1:7002 -addr 127.0.0.1:4002 -peers 127.0.0.1:7001,127.0.0.1:7003 -data-dir machines/machine2 -name machine2
./etcd -peer-addr 127.0.0.1:7003 -addr 127.0.0.1:4003 -peers 127.0.0.1:7001,127.0.0.1:7002 -data-dir machines/machine3 -name machine3
```
We can retrieve a list of machines in the cluster using the HTTP API:
```sh
curl -L http://127.0.0.1:4001/v2/machines
```
We should see there are three machines in the cluster
```
http://127.0.0.1:4001, http://127.0.0.1:4002, http://127.0.0.1:4003
```
The machine list is also available via the main key API:
```sh
curl -L http://127.0.0.1:4001/v2/keys/_etcd/machines
```
```json
{
"action": "get",
"node": {
"createdIndex": 1,
"dir": true,
"key": "/_etcd/machines",
"modifiedIndex": 1,
"nodes": [
{
"createdIndex": 1,
"key": "/_etcd/machines/machine1",
"modifiedIndex": 1,
"value": "raft=http://127.0.0.1:7001&etcd=http://127.0.0.1:4001"
},
{
"createdIndex": 2,
"key": "/_etcd/machines/machine2",
"modifiedIndex": 2,
"value": "raft=http://127.0.0.1:7002&etcd=http://127.0.0.1:4002"
},
{
"createdIndex": 3,
"key": "/_etcd/machines/machine3",
"modifiedIndex": 3,
"value": "raft=http://127.0.0.1:7003&etcd=http://127.0.0.1:4003"
}
]
}
}
```
We can also get the current leader in the cluster:
```
curl -L http://127.0.0.1:4001/v2/leader
```
The first server we set up should still be the leader unless it has died during these commands.
```
http://127.0.0.1:7001
```
Now we can do normal SET and GET operations on keys as we explored earlier.
```sh
curl -L http://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar
```
```json
{
"action": "set",
"node": {
"createdIndex": 4,
"key": "/foo",
"modifiedIndex": 4,
"value": "bar"
}
}
```
### Rejoining to the Cluster
If one machine disconnects from the cluster, it could rejoin the cluster automatically when the communication is recovered.
If one machine is killed, it could rejoin the cluster when started with old name. If the peer address is changed, etcd will treat the new peer address as the refreshed one, which benefits instance migration, or virtual machine boot with different IP. The peer-address-changing functionality is only supported when the majority of the cluster is alive, because this behavior needs the consensus of the etcd cluster.
**Note:** For now, it is user responsibility to ensure that the machine doesn't join the cluster that has the member with the same name. Or unexpected error will happen. It would be improved sooner or later.
### Killing Nodes in the Cluster
Now if we kill the leader of the cluster, we can get the value from one of the other two machines:
```sh
curl -L http://127.0.0.1:4002/v2/keys/foo
```
We can also see that a new leader has been elected:
```
curl -L http://127.0.0.1:4002/v2/leader
```
```
http://127.0.0.1:7002
```
or
```
http://127.0.0.1:7003
```
### Testing Persistence
Next we'll kill all the machines to test persistence.
Type `CTRL-C` on each terminal and then rerun the same command you used to start each machine.
Your request for the `foo` key will return the correct value:
```sh
curl -L http://127.0.0.1:4002/v2/keys/foo
```
```json
{
"action": "get",
"node": {
"createdIndex": 4,
"key": "/foo",
"modifiedIndex": 4,
"value": "bar"
}
}
```
### Using HTTPS between servers
In the previous example we showed how to use SSL client certs for client-to-server communication.
Etcd can also do internal server-to-server communication using SSL client certs.
To do this just change the `-*-file` flags to `-peer-*-file`.
If you are using SSL for server-to-server communication, you must use it on all instances of etcd.

View File

@ -1,6 +1,8 @@
# Etcd Configuration
Configuration options can be set in three places:
## Node Configuration
Individual node configuration options can be set in three places:
1. Command line flags
2. Environment variables
@ -10,6 +12,16 @@ Options set on the command line take precedence over all other sources.
Options set in environment variables take precedence over options set in
configuration files.
## Cluster Configuration
Cluster-wide settings are configured via the `/config` admin endpoint and additionally in the configuration file. Values contained in the configuration file will seed the cluster setting with the provided value. After the cluster is running, only the admin endpoint is used.
The full documentation is contained in the [API docs](https://github.com/coreos/etcd/blob/master/Documentation/api.md#cluster-config).
* `activeSize` - the maximum number of peers that can participate in the consensus protocol. Other peers will join as standbys.
* `removeDelay` - the minimum time in seconds that a machine has been observed to be unresponsive before it is removed from the cluster.
* `syncInterval` - the amount of time in seconds between cluster sync when it runs in standby mode.
## Command Line Flags
### Required
@ -19,29 +31,34 @@ configuration files.
### Optional
* `-addr` - The advertised public hostname:port for client communication. Defaults to `127.0.0.1:4001`.
* `-bind-addr` - The listening hostname for client communication. Defaults to advertised ip.
* `-discovery` - A URL to use for discovering the peer list. (i.e `"https://discovery.etcd.io/your-unique-key"`).
* `-bind-addr` - The listening hostname for client communication. Defaults to advertised IP.
* `-peers` - A comma separated list of peers in the cluster (i.e `"203.0.113.101:7001,203.0.113.102:7001"`).
* `-peers-file` - The file path containing a comma separated list of peers in the cluster.
* `-ca-file` - The path of the client CAFile. Enables client cert authentication when present.
* `-cert-file` - The cert file of the client.
* `-key-file` - The key file of the client.
* `-config` - The path of the etcd config file. Defaults to `/etc/etcd/etcd.conf`.
* `-cors-origins` - A comma separated white list of origins for cross-origin resource sharing.
* `-cpuprofile` - The path to a file to output cpu profile data. Enables cpu profiling when present.
* `-config` - The path of the etcd configuration file. Defaults to `/etc/etcd/etcd.conf`.
* `-cors` - A comma separated white list of origins for cross-origin resource sharing.
* `-cpuprofile` - The path to a file to output CPU profile data. Enables CPU profiling when present.
* `-data-dir` - The directory to store log and snapshot. Defaults to the current working directory.
* `-max-result-buffer` - The max size of result buffer. Defaults to `1024`.
* `-max-cluster-size` - The max size of the cluster. Defaults to `9`.
* `-max-retry-attempts` - The max retry attempts when trying to join a cluster. Defaults to `3`.
* `-peer-addr` - The advertised public hostname:port for server communication. Defaults to `127.0.0.1:7001`.
* `-peer-bind-addr` - The listening hostname for server communication. Defaults to advertised ip.
* `-peer-bind-addr` - The listening hostname for server communication. Defaults to advertised IP.
* `-peer-ca-file` - The path of the CAFile. Enables client/peer cert authentication when present.
* `-peer-cert-file` - The cert file of the server.
* `-peer-key-file` - The key file of the server.
* `-snapshot` - Open or close snapshot. Defaults to `false`.
* `-peer-election-timeout` - The number of milliseconds to wait before the leader is declared unhealthy.
* `-peer-heartbeat-interval` - The number of milliseconds in between heartbeat requests
* `-snapshot=false` - Disable log snapshots. Defaults to `true`.
* `-cluster-active-size` - The expected number of instances participating in the consensus protocol. Only applied if the etcd instance is the first peer in the cluster.
* `-cluster-remove-delay` - The delay before one node is removed from the cluster since it cannot be connected at all. Only applied if the etcd instance is the first peer in the cluster.
* `-cluster-sync-interval` - The interval between synchronization for standby-mode instance with the cluster. Only applied if the etcd instance is the first peer in the cluster.
* `-v` - Enable verbose logging. Defaults to `false`.
* `-vv` - Enable very verbose logging. Defaults to `false`.
* `-version` - Print the version and exit.
* `-web-url` - The hostname:port of web interface.
## Configuration File
@ -53,9 +70,10 @@ addr = "127.0.0.1:4001"
bind_addr = "127.0.0.1:4001"
ca_file = ""
cert_file = ""
cors_origins = []
cors = []
cpu_profile_file = ""
data_dir = "."
discovery = "http://etcd.local:4001/v2/keys/_etcd/registry/examplecluster"
key_file = ""
peers = []
peers_file = ""
@ -66,7 +84,6 @@ name = "default-name"
snapshot = false
verbose = false
very_verbose = false
web_url = ""
[peer]
addr = "127.0.0.1:7001"
@ -74,6 +91,11 @@ bind_addr = "127.0.0.1:7001"
ca_file = ""
cert_file = ""
key_file = ""
[cluster]
active_size = 9
remove_delay = 1800.0
sync_interval = 5.0
```
## Environment Variables
@ -86,6 +108,7 @@ key_file = ""
* `ETCD_CONFIG`
* `ETCD_CPU_PROFILE_FILE`
* `ETCD_DATA_DIR`
* `ETCD_DISCOVERY`
* `ETCD_KEY_FILE`
* `ETCD_PEERS`
* `ETCD_PEERS_FILE`
@ -96,9 +119,12 @@ key_file = ""
* `ETCD_SNAPSHOT`
* `ETCD_VERBOSE`
* `ETCD_VERY_VERBOSE`
* `ETCD_WEB_URL`
* `ETCD_PEER_ADDR`
* `ETCD_PEER_BIND_ADDR`
* `ETCD_PEER_CA_FILE`
* `ETCD_PEER_CERT_FILE`
* `ETCD_PEER_KEY_FILE`
* `ETCD_PEER_ELECTION_TIMEOUT`
* `ETCD_CLUSTER_ACTIVE_SIZE`
* `ETCD_CLUSTER_REMOVE_DELAY`
* `ETCD_CLUSTER_SYNC_INTERVAL`

View File

@ -0,0 +1,69 @@
# Debugging etcd
Diagnosing issues in a distributed application is hard.
etcd will help as much as it can - just enable these debug features using the CLI flag `-trace=*` or the config option `trace=*`.
## Logging
Log verbosity can be increased to the max using either the `-vvv` CLI flag or the `very_very_verbose=true` config option.
The only supported logging mode is to stdout.
## Metrics
etcd itself can generate a set of metrics.
These metrics represent many different internal data points that can be helpful when debugging etcd servers.
#### Metrics reference
Each individual metric name is prefixed with `etcd.<NAME>`, where \<NAME\> is the configured name of the etcd server.
* `timer.appendentries.handle`: amount of time a peer takes to process an AppendEntriesRequest from the POV of the peer itself
* `timer.peer.<PEER>.heartbeat`: amount of time a peer heartbeat operation takes from the POV of the leader that initiated that operation for peer \<PEER\>
* `timer.command.<COMMAND>`: amount of time a given command took to be processed through the local server's raft state machine. This does not include time waiting on locks.
#### Fetching metrics over HTTP
Once tracing has been enabled on a given etcd server, all metric data is available at the server's `/debug/metrics` HTTP endpoint (i.e. `http://127.0.0.1:4001/debug/metrics`).
Executing a GET HTTP command against the metrics endpoint will yield the current state of all metrics in the etcd server.
#### Sending metrics to Graphite
etcd supports [Graphite's Carbon plaintext protocol](https://graphite.readthedocs.org/en/latest/feeding-carbon.html#the-plaintext-protocol) - a TCP wire protocol designed for shipping metric data to an aggregator.
To send metrics to a Graphite endpoint using this protocol, use of the `-graphite-host` CLI flag or the `graphite_host` config option (i.e. `graphite_host=172.17.0.19:2003`).
See an [example graphite deploy script](https://github.com/coreos/etcd/contrib/graphite).
#### Generating additional metrics with Collectd
[Collectd](http://collectd.org/documentation.shtml) gathers metrics from the host running etcd.
While these aren't metrics generated by etcd itself, it can be invaluable to compare etcd's view of the world to that of a separate process running next to etcd.
See an [example collectd deploy script](https://github.com/coreos/etcd/contrib/collectd).
## Profiling
etcd exposes profiling information from the Go pprof package over HTTP.
The basic browsable interface is served by etcd at the `/debug/pprof` HTTP endpoint (i.e. `http://127.0.0.1:4001/debug/pprof`).
For more information on using profiling tools, see http://blog.golang.org/profiling-go-programs.
**NOTE**: In the following examples you need to ensure that the `./bin/etcd` is identical to the `./bin/etcd` that you are targeting (same git hash, arch, platform, etc).
#### Heap memory profile
```
go tool pprof ./bin/etcd http://127.0.0.1:4001/debug/pprof/heap
```
#### CPU profile
```
go tool pprof ./bin/etcd http://127.0.0.1:4001/debug/pprof/profile
```
#### Blocked goroutine profile
```
go tool pprof ./bin/etcd http://127.0.0.1:4001/debug/pprof/block
```

View File

@ -0,0 +1,34 @@
## Cluster Finding Process
Peer discovery uses the following sources in this order: log data in `-data-dir`, `-discovery` and `-peers`.
If log data is provided, etcd will concatenate possible peers from three sources: the log data, the `-discovery` option, and `-peers`. Then it tries to join cluster through them one by one. If all connection attempts fail (which indicates that the majority of the cluster is currently down), it will restart itself based on the log data, which helps the cluster to recover from a full outage.
Without log data, the instance is assumed to be a brand new one. If possible targets are provided by `-discovery` and `-peers`, etcd will make a best effort attempt to join them, and if none is reachable it will exit. Otherwise, if no `-discovery` or `-peers` option is provided, a new cluster will always be started.
This ensures that users can always restart the node safely with the same command (without --force), and etcd will either reconnect to the old cluster if it is still running or recover its cluster from a outage.
## Logical Workflow
Start an etcd machine:
```
If log data is given:
Try to join via peers in previous cluster
Try to join via peers found in discover URL
Try to join via peers in peer list
Restart the previous cluster which is down
return
If discover URL is given:
Fetch peers through discover URL
If Success:
Join via peers found
return
If peer list is given:
Join as follower via peers in peer list
return
Start as the leader of a new cluster
```

View File

@ -0,0 +1,232 @@
## Standbys
Adding peers in an etcd cluster adds network, CPU, and disk overhead to the leader since each one requires replication.
Peers primarily provide resiliency in the event of a leader failure but the benefit of more failover nodes decreases as the cluster size increases.
A lightweight alternative is the standby.
Standbys are a way for an etcd node to forward requests along to the cluster but the standbys are not part of the Raft cluster themselves.
This provides an easier API for local applications while reducing the overhead required by a regular peer node.
Standbys also act as standby nodes in the event that a peer node in the cluster has not recovered after a long duration.
## Configuration Parameters
There are three configuration parameters used by standbys: active size, remove delay and standby sync interval.
The active size specifies a target size for the number of peers in the cluster.
If there are not enough peers to meet the active size, standbys will send join requests until the peer count is equal to the active size.
If there are more peers than the target active size then peers are removed by the leader and will become standbys.
The remove delay specifies how long the cluster should wait before removing a dead peer.
By default this is 30 minutes.
If a peer is inactive for 30 minutes then the peer is removed.
The standby sync interval specifies the synchronization interval of standbys with the cluster.
By default this is 5 seconds.
After each interval, standbys synchronize information with cluster.
## Logical Workflow
### Start a etcd machine
#### Main logic
```
If find existing standby cluster info:
Goto standby loop
Find cluster as required
If determine to start peer server:
Goto peer loop
Else:
Goto standby loop
Peer loop:
Start peer mode
If running:
Wait for stop
Goto standby loop
Standby loop:
Start standby mode
If running:
Wait for stop
Goto peer loop
```
#### [Cluster finding logic][cluster-finding.md]
#### Join request logic:
```
Fetch machine info
If cannot match version:
return false
If active size <= peer count:
return false
If it has existed in the cluster:
return true
If join request fails:
return false
return true
```
**Note**
1. [TODO] The running mode cannot be determined by log, because the log may be outdated. But the log could be used to estimate its state.
2. Even if sync cluster fails, it will restart still for recovery from full outage.
#### Peer mode start logic
```
Start raft server
Start other helper routines
```
#### Peer mode auto stop logic
```
When removed from the cluster:
Stop raft server
Stop other helper routines
```
#### Standby mode run logic
```
Loop:
Sleep for some time
Sync cluster, and write cluster info into disk
Check active size and send join request if needed
If succeed:
Clear cluster info from disk
Return
```
#### Serve Requests as Standby
Return '404 Page Not Found' always on peer address. This is because peer address is used for raft communication and cluster management, which should not be used in standby mode.
Serve requests from client:
```
Redirect all requests to client URL of leader
```
**Note**
1. The leader here implies the one in raft cluster when doing the latest successful synchronization.
2. [IDEA] We could extend HTTP Redirect to multiple possible targets.
### Join Request Handling
```
If machine has existed in the cluster:
Return
If peer count < active size:
Add peer
Increase peer count
```
### Remove Request Handling
```
If machine exists in the cluster:
Remove peer
Decrease peer count
```
## Cluster Monitor Logic
### Active Size Monitor:
This is only run by current cluster leader.
```
Loop:
Sleep for some time
If peer count > active size:
Remove randomly selected peer
```
### Peer Activity Monitor
This is only run by current cluster leader.
```
Loop:
Sleep for some time
For each peer:
If peer last activity time > remove delay:
Remove the peer
Goto Loop
```
## Cluster Cases
### Create Cluster with Thousands of Instances
First few machines run in peer mode.
All the others check the status of the cluster and run in standby mode.
### Recover from full outage
Machines with log data restart with join failure.
Machines in peer mode recover heartbeat between each other.
Machines in standby mode always sync the cluster. If sync fails, it uses the first address from data log as redirect target.
### Kill one peer machine
Leader of the cluster lose the connection with the peer.
When the time exceeds remove delay, it removes the peer from the cluster.
Machine in standby mode finds one available place of the cluster. It sends join request and joins the cluster.
**Note**
1. [TODO] Machine which was divided from majority and was removed from the cluster will distribute running of the cluster if the new node uses the same name.
### Kill one standby machine
No change for the cluster.
## Cons
1. New instance cannot join immediately after one peer is kicked out of the cluster, because the leader doesn't know the info about the standby instances.
2. It may introduce join collision
3. Cluster needs a good interval setting to balance the join delay and join collision.
## Future Attack Plans
1. Based on heartbeat miss and remove delay, standby could adjust its next check time.
2. Preregister the promotion target when heartbeat miss happens.
3. Get the estimated cluster size from the check happened in the sync interval, and adjust sync interval dynamically.
4. Accept join requests based on active size and alive peers.

View File

@ -0,0 +1,12 @@
# Development tools
## Vagrant
For fast start you can use Vagrant. `vagrant up` will make etcd build and running on virtual machine. Required Vagrant version is 1.5.0.
Next lets set a single key and then retrieve it:
```
curl -L http://127.0.0.1:4001/v2/keys/mykey -XPUT -d value="this is awesome"
curl -L http://127.0.0.1:4001/v2/keys/mykey
```

View File

@ -0,0 +1,87 @@
# Discovery Protocol
Starting a new etcd cluster can be painful since each machine needs to know of at least one live machine in the cluster. If you are trying to bring up a new cluster all at once, say using an AWS cloud formation, you also need to coordinate who will be the initial cluster leader. The discovery protocol uses an existing running etcd cluster to start a second etcd cluster.
To use this feature you add the command line flag `-discovery` to your etcd args. In this example we will use `http://example.com/v2/keys/_etcd/registry` as the URL prefix.
## The Protocol
By convention the etcd discovery protocol uses the key prefix `_etcd/registry`. A full URL to the keyspace will be `http://example.com/v2/keys/_etcd/registry`.
### Creating a New Cluster
Generate a unique token that will identify the new cluster. This will be used as a key prefix in the following steps. An easy way to do this is to use uuidgen:
```
UUID=$(uuidgen)
```
### Bringing up Machines
Now that you have your cluster ID you can start bringing up machines. Every machine will follow this protocol internally in etcd if given a `-discovery`.
### Registering your Machine
The first thing etcd must do is register your machine. This is done by using the machine name (from the `-name` arg) and posting it with a long TTL to the given key.
```
curl -X PUT "http://example.com/v2/keys/_etcd/registry/${UUID}/${etcd_machine_name}?ttl=604800" -d value=${peer_addr}
```
### Discovering Peers
Now that this etcd machine is registered it must discover its peers.
But, the tricky bit of starting a new cluster is that one machine needs to assume the initial role of leader and will have no peers. To figure out if another machine has already started the cluster etcd needs to create the `_state` key and set its value to "started":
```
curl -X PUT "http://example.com/v2/keys/_etcd/registry/${UUID}/_state?prevExist=false" -d value=started
```
If this returns a `200 OK` response then this machine is the initial leader and should start with no peers configured. If, however, this returns a `412 Precondition Failed` then you need to find all of the registered peers:
```
curl -X GET "http://example.com/v2/keys/_etcd/registry/${UUID}?recursive=true"
```
```
{
"action": "get",
"node": {
"createdIndex": 11,
"dir": true,
"key": "/_etcd/registry/9D4258A5-A1D3-4074-8837-31C1E091131D",
"modifiedIndex": 11,
"nodes": [
{
"createdIndex": 16,
"expiration": "2014-02-03T13:19:57.631253589-08:00",
"key": "/_etcd/registry/9D4258A5-A1D3-4074-8837-31C1E091131D/peer1",
"modifiedIndex": 16,
"ttl": 604765,
"value": "127.0.0.1:7001"
},
{
"createdIndex": 17,
"expiration": "2014-02-03T13:19:57.631253589-08:00",
"key": "/_etcd/registry/9D4258A5-A1D3-4074-8837-31C1E091131D/peer2",
"modifiedIndex": 17,
"ttl": 604765,
"value": "127.0.0.1:7002"
}
]
}
}
```
Using this information you can connect to the rest of the peers in the cluster.
### Heartbeating
At this point etcd will start heart beating to your registration URL. The
protocol uses a heartbeat so permanently deleted nodes get slowly removed from
the discovery information cluster.
The heartbeat interval is about once per day and the TTL is one week. This
should give a sufficiently wide window to protect against a discovery service
taking a temporary outage yet provide adequate cleanup.

View File

@ -21,6 +21,7 @@ Error code corresponding strerror
EcodeNotDir = 104
EcodeNodeExist = 105
EcodeKeyIsPreserved = 106
EcodeRootROnly = 107
EcodeValueRequired = 200
EcodePrevValueRequired = 201
@ -42,6 +43,7 @@ Error code corresponding strerror
errors[104] = "Not A Directory"
errors[105] = "Already exists" // create
errors[106] = "The prefix of given key is a keyword in etcd"
errors[107] = "Root is read only"
// Post form related errors
errors[200] = "Value is Required in POST form"

View File

@ -5,13 +5,13 @@
![alt text](./img/etcd_fs_structure.jpg "etcd file system structure")
## Node
In **Etcd**, the **Node** is the rudimentary element constructing the whole.
Currently **Etcd** file system is comprised in a Unix-like way of files and directories, and they are two kinds of nodes different in:
In **etcd**, the **node** is the base from which the filesystem is constructed.
**etcd**'s file system is Unix-like with two kinds of nodes: file and directories.
- **File Node** has data associated with it.
- **Directory Node** has children nodes associated with it.
- A **file node** has data associated with it.
- A **directory node** has child nodes associated with it.
Besides the file and directory difference, all nodes have common attributes and operations as follows:
All nodes, regardless of type, have the following attributes and operations:
### Attributes:
- **Expiration Time** [optional]
@ -20,7 +20,7 @@ Besides the file and directory difference, all nodes have common attributes and
- **ACL**
The path of access control list of the node.
The path to the node's access control list.
### Operation:
- **Get** (path, recursive, sorted)
@ -55,7 +55,7 @@ Besides the file and directory difference, all nodes have common attributes and
- **TestAndSet** (path, prevValue [prevIndex], value, ttl)
Atomic *test and set* value to a file. If test succeeds, this operation will change the previous value of the file to the given value.
- If the prevValue is given, it will test against previous value of
- If the prevValue is given, it will test against previous value of
the node.
- If the prevValue is empty, it will test if the node is not existing.
- If the prevValue is not empty, it will test if the prevValue is equal to the current value of the file.
@ -69,7 +69,7 @@ Besides the file and directory difference, all nodes have common attributes and
### Theory
Etcd exports a Unix-like file system interface consisting of files and directories, collectively called nodes.
Each node has various meta-data, including three names of access control lists used to control reading, writing and changing (change ACL names for the node).
Each node has various meta-data, including three names of the access control lists used to control reading, writing and changing (change ACL names for the node).
We are storing the ACL names for nodes under a special *ACL* directory.
Each node has ACL name corresponding to one file within *ACL* dir.
@ -77,7 +77,7 @@ Unless overridden, a node naturally inherits the ACL names of its parent directo
For each ACL name, it has three children: *R (Reading)*, *W (Writing)*, *C (Changing)*
Each permission is also a node. Under the node it contains the users who have this permission for the file refering to this ACL name.
Each permission is also a node. Under the node it contains the users who have this permission for the file referring to this ACL name.
### Example
[TODO]

View File

@ -26,7 +26,7 @@ Advantages
Disadvantages
- Follower knows better what versions of the interal protocol it can talk than the leader
- Follower knows better what versions of the internal protocol it can talk than the leader
### Follower Controlled

View File

@ -0,0 +1,95 @@
## Libraries and Tools
**Tools**
- [etcdctl](https://github.com/coreos/etcdctl) - A command line client for etcd
- [etcd-dump](https://npmjs.org/package/etcd-dump) - Command line utility for dumping/restoring etcd.
- [etcd-fs](https://github.com/xetorthio/etcd-fs) - FUSE filesystem for etcd
**Go libraries**
- [go-etcd](https://github.com/coreos/go-etcd) - Supports v2
**Java libraries**
- [justinsb/jetcd](https://github.com/justinsb/jetcd)
- [diwakergupta/jetcd](https://github.com/diwakergupta/jetcd) - Supports v2
**Python libraries**
- [transitorykris/etcd-py](https://github.com/transitorykris/etcd-py)
- [jplana/python-etcd](https://github.com/jplana/python-etcd) - Supports v2
- [russellhaering/txetcd](https://github.com/russellhaering/txetcd) - a Twisted Python library
- [cholcombe973/autodock](https://github.com/cholcombe973/autodock) - A docker deployment automation tool
**Node libraries**
- [stianeikeland/node-etcd](https://github.com/stianeikeland/node-etcd) - Supports v2 (w Coffeescript)
- [lavagetto/nodejs-etcd](https://github.com/lavagetto/nodejs-etcd) - Supports v2
**Ruby libraries**
- [iconara/etcd-rb](https://github.com/iconara/etcd-rb)
- [jpfuentes2/etcd-ruby](https://github.com/jpfuentes2/etcd-ruby)
- [ranjib/etcd-ruby](https://github.com/ranjib/etcd-ruby) - Supports v2
**C libraries**
- [jdarcy/etcd-api](https://github.com/jdarcy/etcd-api) - Supports v2
**Clojure libraries**
- [aterreno/etcd-clojure](https://github.com/aterreno/etcd-clojure)
- [dwwoelfel/cetcd](https://github.com/dwwoelfel/cetcd) - Supports v2
- [rthomas/clj-etcd](https://github.com/rthomas/clj-etcd) - Supports v2
**Erlang libraries**
- [marshall-lee/etcd.erl](https://github.com/marshall-lee/etcd.erl)
**.Net Libraries**
- [drusellers/etcetera](https://github.com/drusellers/etcetera)
**PHP Libraries**
- [linkorb/etcd-php](https://github.com/linkorb/etcd-php)
**Haskell libraries**
- [wereHamster/etcd-hs](https://github.com/wereHamster/etcd-hs)
A detailed recap of client functionalities can be found in the [clients compatibility matrix][clients-matrix.md].
[clients-matrix.md]: https://github.com/coreos/etcd/blob/master/Documentation/clients-matrix.md
**Chef Integration**
- [coderanger/etcd-chef](https://github.com/coderanger/etcd-chef)
**Chef Cookbook**
- [spheromak/etcd-cookbook](https://github.com/spheromak/etcd-cookbook)
**BOSH Releases**
- [cloudfoundry-community/etcd-boshrelease](https://github.com/cloudfoundry-community/etcd-boshrelease)
- [cloudfoundry/cf-release](https://github.com/cloudfoundry/cf-release/tree/master/jobs/etcd)
**Projects using etcd**
- [binocarlos/yoda](https://github.com/binocarlos/yoda) - etcd + ZeroMQ
- [calavera/active-proxy](https://github.com/calavera/active-proxy) - HTTP Proxy configured with etcd
- [derekchiang/etcdplus](https://github.com/derekchiang/etcdplus) - A set of distributed synchronization primitives built upon etcd
- [go-discover](https://github.com/flynn/go-discover) - service discovery in Go
- [gleicon/goreman](https://github.com/gleicon/goreman/tree/etcd) - Branch of the Go Foreman clone with etcd support
- [garethr/hiera-etcd](https://github.com/garethr/hiera-etcd) - Puppet hiera backend using etcd
- [mattn/etcd-vim](https://github.com/mattn/etcd-vim) - SET and GET keys from inside vim
- [mattn/etcdenv](https://github.com/mattn/etcdenv) - "env" shebang with etcd integration
- [kelseyhightower/confd](https://github.com/kelseyhightower/confd) - Manage local app config files using templates and data from etcd
- [configdb](https://git.autistici.org/ai/configdb/tree/master) - A REST relational abstraction on top of arbitrary database backends, aimed at storing configs and inventories.
- [scrz](https://github.com/scrz/scrz) - Container manager, stores configuration in etcd.
- [fleet](https://github.com/coreos/fleet) - Distributed init system
- [GoogleCloudPlatform/kubernetes](https://github.com/GoogleCloudPlatform/kubernetes) - Container cluster manager.
- [mailgun/vulcand](https://github.com/mailgun/vulcand) - HTTP proxy that uses etcd as a configuration backend.
- [duedil-ltd/discodns](https://github.com/duedil-ltd/discodns) - Simple DNS nameserver using etcd as a database for names and records.

118
Documentation/modules.md Normal file
View File

@ -0,0 +1,118 @@
## Modules
etcd has a number of modules that are built on top of the core etcd API.
These modules provide things like dashboards, locks and leader election (removed).
**Warning**: Modules are deprecated from v0.4 until we have a solid base we can apply them back onto.
For now, we are choosing to focus on raft algorithm and core etcd to make sure that it works correctly and fast.
And it is time consuming to maintain these modules in this period, given that etcd's API changes from time to time.
Moreover, the lock module has some unfixed bugs, which may mislead users.
But we also notice that these modules are popular and useful, and plan to add them back with full functionality as soon as possible.
### Dashboard
An HTML dashboard can be found at `http://127.0.0.1:4001/mod/dashboard/`.
This dashboard is compiled into the etcd binary and uses the same API as regular etcd clients.
Use the `-cors='*'` flag to allow your browser to request information from the current master as it changes.
### Lock
The Lock module implements a fair lock that can be used when lots of clients want access to a single resource.
A lock can be associated with a value.
The value is unique so if a lock tries to request a value that is already queued for a lock then it will find it and watch until that value obtains the lock.
You may supply a `timeout` which will cancel the lock request if it is not obtained within `timeout` seconds. If `timeout` is not supplied, it is presumed to be infinite. If `timeout` is `0`, the lock request will fail if it is not immediately acquired.
If you lock the same value on a key from two separate curl sessions they'll both return at the same time.
Here's the API:
**Acquire a lock (with no value) for "customer1"**
```sh
curl -X POST http://127.0.0.1:4001/mod/v2/lock/customer1?ttl=60
```
**Acquire a lock for "customer1" that is associated with the value "bar"**
```sh
curl -X POST http://127.0.0.1:4001/mod/v2/lock/customer1?ttl=60 -d value=bar
```
**Acquire a lock for "customer1" that is associated with the value "bar" only if it is done within 2 seconds**
```sh
curl -X POST http://127.0.0.1:4001/mod/v2/lock/customer1?ttl=60 -d value=bar -d timeout=2
```
**Renew the TTL on the "customer1" lock for index 2**
```sh
curl -X PUT http://127.0.0.1:4001/mod/v2/lock/customer1?ttl=60 -d index=2
```
**Renew the TTL on the "customer1" lock for value "bar"**
```sh
curl -X PUT http://127.0.0.1:4001/mod/v2/lock/customer1?ttl=60 -d value=bar
```
**Retrieve the current value for the "customer1" lock.**
```sh
curl http://127.0.0.1:4001/mod/v2/lock/customer1
```
**Retrieve the current index for the "customer1" lock**
```sh
curl http://127.0.0.1:4001/mod/v2/lock/customer1?field=index
```
**Delete the "customer1" lock with the index 2**
```sh
curl -X DELETE http://127.0.0.1:4001/mod/v2/lock/customer1?index=2
```
**Delete the "customer1" lock with the value "bar"**
```sh
curl -X DELETE http://127.0.0.1:4001/mod/v2/lock/customer1?value=bar
```
### Leader Election (Deprecated and Removed in 0.4)
The Leader Election module wraps the Lock module to allow clients to come to consensus on a single value.
This is useful when you want one server to process at a time but allow other servers to fail over.
The API is similar to the Lock module but is limited to simple strings values.
Here's the API:
**Attempt to set a value for the "order_processing" leader key:**
```sh
curl -X PUT http://127.0.0.1:4001/mod/v2/leader/order_processing?ttl=60 -d name=myserver1.foo.com
```
**Retrieve the current value for the "order_processing" leader key:**
```sh
curl http://127.0.0.1:4001/mod/v2/leader/order_processing
myserver1.foo.com
```
**Remove a value from the "order_processing" leader key:**
```sh
curl -X DELETE http://127.0.0.1:4001/mod/v2/leader/order_processing?name=myserver1.foo.com
```
If multiple clients attempt to set the value for a key then only one will succeed.
The other clients will hang until the current value is removed because of TTL or because of a `DELETE` operation.
Multiple clients can submit the same value and will all be notified when that value succeeds.
To update the TTL of a value simply reissue the same `PUT` command that you used to set the value.

View File

@ -0,0 +1,38 @@
# Optimal etcd Cluster Size
etcd's Raft consensus algorithm is most efficient in small clusters between 3 and 9 peers. For clusters larger than 9, etcd will select a subset of instances to participate in the algorithm in order to keep it efficient. The end of this document briefly explores how etcd works internally and why these choices have been made.
## Cluster Management
You can manage the active cluster size through the [cluster config API](https://github.com/coreos/etcd/blob/master/Documentation/api.md#cluster-config). `activeSize` represents the etcd peers allowed to actively participate in the consensus algorithm.
If the total number of etcd instances exceeds this number, additional peers are started as [standbys](https://github.com/coreos/etcd/blob/master/Documentation/design/standbys.md), which can be promoted to active participation if one of the existing active instances has failed or been removed.
## Internals of etcd
### Writing to etcd
Writes to an etcd peer are always redirected to the leader of the cluster and distributed to all of the peers immediately. A write is only considered successful when a majority of the peers acknowledge the write.
For example, in a cluster with 5 peers, a write operation is only as fast as the 3rd fastest machine. This is the main reason for keeping the number of active peers below 9. In practice, you only need to worry about write performance in high latency environments such as a cluster spanning multiple data centers.
### Leader Election
The leader election process is similar to writing a key &mdash; a majority of the active peers must acknowledge the new leader before cluster operations can continue. The longer each peer takes to elect a new leader means you have to wait longer before you can write to the cluster again. In low latency environments this process takes milliseconds.
### Odd Active Cluster Size
The other important cluster optimization is to always have an odd active cluster size (i.e. `activeSize`). Adding an odd node to the number of peers doesn't change the size of the majority and therefore doesn't increase the total latency of the majority as described above. But, you gain a higher tolerance for peer failure by adding the extra machine. You can see this in practice when comparing two even and odd sized clusters:
| Active Peers | Majority | Failure Tolerance |
|--------------|------------|-------------------|
| 1 peers | 1 peers | None |
| 3 peers | 2 peers | 1 peer |
| 4 peers | 3 peers | 2 peers |
| 5 peers | 3 peers | **3 peers** |
| 6 peers | 4 peers | 2 peers |
| 7 peers | 4 peers | **3 peers** |
| 8 peers | 5 peers | 3 peers |
| 9 peers | 5 peers | **4 peers** |
As you can see, adding another peer to bring the number of active peers up to an odd size is always worth it. During a network partition, an odd number of active peers also guarantees that there will almost always be a majority of the cluster that can continue to operate and be the source of truth when the partition ends.

View File

@ -0,0 +1,62 @@
# FreeBSD
Starting with version 0.1.2 both etcd and etcdctl have been ported to FreeBSD and can
be installed either via packages or ports system. Their versions have been recently
updated to 0.2.0 so now you can enjoy using etcd and etcdctl on FreeBSD 10.0 (RC4 as
of now) and 9.x where they have been tested. They might also work when installed from
ports on earlier versions of FreeBSD, but your mileage may vary.
## Installation
### Using pkgng package system
1. If you do not have pkg­ng installed, install it with command `pkg` and answering 'Y'
when asked
2. Update your repository data with `pkg update`
3. Install etcd with `pkg install coreos­etcd coreos­etcdctl`
4. Verify successful installation with `pkg info | grep etcd` and you should get:
```
r@fbsd­10:/ # pkg info | grep etcd
coreos­etcd­0.2.0              Highly­available key value store and service discovery
coreos­etcdctl­0.2.0           Simple commandline client for etcd
r@fbsd­10:/ #
```
5. Youre ready to use etcd and etcdctl! For more information about using pkgng, please
see: http://www.freebsd.org/doc/handbook/pkgng­intro.html
 
### Using ports system
1. If you do not have ports installed, install with with `portsnap fetch extract` (it
may take some time depending on your hardware and network connection)
2. Build etcd with `cd /usr/ports/devel/etcd && make install clean`, you
will get an option to build and install documentation and etcdctl with it.
3. If you haven't installed it with etcdctl, and you would like to install it later, you can build it
with `cd /usr/ports/devel/etcdctl && make install clean`
4. Verify successful installation with `pkg info | grep etcd` and you should get:
 
```
r@fbsd­10:/ # pkg info | grep etcd
coreos­etcd­0.2.0              Highly­available key value store and service discovery
coreos­etcdctl­0.2.0           Simple commandline client for etcd
r@fbsd­10:/ #
```
5. Youre ready to use etcd and etcdctl! For more information about using ports system,
please see: https://www.freebsd.org/doc/handbook/ports­using.html
## Issues
If you find any issues with the build/install procedure or you've found a problem that
you've verified is local to FreeBSD version only (for example, by not being able to
reproduce it on any other platform, like OSX or Linux), please sent a
problem report using this page for more
information: http://www.freebsd.org/send­pr.html

View File

@ -0,0 +1,7 @@
etcd is being used successfully by many companies in production. It is,
however, under active development and systems like etcd are difficult to get
correct. If you are comfortable with bleeding-edge software please use etcd and
provide us with the feedback and testing young software needs.
When the etcd team feels confident removing this warning we will release etcd
1.0.

131
Documentation/security.md Normal file
View File

@ -0,0 +1,131 @@
# Reading and Writing over HTTPS
## Transport Security with HTTPS
Etcd supports SSL/TLS and client cert authentication for clients to server, as well as server to server communication.
First, you need to have a CA cert `clientCA.crt` and signed key pair `client.crt`, `client.key`.
This site has a good reference for how to generate self-signed key pairs:
http://www.g-loaded.eu/2005/11/10/be-your-own-ca/
Or you could use [etcd-ca](https://github.com/coreos/etcd-ca) to generate certs and keys.
For testing you can use the certificates in the `fixtures/ca` directory.
Let's configure etcd to use this keypair:
```sh
./etcd -f -name machine0 -data-dir machine0 -cert-file=./fixtures/ca/server.crt -key-file=./fixtures/ca/server.key.insecure
```
There are a few new options we're using:
* `-f` - forces a new machine configuration, even if an existing configuration is found. (WARNING: data loss!)
* `-cert-file` and `-key-file` specify the location of the cert and key files to be used for for transport layer security between the client and server.
You can now test the configuration using HTTPS:
```sh
curl --cacert ./fixtures/ca/server-chain.pem https://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar -v
```
You should be able to see the handshake succeed.
**OSX 10.9+ Users**: curl 7.30.0 on OSX 10.9+ doesn't understand certificates passed in on the command line.
Instead you must import the dummy ca.crt directly into the keychain or add the `-k` flag to curl to ignore errors.
If you want to test without the `-k` flag run `open ./fixtures/ca/ca.crt` and follow the prompts.
Please remove this certificate after you are done testing!
If you know of a workaround let us know.
```
...
SSLv3, TLS handshake, Finished (20):
...
```
And also the response from the etcd server:
```json
{
"action": "set",
"key": "/foo",
"modifiedIndex": 3,
"value": "bar"
}
```
## Authentication with HTTPS Client Certificates
We can also do authentication using CA certs.
The clients will provide their cert to the server and the server will check whether the cert is signed by the CA and decide whether to serve the request.
```sh
./etcd -f -name machine0 -data-dir machine0 -ca-file=./fixtures/ca/ca.crt -cert-file=./fixtures/ca/server.crt -key-file=./fixtures/ca/server.key.insecure
```
```-ca-file``` is the path to the CA cert.
Try the same request to this server:
```sh
curl --cacert ./fixtures/ca/server-chain.pem https://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar -v
```
The request should be rejected by the server.
```
...
routines:SSL3_READ_BYTES:sslv3 alert bad certificate
...
```
We need to give the CA signed cert to the server.
```sh
curl --key ./fixtures/ca/server2.key.insecure --cert ./fixtures/ca/server2.crt --cacert ./fixtures/ca/server-chain.pem -L https://127.0.0.1:4001/v2/keys/foo -XPUT -d value=bar -v
```
You should able to see:
```
...
SSLv3, TLS handshake, CERT verify (15):
...
TLS handshake, Finished (20)
```
And also the response from the server:
```json
{
"action": "set",
"node": {
"createdIndex": 12,
"key": "/foo",
"modifiedIndex": 12,
"value": "bar"
}
}
```
### Why SSLv3 alert handshake failure when using SSL client auth?
The `crypto/tls` package of `golang` checks the key usage of the certificate public key before using it.
To use the certificate public key to do client auth, we need to add `clientAuth` to `Extended Key Usage` when creating the certificate public key.
Here is how to do it:
Add the following section to your openssl.cnf:
```
[ ssl_client ]
...
extendedKeyUsage = clientAuth
...
```
When creating the cert be sure to reference it in the `-extensions` flag:
```
openssl ca -config openssl.cnf -policy policy_anything -extensions ssl_client -out certs/machine.crt -infiles machine.csr
```

93
Documentation/tuning.md Normal file
View File

@ -0,0 +1,93 @@
## Tuning
The default settings in etcd should work well for installations on a local network where the average network latency is low.
However, when using etcd across multiple data centers or over networks with high latency you may need to tweak the heartbeat interval and election timeout settings.
### Time Parameters
The underlying distributed consensus protocol relies on two separate time parameters to ensure that nodes can handoff leadership if one stalls or goes offline.
The first parameter is called the *Heartbeat Interval*.
This is the frequency with which the leader will notify followers that it is still the leader.
etcd batches commands together for higher throughput so this heartbeat interval is also a delay for how long it takes for commands to be committed.
By default, etcd uses a `50ms` heartbeat interval.
The second parameter is the *Election Timeout*.
This timeout is how long a follower node will go without hearing a heartbeat before attempting to become leader itself.
By default, etcd uses a `200ms` election timeout.
Adjusting these values is a trade off.
Lowering the heartbeat interval will cause individual commands to be committed faster but it will lower the overall throughput of etcd.
If your etcd instances have low utilization then lowering the heartbeat interval can improve your command response time.
The election timeout should be set based on the heartbeat interval and your network ping time between nodes.
Election timeouts should be at least 10 times your ping time so it can account for variance in your network.
For example, if the ping time between your nodes is 10ms then you should have at least a 100ms election timeout.
You should also set your election timeout to at least 4 to 5 times your heartbeat interval to account for variance in leader replication.
For a heartbeat interval of 50ms you should set your election timeout to at least 200ms - 250ms.
You can override the default values on the command line:
```sh
# Command line arguments:
$ etcd -peer-heartbeat-interval=100 -peer-election-timeout=500
# Environment variables:
$ ETCD_PEER_HEARTBEAT_INTERVAL=100 ETCD_PEER_ELECTION_TIMEOUT=500 etcd
```
Or you can set the values within the configuration file:
```toml
[peer]
heartbeat_interval = 100
election_timeout = 100
```
The values are specified in milliseconds.
### Snapshots
etcd appends all key changes to a log file.
This log grows forever and is a complete linear history of every change made to the keys.
A complete history works well for lightly used clusters but clusters that are heavily used would carry around a large log.
To avoid having a huge log etcd makes periodic snapshots.
These snapshots provide a way for etcd to compact the log by saving the current state of the system and removing old logs.
### Snapshot Tuning
Creating snapshots can be expensive so they're only created after a given number of changes to etcd.
By default, snapshots will be made after every 10,000 changes.
If etcd's memory usage and disk usage are too high, you can lower the snapshot threshold by setting the following on the command line:
```sh
# Command line arguments:
$ etcd -snapshot-count=5000
# Environment variables:
$ ETCD_SNAPSHOT_COUNT=5000 etcd
```
Or you can change the setting in the configuration file:
```toml
snapshot_count = 5000
```
You can also disable snapshotting by adding the following to your command line:
```sh
# Command line arguments:
$ etcd -snapshot false
# Environment variables:
$ ETCD_SNAPSHOT=false etcd
```
You can also disable snapshotting within the configuration file:
```toml
snapshot = false
```

17
Documentation/upgrade.md Normal file
View File

@ -0,0 +1,17 @@
# Upgrading an Existing Cluster
etcd clusters can be upgraded by doing a rolling upgrade or all at once. We make every effort to test this process, but please be sure to backup your data [by etcd-dump](https://github.com/AaronO/etcd-dump), or make a copy of data directory beforehand.
## Upgrade Process
- Stop the old etcd processes
- Upgrade the etcd binary
- Restart the etcd instance using the original --name, --address, --peer-address and --data-dir.
## Rolling Upgrade
During an upgrade, etcd clusters are designed to continue working in a mix of old and new versions. It's recommended to converge on the new version quickly. Using new API features before the entire cluster has been upgraded is only supported as a best effort. Each instance's version can be found with `curl http://127.0.0.1:4001/version`.
## All at Once
If downtime is not an issue, the easiest way to upgrade your cluster is to shutdown all of the etcd instances and restart them with the new binary. The current state of the cluster is saved to disk and will be loaded into the cluster when it restarts.

1229
README.md

File diff suppressed because it is too large Load Diff

27
Vagrantfile vendored Normal file
View File

@ -0,0 +1,27 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
Vagrant.require_version '>= 1.5.0'
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :forwarded_port, host: 4001, guest: 4001
config.vm.network :forwarded_port, host: 7001, guest: 7001
# Fix docker not being able to resolve private registry in VirtualBox
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
config.vm.provision "docker" do |d|
d.build_image "/vagrant", args: '-t etcd'
d.run "etcd", args: "-p 4001:4001 -p 7001:7001", demonize: true
end
# plugin conflict
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
end

View File

@ -4,27 +4,38 @@ import (
"flag"
"log"
"strconv"
"time"
"github.com/coreos/go-etcd/etcd"
"github.com/coreos/etcd/third_party/github.com/coreos/go-etcd/etcd"
)
func write(requests int, end chan int) {
client := etcd.NewClient(nil)
var (
// output debug to log
verbose *bool
)
func write(endpoint string, requests int, end chan int) {
client := etcd.NewClient([]string{endpoint})
for i := 0; i < requests; i++ {
key := strconv.Itoa(i)
client.Set(key, key, 0)
_, err := client.Set(key, key, 0)
if err != nil {
println(err.Error())
}
}
end <- 1
}
func watch(key string) {
client := etcd.NewClient(nil)
func watch(endpoint string, key string) {
client := etcd.NewClient([]string{endpoint})
receiver := make(chan *etcd.Response)
go client.Watch(key, 0, true, receiver, nil)
log.Printf("watching: %s", key)
if *verbose {
log.Printf("watching: %s", key)
}
received := 0
for {
@ -34,25 +45,35 @@ func watch(key string) {
}
func main() {
endpoint := flag.String("endpoint", "http://127.0.0.1:4001", "etcd HTTP endpoint")
rWrites := flag.Int("write-requests", 50000, "number of writes")
cWrites := flag.Int("concurrent-writes", 500, "number of concurrent writes")
watches := flag.Int("watches", 500, "number of writes")
watches := flag.Int("watches", 500, "number of concurrent watches")
verbose = flag.Bool("verbose", false, "output debug info")
flag.Parse()
log.Printf("Benchmarking %v", *endpoint)
log.Printf("%v writes with %v concurrent writers and %v watches", *rWrites, *cWrites, *watches)
t := time.Now()
for i := 0; i < *watches; i++ {
key := strconv.Itoa(i)
go watch(key)
go watch(*endpoint, key)
}
wChan := make(chan int, *cWrites)
for i := 0; i < *cWrites; i++ {
go write((*rWrites / *cWrites), wChan)
go write(*endpoint, (*rWrites / *cWrites), wChan)
}
for i := 0; i < *cWrites; i++ {
<-wChan
log.Printf("Completed %d writes", (*rWrites / *cWrites))
if *verbose {
log.Printf("Completed %d writes", (*rWrites / *cWrites))
}
}
log.Printf("Took %v", time.Now().Sub(t))
}

35
build
View File

@ -1,27 +1,18 @@
#!/bin/sh
set -e
#!/bin/sh -e
ETCD_PACKAGE=github.com/coreos/etcd
export GOPATH="${PWD}"
SRC_DIR="$GOPATH/src"
ETCD_DIR="$SRC_DIR/$ETCD_PACKAGE"
ETCD_BASE=$(dirname "${ETCD_DIR}")
if [ ! -d "${ETCD_BASE}" ]; then
mkdir -p "${ETCD_BASE}"
if [ ! -h gopath/src/github.com/coreos/etcd ]; then
mkdir -p gopath/src/github.com/coreos/
ln -s ../../../.. gopath/src/github.com/coreos/etcd
fi
if [ ! -h "${ETCD_DIR}" ]; then
ln -s ../../../ "${ETCD_DIR}"
export GOBIN=${PWD}/bin
export GOPATH=${PWD}/gopath
export GOFMTPATH="./bench ./config ./discovery ./etcd ./error ./http ./log main.go ./metrics ./mod ./server ./store ./tests"
# Don't surprise user by formatting their codes by stealth
if [ "--fmt" = "$1" ]; then
gofmt -s -w -l $GOFMTPATH
fi
for i in third_party/*; do
if [ "$i" = "third_party/src" ]; then
continue
fi
cp -R "$i" src/
done
./scripts/release-version > server/release_version.go
go build "${ETCD_PACKAGE}"
go build -o etcdbench "${ETCD_PACKAGE}"/bench
go install github.com/coreos/etcd
go install github.com/coreos/etcd/bench

View File

@ -1,24 +0,0 @@
$ETCD_PACKAGE="github.com/coreos/etcd"
$env:GOPATH=$pwd.Path
$SRC_DIR="$env:GOPATH/src"
$ETCD_DIR="$SRC_DIR/$ETCD_PACKAGE"
$env:ETCD_DIR="$SRC_DIR/$ETCD_PACKAGE"
$ETCD_BASE=(Split-Path $ETCD_DIR -Parent)
if(-not(test-path $ETCD_DIR)){
mkdir -force "$ETCD_BASE" > $null
}
if(-not(test-path $ETCD_DIR )){
cmd /c 'mklink /D "%ETCD_DIR%" ..\..\..\'
}
foreach($i in (ls third_party/*)){
if("$i" -eq "third_party/src") {continue}
cp -Recurse -force "$i" src/
}
./scripts/release-version.ps1 | Out-File -Encoding UTF8 server/release_version.go
go build -v "${ETCD_PACKAGE}"

View File

@ -1,10 +1,10 @@
package server
package config
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"math/rand"
"net"
"net/url"
"os"
@ -12,9 +12,13 @@ import (
"reflect"
"strconv"
"strings"
"time"
"github.com/coreos/etcd/third_party/github.com/BurntSushi/toml"
"github.com/BurntSushi/toml"
"github.com/coreos/etcd/log"
ustrings "github.com/coreos/etcd/pkg/strings"
"github.com/coreos/etcd/server"
)
// The default location for the etcd configuration file.
@ -22,24 +26,25 @@ const DefaultSystemConfigPath = "/etc/etcd/etcd.conf"
// A lookup of deprecated flags to their new flag name.
var newFlagNameLookup = map[string]string{
"C": "peers",
"CF": "peers-file",
"n": "name",
"c": "addr",
"cl": "bind-addr",
"s": "peer-addr",
"sl": "peer-bind-addr",
"d": "data-dir",
"m": "max-result-buffer",
"r": "max-retry-attempts",
"maxsize": "max-cluster-size",
"clientCAFile": "ca-file",
"clientCert": "cert-file",
"clientKey": "key-file",
"serverCAFile": "peer-ca-file",
"serverCert": "peer-cert-file",
"serverKey": "peer-key-file",
"snapshotCount": "snapshot-count",
"C": "peers",
"CF": "peers-file",
"n": "name",
"c": "addr",
"cl": "bind-addr",
"s": "peer-addr",
"sl": "peer-bind-addr",
"d": "data-dir",
"m": "max-result-buffer",
"r": "max-retry-attempts",
"maxsize": "max-cluster-size",
"clientCAFile": "ca-file",
"clientCert": "cert-file",
"clientKey": "key-file",
"serverCAFile": "peer-ca-file",
"serverCert": "peer-cert-file",
"serverKey": "peer-key-file",
"snapshotCount": "snapshot-count",
"peer-heartbeat-timeout": "peer-heartbeat-interval",
}
// Config represents the server configuration.
@ -53,13 +58,14 @@ type Config struct {
CPUProfileFile string
CorsOrigins []string `toml:"cors" env:"ETCD_CORS"`
DataDir string `toml:"data_dir" env:"ETCD_DATA_DIR"`
Discovery string `toml:"discovery" env:"ETCD_DISCOVERY"`
Force bool
KeyFile string `toml:"key_file" env:"ETCD_KEY_FILE"`
Peers []string `toml:"peers" env:"ETCD_PEERS"`
PeersFile string `toml:"peers_file" env:"ETCD_PEERS_FILE"`
MaxClusterSize int `toml:"max_cluster_size" env:"ETCD_MAX_CLUSTER_SIZE"`
MaxResultBuffer int `toml:"max_result_buffer" env:"ETCD_MAX_RESULT_BUFFER"`
MaxRetryAttempts int `toml:"max_retry_attempts" env:"ETCD_MAX_RETRY_ATTEMPTS"`
RetryInterval float64 `toml:"retry_interval" env:"ETCD_RETRY_INTERVAL"`
Name string `toml:"name" env:"ETCD_NAME"`
Snapshot bool `toml:"snapshot" env:"ETCD_SNAPSHOT"`
SnapshotCount int `toml:"snapshot_count" env:"ETCD_SNAPSHOTCOUNT"`
@ -67,29 +73,44 @@ type Config struct {
ShowVersion bool
Verbose bool `toml:"verbose" env:"ETCD_VERBOSE"`
VeryVerbose bool `toml:"very_verbose" env:"ETCD_VERY_VERBOSE"`
VeryVeryVerbose bool `toml:"very_very_verbose" env:"ETCD_VERY_VERY_VERBOSE"`
Peer struct {
Addr string `toml:"addr" env:"ETCD_PEER_ADDR"`
BindAddr string `toml:"bind_addr" env:"ETCD_PEER_BIND_ADDR"`
CAFile string `toml:"ca_file" env:"ETCD_PEER_CA_FILE"`
CertFile string `toml:"cert_file" env:"ETCD_PEER_CERT_FILE"`
KeyFile string `toml:"key_file" env:"ETCD_PEER_KEY_FILE"`
HeartbeatTimeout int `toml:"heartbeat_timeout" env:"ETCD_PEER_HEARTBEAT_TIMEOUT"`
ElectionTimeout int `toml:"election_timeout" env:"ETCD_PEER_ELECTION_TIMEOUT"`
Addr string `toml:"addr" env:"ETCD_PEER_ADDR"`
BindAddr string `toml:"bind_addr" env:"ETCD_PEER_BIND_ADDR"`
CAFile string `toml:"ca_file" env:"ETCD_PEER_CA_FILE"`
CertFile string `toml:"cert_file" env:"ETCD_PEER_CERT_FILE"`
KeyFile string `toml:"key_file" env:"ETCD_PEER_KEY_FILE"`
HeartbeatInterval int `toml:"heartbeat_interval" env:"ETCD_PEER_HEARTBEAT_INTERVAL"`
ElectionTimeout int `toml:"election_timeout" env:"ETCD_PEER_ELECTION_TIMEOUT"`
}
strTrace string `toml:"trace" env:"ETCD_TRACE"`
GraphiteHost string `toml:"graphite_host" env:"ETCD_GRAPHITE_HOST"`
Cluster struct {
ActiveSize int `toml:"active_size" env:"ETCD_CLUSTER_ACTIVE_SIZE"`
RemoveDelay float64 `toml:"remove_delay" env:"ETCD_CLUSTER_REMOVE_DELAY"`
SyncInterval float64 `toml:"sync_interval" env:"ETCD_CLUSTER_SYNC_INTERVAL"`
}
}
// NewConfig returns a Config initialized with default values.
func NewConfig() *Config {
// New returns a Config initialized with default values.
func New() *Config {
c := new(Config)
c.SystemPath = DefaultSystemConfigPath
c.Addr = "127.0.0.1:4001"
c.MaxClusterSize = 9
c.MaxResultBuffer = 1024
c.MaxRetryAttempts = 3
c.RetryInterval = 10.0
c.Snapshot = true
c.SnapshotCount = 10000
c.Peer.Addr = "127.0.0.1:7001"
c.Peer.HeartbeatTimeout = 0
c.Peer.ElectionTimeout = 0
c.Peer.HeartbeatInterval = defaultHeartbeatInterval
c.Peer.ElectionTimeout = defaultElectionTimeout
rand.Seed(time.Now().UTC().UnixNano())
// Make maximum twice as minimum.
c.RetryInterval = float64(50+rand.Int()%50) * defaultHeartbeatInterval / 1000
c.Cluster.ActiveSize = server.DefaultActiveSize
c.Cluster.RemoveDelay = server.DefaultRemoveDelay
c.Cluster.SyncInterval = server.DefaultSyncInterval
return c
}
@ -129,16 +150,6 @@ func (c *Config) Load(arguments []string) error {
return err
}
// Sanitize all the input fields.
if err := c.Sanitize(); err != nil {
return fmt.Errorf("sanitize: %v", err)
}
// Force remove server configuration if specified.
if c.Force {
c.Reset()
}
return nil
}
@ -164,6 +175,9 @@ func (c *Config) LoadEnv() error {
if err := c.loadEnv(&c.Peer); err != nil {
return err
}
if err := c.loadEnv(&c.Cluster); err != nil {
return err
}
return nil
}
@ -192,7 +206,13 @@ func (c *Config) loadEnv(target interface{}) error {
case reflect.String:
value.Field(i).SetString(v)
case reflect.Slice:
value.Field(i).Set(reflect.ValueOf(trimsplit(v, ",")))
value.Field(i).Set(reflect.ValueOf(ustrings.TrimSplit(v, ",")))
case reflect.Float64:
newValue, err := strconv.ParseFloat(v, 64)
if err != nil {
return fmt.Errorf("Parse error: %s: %s", field.Tag.Get("env"), err)
}
value.Field(i).SetFloat(newValue)
}
}
return nil
@ -213,13 +233,15 @@ func (c *Config) LoadFlags(arguments []string) error {
f.BoolVar(&c.Force, "force", false, "")
f.BoolVar(&c.Verbose, "v", c.Verbose, "")
f.BoolVar(&c.VeryVerbose, "vv", c.Verbose, "")
f.BoolVar(&c.VeryVerbose, "vv", c.VeryVerbose, "")
f.BoolVar(&c.VeryVeryVerbose, "vvv", c.VeryVeryVerbose, "")
f.StringVar(&peers, "peers", "", "")
f.StringVar(&c.PeersFile, "peers-file", c.PeersFile, "")
f.StringVar(&c.Name, "name", c.Name, "")
f.StringVar(&c.Addr, "addr", c.Addr, "")
f.StringVar(&c.Discovery, "discovery", c.Discovery, "")
f.StringVar(&c.BindAddr, "bind-addr", c.BindAddr, "")
f.StringVar(&c.Peer.Addr, "peer-addr", c.Peer.Addr, "")
f.StringVar(&c.Peer.BindAddr, "peer-bind-addr", c.Peer.BindAddr, "")
@ -235,8 +257,8 @@ func (c *Config) LoadFlags(arguments []string) error {
f.StringVar(&c.DataDir, "data-dir", c.DataDir, "")
f.IntVar(&c.MaxResultBuffer, "max-result-buffer", c.MaxResultBuffer, "")
f.IntVar(&c.MaxRetryAttempts, "max-retry-attempts", c.MaxRetryAttempts, "")
f.IntVar(&c.MaxClusterSize, "max-cluster-size", c.MaxClusterSize, "")
f.IntVar(&c.Peer.HeartbeatTimeout, "peer-heartbeat-timeout", c.Peer.HeartbeatTimeout, "")
f.Float64Var(&c.RetryInterval, "retry-interval", c.RetryInterval, "")
f.IntVar(&c.Peer.HeartbeatInterval, "peer-heartbeat-interval", c.Peer.HeartbeatInterval, "")
f.IntVar(&c.Peer.ElectionTimeout, "peer-election-timeout", c.Peer.ElectionTimeout, "")
f.StringVar(&cors, "cors", "", "")
@ -245,6 +267,13 @@ func (c *Config) LoadFlags(arguments []string) error {
f.IntVar(&c.SnapshotCount, "snapshot-count", c.SnapshotCount, "")
f.StringVar(&c.CPUProfileFile, "cpuprofile", "", "")
f.StringVar(&c.strTrace, "trace", "", "")
f.StringVar(&c.GraphiteHost, "graphite-host", "", "")
f.IntVar(&c.Cluster.ActiveSize, "cluster-active-size", c.Cluster.ActiveSize, "")
f.Float64Var(&c.Cluster.RemoveDelay, "cluster-remove-delay", c.Cluster.RemoveDelay, "")
f.Float64Var(&c.Cluster.SyncInterval, "cluster-sync-interval", c.Cluster.SyncInterval, "")
// BEGIN IGNORED FLAGS
f.StringVar(&path, "config", "", "")
// BEGIN IGNORED FLAGS
@ -266,8 +295,8 @@ func (c *Config) LoadFlags(arguments []string) error {
f.StringVar(&c.DataDir, "d", c.DataDir, "(deprecated)")
f.IntVar(&c.MaxResultBuffer, "m", c.MaxResultBuffer, "(deprecated)")
f.IntVar(&c.MaxRetryAttempts, "r", c.MaxRetryAttempts, "(deprecated)")
f.IntVar(&c.MaxClusterSize, "maxsize", c.MaxClusterSize, "(deprecated)")
f.IntVar(&c.SnapshotCount, "snapshotCount", c.SnapshotCount, "(deprecated)")
f.IntVar(&c.Peer.HeartbeatInterval, "peer-heartbeat-timeout", c.Peer.HeartbeatInterval, "(deprecated)")
// END DEPRECATED FLAGS
if err := f.Parse(arguments); err != nil {
@ -277,16 +306,16 @@ func (c *Config) LoadFlags(arguments []string) error {
// Print deprecation warnings on STDERR.
f.Visit(func(f *flag.Flag) {
if len(newFlagNameLookup[f.Name]) > 0 {
fmt.Fprintf(os.Stderr, "[deprecated] use -%s, not -%s", newFlagNameLookup[f.Name], f.Name)
fmt.Fprintf(os.Stderr, "[deprecated] use -%s, not -%s\n", newFlagNameLookup[f.Name], f.Name)
}
})
// Convert some parameters to lists.
if peers != "" {
c.Peers = trimsplit(peers, ",")
c.Peers = ustrings.TrimSplit(peers, ",")
}
if cors != "" {
c.CorsOrigins = trimsplit(cors, ",")
c.CorsOrigins = ustrings.TrimSplit(cors, ",")
}
return nil
@ -302,7 +331,7 @@ func (c *Config) LoadPeersFile() error {
if err != nil {
return fmt.Errorf("Peers file error: %s", err)
}
c.Peers = trimsplit(string(b), ",")
c.Peers = ustrings.TrimSplit(string(b), ",")
return nil
}
@ -328,9 +357,6 @@ func (c *Config) NameFromHostname() {
// Reset removes all server configuration files.
func (c *Config) Reset() error {
if err := os.RemoveAll(filepath.Join(c.DataDir, "info")); err != nil {
return err
}
if err := os.RemoveAll(filepath.Join(c.DataDir, "log")); err != nil {
return err
}
@ -340,73 +366,29 @@ func (c *Config) Reset() error {
if err := os.RemoveAll(filepath.Join(c.DataDir, "snapshot")); err != nil {
return err
}
if err := os.RemoveAll(filepath.Join(c.DataDir, "standby_info")); err != nil {
return err
}
return nil
}
// Reads the info file from the file system or initializes it based on the config.
func (c *Config) Info() (*Info, error) {
info := &Info{}
path := filepath.Join(c.DataDir, "info")
// Open info file and read it out.
f, err := os.Open(path)
if err != nil && !os.IsNotExist(err) {
return nil, err
} else if f != nil {
defer f.Close()
if err := json.NewDecoder(f).Decode(&info); err != nil {
return nil, err
}
return info, nil
}
// If the file doesn't exist then initialize it.
info.Name = strings.TrimSpace(c.Name)
info.EtcdURL = c.Addr
info.EtcdListenHost = c.BindAddr
info.RaftURL = c.Peer.Addr
info.RaftListenHost = c.Peer.BindAddr
info.EtcdTLS = c.TLSInfo()
info.RaftTLS = c.PeerTLSInfo()
// Write to file.
f, err = os.Create(path)
if err != nil {
return nil, err
}
defer f.Close()
if err := json.NewEncoder(f).Encode(info); err != nil {
return nil, err
}
return info, nil
}
// Sanitize cleans the input fields.
func (c *Config) Sanitize() error {
tlsConfig, err := c.TLSConfig()
if err != nil {
return err
}
peerTlsConfig, err := c.PeerTLSConfig()
if err != nil {
return err
}
var err error
var url *url.URL
// Sanitize the URLs first.
if c.Addr, err = sanitizeURL(c.Addr, tlsConfig.Scheme); err != nil {
if c.Addr, url, err = sanitizeURL(c.Addr, c.EtcdTLSInfo().Scheme()); err != nil {
return fmt.Errorf("Advertised URL: %s", err)
}
if c.BindAddr, err = sanitizeBindAddr(c.BindAddr, c.Addr); err != nil {
if c.BindAddr, err = sanitizeBindAddr(c.BindAddr, url); err != nil {
return fmt.Errorf("Listen Host: %s", err)
}
if c.Peer.Addr, err = sanitizeURL(c.Peer.Addr, peerTlsConfig.Scheme); err != nil {
if c.Peer.Addr, url, err = sanitizeURL(c.Peer.Addr, c.PeerTLSInfo().Scheme()); err != nil {
return fmt.Errorf("Peer Advertised URL: %s", err)
}
if c.Peer.BindAddr, err = sanitizeBindAddr(c.Peer.BindAddr, c.Peer.Addr); err != nil {
if c.Peer.BindAddr, err = sanitizeBindAddr(c.Peer.BindAddr, url); err != nil {
return fmt.Errorf("Peer Listen Host: %s", err)
}
@ -416,72 +398,76 @@ func (c *Config) Sanitize() error {
c.NameFromHostname()
}
if c.DataDir == "" && c.Name != "" {
if c.DataDir == "" && c.Name != "" && !c.ShowVersion && !c.ShowHelp {
c.DataDirFromName()
}
return nil
}
// TLSInfo retrieves a TLSInfo object for the client server.
func (c *Config) TLSInfo() TLSInfo {
return TLSInfo{
// EtcdTLSInfo retrieves a TLSInfo object for the etcd server
func (c *Config) EtcdTLSInfo() *server.TLSInfo {
return &server.TLSInfo{
CAFile: c.CAFile,
CertFile: c.CertFile,
KeyFile: c.KeyFile,
}
}
// ClientTLSConfig generates the TLS configuration for the client server.
func (c *Config) TLSConfig() (TLSConfig, error) {
return c.TLSInfo().Config()
}
// PeerTLSInfo retrieves a TLSInfo object for the peer server.
func (c *Config) PeerTLSInfo() TLSInfo {
return TLSInfo{
// PeerRaftInfo retrieves a TLSInfo object for the peer server.
func (c *Config) PeerTLSInfo() *server.TLSInfo {
return &server.TLSInfo{
CAFile: c.Peer.CAFile,
CertFile: c.Peer.CertFile,
KeyFile: c.Peer.KeyFile,
}
}
// PeerTLSConfig generates the TLS configuration for the peer server.
func (c *Config) PeerTLSConfig() (TLSConfig, error) {
return c.PeerTLSInfo().Config()
// MetricsBucketName generates the name that should be used for a
// corresponding MetricsBucket object
func (c *Config) MetricsBucketName() string {
return fmt.Sprintf("etcd.%s", c.Name)
}
// Trace determines if any trace-level information should be emitted
func (c *Config) Trace() bool {
return c.strTrace == "*"
}
func (c *Config) ClusterConfig() *server.ClusterConfig {
return &server.ClusterConfig{
ActiveSize: c.Cluster.ActiveSize,
RemoveDelay: c.Cluster.RemoveDelay,
SyncInterval: c.Cluster.SyncInterval,
}
}
// sanitizeURL will cleanup a host string in the format hostname[:port] and
// attach a schema.
func sanitizeURL(host string, defaultScheme string) (string, error) {
func sanitizeURL(host string, defaultScheme string) (string, *url.URL, error) {
// Blank URLs are fine input, just return it
if len(host) == 0 {
return host, nil
return host, &url.URL{}, nil
}
p, err := url.Parse(host)
if err != nil {
return "", err
return "", nil, err
}
// Make sure the host is in Host:Port format
_, _, err = net.SplitHostPort(host)
if err != nil {
return "", err
return "", nil, err
}
p = &url.URL{Host: host, Scheme: defaultScheme}
return p.String(), nil
return p.String(), p, nil
}
// sanitizeBindAddr cleans up the BindAddr parameter and appends a port
// if necessary based on the advertised port.
func sanitizeBindAddr(bindAddr string, addr string) (string, error) {
aurl, err := url.Parse(addr)
if err != nil {
return "", err
}
func sanitizeBindAddr(bindAddr string, aurl *url.URL) (string, error) {
// If it is a valid host:port simply return with no further checks.
bhost, bport, err := net.SplitHostPort(bindAddr)
if err == nil && bhost != "" {

View File

@ -1,12 +1,12 @@
package server
package config
import (
"io/ioutil"
"os"
"testing"
"github.com/BurntSushi/toml"
"github.com/stretchr/testify/assert"
"github.com/coreos/etcd/third_party/github.com/BurntSushi/toml"
"github.com/coreos/etcd/third_party/github.com/stretchr/testify/assert"
)
// Ensures that a configuration can be deserialized from TOML.
@ -18,6 +18,7 @@ func TestConfigTOML(t *testing.T) {
cors = ["*"]
cpu_profile_file = "XXX"
data_dir = "/tmp/data"
discovery = "http://example.com/foobar"
key_file = "/tmp/file.key"
bind_addr = "127.0.0.1:4003"
peers = ["coreos.com:4001", "coreos.com:4002"]
@ -29,7 +30,6 @@ func TestConfigTOML(t *testing.T) {
snapshot = true
verbose = true
very_verbose = true
web_url = "/web"
[peer]
addr = "127.0.0.1:7002"
@ -37,8 +37,13 @@ func TestConfigTOML(t *testing.T) {
cert_file = "/tmp/peer/file.cert"
key_file = "/tmp/peer/file.key"
bind_addr = "127.0.0.1:7003"
[cluster]
active_size = 5
remove_delay = 100.0
sync_interval = 10.0
`
c := NewConfig()
c := New()
_, err := toml.Decode(content, &c)
assert.Nil(t, err, "")
assert.Equal(t, c.Addr, "127.0.0.1:4002", "")
@ -46,11 +51,11 @@ func TestConfigTOML(t *testing.T) {
assert.Equal(t, c.CertFile, "/tmp/file.cert", "")
assert.Equal(t, c.CorsOrigins, []string{"*"}, "")
assert.Equal(t, c.DataDir, "/tmp/data", "")
assert.Equal(t, c.Discovery, "http://example.com/foobar", "")
assert.Equal(t, c.KeyFile, "/tmp/file.key", "")
assert.Equal(t, c.BindAddr, "127.0.0.1:4003", "")
assert.Equal(t, c.Peers, []string{"coreos.com:4001", "coreos.com:4002"}, "")
assert.Equal(t, c.PeersFile, "/tmp/peers", "")
assert.Equal(t, c.MaxClusterSize, 10, "")
assert.Equal(t, c.MaxResultBuffer, 512, "")
assert.Equal(t, c.MaxRetryAttempts, 5, "")
assert.Equal(t, c.Name, "test-name", "")
@ -62,6 +67,9 @@ func TestConfigTOML(t *testing.T) {
assert.Equal(t, c.Peer.CertFile, "/tmp/peer/file.cert", "")
assert.Equal(t, c.Peer.KeyFile, "/tmp/peer/file.key", "")
assert.Equal(t, c.Peer.BindAddr, "127.0.0.1:7003", "")
assert.Equal(t, c.Cluster.ActiveSize, 5, "")
assert.Equal(t, c.Cluster.RemoveDelay, 100.0, "")
assert.Equal(t, c.Cluster.SyncInterval, 10.0, "")
}
// Ensures that a configuration can be retrieved from environment variables.
@ -71,6 +79,7 @@ func TestConfigEnv(t *testing.T) {
os.Setenv("ETCD_CPU_PROFILE_FILE", "XXX")
os.Setenv("ETCD_CORS", "localhost:4001,localhost:4002")
os.Setenv("ETCD_DATA_DIR", "/tmp/data")
os.Setenv("ETCD_DISCOVERY", "http://example.com/foobar")
os.Setenv("ETCD_KEY_FILE", "/tmp/file.key")
os.Setenv("ETCD_BIND_ADDR", "127.0.0.1:4003")
os.Setenv("ETCD_PEERS", "coreos.com:4001,coreos.com:4002")
@ -82,24 +91,26 @@ func TestConfigEnv(t *testing.T) {
os.Setenv("ETCD_SNAPSHOT", "true")
os.Setenv("ETCD_VERBOSE", "1")
os.Setenv("ETCD_VERY_VERBOSE", "yes")
os.Setenv("ETCD_WEB_URL", "/web")
os.Setenv("ETCD_PEER_ADDR", "127.0.0.1:7002")
os.Setenv("ETCD_PEER_CA_FILE", "/tmp/peer/file.ca")
os.Setenv("ETCD_PEER_CERT_FILE", "/tmp/peer/file.cert")
os.Setenv("ETCD_PEER_KEY_FILE", "/tmp/peer/file.key")
os.Setenv("ETCD_PEER_BIND_ADDR", "127.0.0.1:7003")
os.Setenv("ETCD_CLUSTER_ACTIVE_SIZE", "5")
os.Setenv("ETCD_CLUSTER_REMOVE_DELAY", "100")
os.Setenv("ETCD_CLUSTER_SYNC_INTERVAL", "10")
c := NewConfig()
c := New()
c.LoadEnv()
assert.Equal(t, c.CAFile, "/tmp/file.ca", "")
assert.Equal(t, c.CertFile, "/tmp/file.cert", "")
assert.Equal(t, c.CorsOrigins, []string{"localhost:4001", "localhost:4002"}, "")
assert.Equal(t, c.DataDir, "/tmp/data", "")
assert.Equal(t, c.Discovery, "http://example.com/foobar", "")
assert.Equal(t, c.KeyFile, "/tmp/file.key", "")
assert.Equal(t, c.BindAddr, "127.0.0.1:4003", "")
assert.Equal(t, c.Peers, []string{"coreos.com:4001", "coreos.com:4002"}, "")
assert.Equal(t, c.PeersFile, "/tmp/peers", "")
assert.Equal(t, c.MaxClusterSize, 10, "")
assert.Equal(t, c.MaxResultBuffer, 512, "")
assert.Equal(t, c.MaxRetryAttempts, 5, "")
assert.Equal(t, c.Name, "test-name", "")
@ -111,44 +122,50 @@ func TestConfigEnv(t *testing.T) {
assert.Equal(t, c.Peer.CertFile, "/tmp/peer/file.cert", "")
assert.Equal(t, c.Peer.KeyFile, "/tmp/peer/file.key", "")
assert.Equal(t, c.Peer.BindAddr, "127.0.0.1:7003", "")
assert.Equal(t, c.Cluster.ActiveSize, 5, "")
assert.Equal(t, c.Cluster.RemoveDelay, 100.0, "")
assert.Equal(t, c.Cluster.SyncInterval, 10.0, "")
// Clear this as it will mess up other tests
os.Setenv("ETCD_DISCOVERY", "")
}
// Ensures that the "help" flag can be parsed.
func TestConfigHelpFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-help"}), "")
assert.True(t, c.ShowHelp)
}
// Ensures that the abbreviated "help" flag can be parsed.
func TestConfigAbbreviatedHelpFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-h"}), "")
assert.True(t, c.ShowHelp)
}
// Ensures that the "version" flag can be parsed.
func TestConfigVersionFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-version"}), "")
assert.True(t, c.ShowVersion)
}
// Ensures that the "force config" flag can be parsed.
func TestConfigForceFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-force"}), "")
assert.True(t, c.Force)
}
// Ensures that the abbreviated "force config" flag can be parsed.
func TestConfigAbbreviatedForceFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-f"}), "")
assert.True(t, c.Force)
}
// Ensures that a the advertised url can be parsed from the environment.
// Ensures that the advertised url can be parsed from the environment.
func TestConfigAddrEnv(t *testing.T) {
withEnv("ETCD_ADDR", "127.0.0.1:4002", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
@ -156,14 +173,14 @@ func TestConfigAddrEnv(t *testing.T) {
})
}
// Ensures that a the advertised flag can be parsed.
// Ensures that the advertised flag can be parsed.
func TestConfigAddrFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "127.0.0.1:4002"}), "")
assert.Equal(t, c.Addr, "127.0.0.1:4002", "")
}
// Ensures that a the CA file can be parsed from the environment.
// Ensures that the CA file can be parsed from the environment.
func TestConfigCAFileEnv(t *testing.T) {
withEnv("ETCD_CA_FILE", "/tmp/file.ca", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
@ -171,14 +188,14 @@ func TestConfigCAFileEnv(t *testing.T) {
})
}
// Ensures that a the CA file flag can be parsed.
// Ensures that the CA file flag can be parsed.
func TestConfigCAFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-ca-file", "/tmp/file.ca"}), "")
assert.Equal(t, c.CAFile, "/tmp/file.ca", "")
}
// Ensures that a the CA file can be parsed from the environment.
// Ensures that the CA file can be parsed from the environment.
func TestConfigCertFileEnv(t *testing.T) {
withEnv("ETCD_CERT_FILE", "/tmp/file.cert", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
@ -186,14 +203,14 @@ func TestConfigCertFileEnv(t *testing.T) {
})
}
// Ensures that a the Cert file flag can be parsed.
// Ensures that the Cert file flag can be parsed.
func TestConfigCertFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-cert-file", "/tmp/file.cert"}), "")
assert.Equal(t, c.CertFile, "/tmp/file.cert", "")
}
// Ensures that a the Key file can be parsed from the environment.
// Ensures that the Key file can be parsed from the environment.
func TestConfigKeyFileEnv(t *testing.T) {
withEnv("ETCD_KEY_FILE", "/tmp/file.key", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
@ -201,14 +218,14 @@ func TestConfigKeyFileEnv(t *testing.T) {
})
}
// Ensures that a the Key file flag can be parsed.
// Ensures that the Key file flag can be parsed.
func TestConfigKeyFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-key-file", "/tmp/file.key"}), "")
assert.Equal(t, c.KeyFile, "/tmp/file.key", "")
}
// Ensures that a the Listen Host can be parsed from the environment.
// Ensures that the Listen Host can be parsed from the environment.
func TestConfigBindAddrEnv(t *testing.T) {
withEnv("ETCD_BIND_ADDR", "127.0.0.1:4003", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
@ -216,36 +233,75 @@ func TestConfigBindAddrEnv(t *testing.T) {
})
}
// Ensures that a the Listen Host file flag can be parsed.
// Ensures that the Listen Host file flag can be parsed.
func TestConfigBindAddrFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-bind-addr", "127.0.0.1:4003"}), "")
assert.Equal(t, c.BindAddr, "127.0.0.1:4003", "")
}
// Ensures that a the Listen Host port overrides the advertised port
// Ensures that the Listen Host port overrides the advertised port
func TestConfigBindAddrOverride(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "127.0.0.1:4009", "-bind-addr", "127.0.0.1:4010"}), "")
assert.Nil(t, c.Sanitize())
assert.Equal(t, c.BindAddr, "127.0.0.1:4010", "")
}
// Ensures that a the Listen Host inherits its port from the advertised addr
// Ensures that the Listen Host port overrides the advertised port
func TestConfigBindIPv6AddrOverride(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "[::1]:4009", "-bind-addr", "[::1]:4010"}), "")
assert.Nil(t, c.Sanitize())
assert.Equal(t, c.BindAddr, "[::1]:4010", "")
}
// Ensures that the Listen Host port overrides the advertised port
func TestConfigBindIPv6WithZoneAddrOverride(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "[::1%25lo]:4009", "-bind-addr", "[::1%25lo]:4010"}), "")
assert.Nil(t, c.Sanitize())
assert.Equal(t, c.BindAddr, "[::1%25lo]:4010", "")
}
// Ensures that the Listen Host inherits its port from the advertised addr
func TestConfigBindAddrInheritPort(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "127.0.0.1:4009", "-bind-addr", "127.0.0.1"}), "")
assert.Nil(t, c.Sanitize())
assert.Equal(t, c.BindAddr, "127.0.0.1:4009", "")
}
// Ensures that the Listen Host inherits its port from the advertised addr
func TestConfigBindIPv6AddrInheritPort(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "[::1]:4009", "-bind-addr", "::1"}), "")
assert.Nil(t, c.Sanitize())
assert.Equal(t, c.BindAddr, "[::1]:4009", "")
}
// Ensures that the Listen Host inherits its port from the advertised addr
func TestConfigBindIPv6WithZoneAddrInheritPort(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "[::1%25lo]:4009", "-bind-addr", "::1%25lo"}), "")
assert.Nil(t, c.Sanitize())
assert.Equal(t, c.BindAddr, "[::1%25lo]:4009", "")
}
// Ensures that a port only argument errors out
func TestConfigBindAddrErrorOnNoHost(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "127.0.0.1:4009", "-bind-addr", ":4010"}), "")
assert.Error(t, c.Sanitize())
}
// Ensures that a bad IPv6 address will raise an error
func TestConfigBindAddrErrorOnBadIPv6Addr(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-addr", "[::1%lo]:4009"}), "")
assert.Error(t, c.Sanitize())
}
// Ensures that the peers can be parsed from the environment.
func TestConfigPeersEnv(t *testing.T) {
withEnv("ETCD_PEERS", "coreos.com:4001,coreos.com:4002", func(c *Config) {
@ -254,9 +310,9 @@ func TestConfigPeersEnv(t *testing.T) {
})
}
// Ensures that a the Peers flag can be parsed.
// Ensures that the Peers flag can be parsed.
func TestConfigPeersFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peers", "coreos.com:4001,coreos.com:4002"}), "")
assert.Equal(t, c.Peers, []string{"coreos.com:4001", "coreos.com:4002"}, "")
}
@ -269,28 +325,13 @@ func TestConfigPeersFileEnv(t *testing.T) {
})
}
// Ensures that a the Peers File flag can be parsed.
// Ensures that the Peers File flag can be parsed.
func TestConfigPeersFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peers-file", "/tmp/peers"}), "")
assert.Equal(t, c.PeersFile, "/tmp/peers", "")
}
// Ensures that the Max Cluster Size can be parsed from the environment.
func TestConfigMaxClusterSizeEnv(t *testing.T) {
withEnv("ETCD_MAX_CLUSTER_SIZE", "5", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
assert.Equal(t, c.MaxClusterSize, 5, "")
})
}
// Ensures that a the Max Cluster Size flag can be parsed.
func TestConfigMaxClusterSizeFlag(t *testing.T) {
c := NewConfig()
assert.Nil(t, c.LoadFlags([]string{"-max-cluster-size", "5"}), "")
assert.Equal(t, c.MaxClusterSize, 5, "")
}
// Ensures that the Max Result Buffer can be parsed from the environment.
func TestConfigMaxResultBufferEnv(t *testing.T) {
withEnv("ETCD_MAX_RESULT_BUFFER", "512", func(c *Config) {
@ -299,9 +340,9 @@ func TestConfigMaxResultBufferEnv(t *testing.T) {
})
}
// Ensures that a the Max Result Buffer flag can be parsed.
// Ensures that the Max Result Buffer flag can be parsed.
func TestConfigMaxResultBufferFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-max-result-buffer", "512"}), "")
assert.Equal(t, c.MaxResultBuffer, 512, "")
}
@ -314,9 +355,9 @@ func TestConfigMaxRetryAttemptsEnv(t *testing.T) {
})
}
// Ensures that a the Max Retry Attempts flag can be parsed.
// Ensures that the Max Retry Attempts flag can be parsed.
func TestConfigMaxRetryAttemptsFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-max-retry-attempts", "10"}), "")
assert.Equal(t, c.MaxRetryAttempts, 10, "")
}
@ -329,16 +370,16 @@ func TestConfigNameEnv(t *testing.T) {
})
}
// Ensures that a the Name flag can be parsed.
// Ensures that the Name flag can be parsed.
func TestConfigNameFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-name", "test-name"}), "")
assert.Equal(t, c.Name, "test-name", "")
}
// Ensures that a Name gets guessed if not specified
func TestConfigNameGuess(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{}), "")
assert.Nil(t, c.Sanitize())
name, _ := os.Hostname()
@ -347,7 +388,7 @@ func TestConfigNameGuess(t *testing.T) {
// Ensures that a DataDir gets guessed if not specified
func TestConfigDataDirGuess(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{}), "")
assert.Nil(t, c.Sanitize())
name, _ := os.Hostname()
@ -362,9 +403,9 @@ func TestConfigSnapshotEnv(t *testing.T) {
})
}
// Ensures that a the Snapshot flag can be parsed.
// Ensures that the Snapshot flag can be parsed.
func TestConfigSnapshotFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-snapshot"}), "")
assert.Equal(t, c.Snapshot, true, "")
}
@ -377,9 +418,9 @@ func TestConfigVerboseEnv(t *testing.T) {
})
}
// Ensures that a the Verbose flag can be parsed.
// Ensures that the Verbose flag can be parsed.
func TestConfigVerboseFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-v"}), "")
assert.Equal(t, c.Verbose, true, "")
}
@ -392,9 +433,9 @@ func TestConfigVeryVerboseEnv(t *testing.T) {
})
}
// Ensures that a the Very Verbose flag can be parsed.
// Ensures that the Very Verbose flag can be parsed.
func TestConfigVeryVerboseFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-vv"}), "")
assert.Equal(t, c.VeryVerbose, true, "")
}
@ -407,9 +448,9 @@ func TestConfigPeerAddrEnv(t *testing.T) {
})
}
// Ensures that a the Peer Advertised URL flag can be parsed.
// Ensures that the Peer Advertised URL flag can be parsed.
func TestConfigPeerAddrFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peer-addr", "localhost:7002"}), "")
assert.Equal(t, c.Peer.Addr, "localhost:7002", "")
}
@ -422,9 +463,9 @@ func TestConfigPeerCAFileEnv(t *testing.T) {
})
}
// Ensures that a the Peer CA file flag can be parsed.
// Ensures that the Peer CA file flag can be parsed.
func TestConfigPeerCAFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peer-ca-file", "/tmp/peer/file.ca"}), "")
assert.Equal(t, c.Peer.CAFile, "/tmp/peer/file.ca", "")
}
@ -437,9 +478,9 @@ func TestConfigPeerCertFileEnv(t *testing.T) {
})
}
// Ensures that a the Cert file flag can be parsed.
// Ensures that the Cert file flag can be parsed.
func TestConfigPeerCertFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peer-cert-file", "/tmp/peer/file.cert"}), "")
assert.Equal(t, c.Peer.CertFile, "/tmp/peer/file.cert", "")
}
@ -452,9 +493,9 @@ func TestConfigPeerKeyFileEnv(t *testing.T) {
})
}
// Ensures that a the Peer Key file flag can be parsed.
// Ensures that the Peer Key file flag can be parsed.
func TestConfigPeerKeyFileFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peer-key-file", "/tmp/peer/file.key"}), "")
assert.Equal(t, c.Peer.KeyFile, "/tmp/peer/file.key", "")
}
@ -469,29 +510,74 @@ func TestConfigPeerBindAddrEnv(t *testing.T) {
// Ensures that a bad flag returns an error.
func TestConfigBadFlag(t *testing.T) {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-no-such-flag"})
assert.Error(t, err)
assert.Equal(t, err.Error(), `flag provided but not defined: -no-such-flag`)
}
// Ensures that a the Peer Listen Host file flag can be parsed.
// Ensures that the Peer Listen Host file flag can be parsed.
func TestConfigPeerBindAddrFlag(t *testing.T) {
c := NewConfig()
c := New()
assert.Nil(t, c.LoadFlags([]string{"-peer-bind-addr", "127.0.0.1:4003"}), "")
assert.Equal(t, c.Peer.BindAddr, "127.0.0.1:4003", "")
}
// Ensures that the cluster active size can be parsed from the environment.
func TestConfigClusterActiveSizeEnv(t *testing.T) {
withEnv("ETCD_CLUSTER_ACTIVE_SIZE", "5", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
assert.Equal(t, c.Cluster.ActiveSize, 5, "")
})
}
// Ensures that the cluster active size flag can be parsed.
func TestConfigClusterActiveSizeFlag(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-cluster-active-size", "5"}), "")
assert.Equal(t, c.Cluster.ActiveSize, 5, "")
}
// Ensures that the cluster remove delay can be parsed from the environment.
func TestConfigClusterRemoveDelayEnv(t *testing.T) {
withEnv("ETCD_CLUSTER_REMOVE_DELAY", "100", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
assert.Equal(t, c.Cluster.RemoveDelay, 100.0, "")
})
}
// Ensures that the cluster remove delay flag can be parsed.
func TestConfigClusterRemoveDelayFlag(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-cluster-remove-delay", "100"}), "")
assert.Equal(t, c.Cluster.RemoveDelay, 100.0, "")
}
// Ensures that the cluster sync interval can be parsed from the environment.
func TestConfigClusterSyncIntervalEnv(t *testing.T) {
withEnv("ETCD_CLUSTER_SYNC_INTERVAL", "10", func(c *Config) {
assert.Nil(t, c.LoadEnv(), "")
assert.Equal(t, c.Cluster.SyncInterval, 10.0, "")
})
}
// Ensures that the cluster sync interval flag can be parsed.
func TestConfigClusterSyncIntervalFlag(t *testing.T) {
c := New()
assert.Nil(t, c.LoadFlags([]string{"-cluster-sync-interval", "10"}), "")
assert.Equal(t, c.Cluster.SyncInterval, 10.0, "")
}
// Ensures that a system config field is overridden by a custom config field.
func TestConfigCustomConfigOverrideSystemConfig(t *testing.T) {
system := `addr = "127.0.0.1:5000"`
custom := `addr = "127.0.0.1:6000"`
withTempFile(system, func(p1 string) {
withTempFile(custom, func(p2 string) {
c := NewConfig()
c := New()
c.SystemPath = p1
assert.Nil(t, c.Load([]string{"-config", p2}), "")
assert.Equal(t, c.Addr, "http://127.0.0.1:6000", "")
assert.Equal(t, c.Addr, "127.0.0.1:6000", "")
})
})
}
@ -503,10 +589,10 @@ func TestConfigEnvVarOverrideCustomConfig(t *testing.T) {
custom := `[peer]` + "\n" + `advertised_url = "127.0.0.1:9000"`
withTempFile(custom, func(path string) {
c := NewConfig()
c := New()
c.SystemPath = ""
assert.Nil(t, c.Load([]string{"-config", path}), "")
assert.Equal(t, c.Peer.Addr, "http://127.0.0.1:8000", "")
assert.Equal(t, c.Peer.Addr, "127.0.0.1:8000", "")
})
}
@ -515,10 +601,10 @@ func TestConfigCLIArgsOverrideEnvVar(t *testing.T) {
os.Setenv("ETCD_ADDR", "127.0.0.1:1000")
defer os.Setenv("ETCD_ADDR", "")
c := NewConfig()
c := New()
c.SystemPath = ""
assert.Nil(t, c.Load([]string{"-addr", "127.0.0.1:2000"}), "")
assert.Equal(t, c.Addr, "http://127.0.0.1:2000", "")
assert.Equal(t, c.Addr, "127.0.0.1:2000", "")
}
//--------------------------------------
@ -527,162 +613,142 @@ func TestConfigCLIArgsOverrideEnvVar(t *testing.T) {
func TestConfigDeprecatedAddrFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-c", "127.0.0.1:4002"})
assert.NoError(t, err)
assert.Equal(t, c.Addr, "127.0.0.1:4002")
})
assert.Equal(t, stderr, "[deprecated] use -addr, not -c")
assert.Equal(t, stderr, "[deprecated] use -addr, not -c\n")
}
func TestConfigDeprecatedBindAddrFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-cl", "127.0.0.1:4003"})
assert.NoError(t, err)
assert.Equal(t, c.BindAddr, "127.0.0.1:4003", "")
})
assert.Equal(t, stderr, "[deprecated] use -bind-addr, not -cl", "")
assert.Equal(t, stderr, "[deprecated] use -bind-addr, not -cl\n", "")
}
func TestConfigDeprecatedCAFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-clientCAFile", "/tmp/file.ca"})
assert.NoError(t, err)
assert.Equal(t, c.CAFile, "/tmp/file.ca", "")
})
assert.Equal(t, stderr, "[deprecated] use -ca-file, not -clientCAFile", "")
assert.Equal(t, stderr, "[deprecated] use -ca-file, not -clientCAFile\n", "")
}
func TestConfigDeprecatedCertFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-clientCert", "/tmp/file.cert"})
assert.NoError(t, err)
assert.Equal(t, c.CertFile, "/tmp/file.cert", "")
})
assert.Equal(t, stderr, "[deprecated] use -cert-file, not -clientCert", "")
assert.Equal(t, stderr, "[deprecated] use -cert-file, not -clientCert\n", "")
}
func TestConfigDeprecatedKeyFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-clientKey", "/tmp/file.key"})
assert.NoError(t, err)
assert.Equal(t, c.KeyFile, "/tmp/file.key", "")
})
assert.Equal(t, stderr, "[deprecated] use -key-file, not -clientKey", "")
assert.Equal(t, stderr, "[deprecated] use -key-file, not -clientKey\n", "")
}
func TestConfigDeprecatedPeersFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-C", "coreos.com:4001,coreos.com:4002"})
assert.NoError(t, err)
assert.Equal(t, c.Peers, []string{"coreos.com:4001", "coreos.com:4002"}, "")
})
assert.Equal(t, stderr, "[deprecated] use -peers, not -C", "")
assert.Equal(t, stderr, "[deprecated] use -peers, not -C\n", "")
}
func TestConfigDeprecatedPeersFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-CF", "/tmp/machines"})
assert.NoError(t, err)
assert.Equal(t, c.PeersFile, "/tmp/machines", "")
})
assert.Equal(t, stderr, "[deprecated] use -peers-file, not -CF", "")
}
func TestConfigDeprecatedMaxClusterSizeFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
err := c.LoadFlags([]string{"-maxsize", "5"})
assert.NoError(t, err)
assert.Equal(t, c.MaxClusterSize, 5, "")
})
assert.Equal(t, stderr, "[deprecated] use -max-cluster-size, not -maxsize", "")
}
func TestConfigDeprecatedMaxResultBufferFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
err := c.LoadFlags([]string{"-m", "512"})
assert.NoError(t, err)
assert.Equal(t, c.MaxResultBuffer, 512, "")
})
assert.Equal(t, stderr, "[deprecated] use -max-result-buffer, not -m", "")
assert.Equal(t, stderr, "[deprecated] use -peers-file, not -CF\n", "")
}
func TestConfigDeprecatedMaxRetryAttemptsFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-r", "10"})
assert.NoError(t, err)
assert.Equal(t, c.MaxRetryAttempts, 10, "")
})
assert.Equal(t, stderr, "[deprecated] use -max-retry-attempts, not -r", "")
assert.Equal(t, stderr, "[deprecated] use -max-retry-attempts, not -r\n", "")
}
func TestConfigDeprecatedNameFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-n", "test-name"})
assert.NoError(t, err)
assert.Equal(t, c.Name, "test-name", "")
})
assert.Equal(t, stderr, "[deprecated] use -name, not -n", "")
assert.Equal(t, stderr, "[deprecated] use -name, not -n\n", "")
}
func TestConfigDeprecatedPeerAddrFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-s", "localhost:7002"})
assert.NoError(t, err)
assert.Equal(t, c.Peer.Addr, "localhost:7002", "")
})
assert.Equal(t, stderr, "[deprecated] use -peer-addr, not -s", "")
assert.Equal(t, stderr, "[deprecated] use -peer-addr, not -s\n", "")
}
func TestConfigDeprecatedPeerBindAddrFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-sl", "127.0.0.1:4003"})
assert.NoError(t, err)
assert.Equal(t, c.Peer.BindAddr, "127.0.0.1:4003", "")
})
assert.Equal(t, stderr, "[deprecated] use -peer-bind-addr, not -sl", "")
assert.Equal(t, stderr, "[deprecated] use -peer-bind-addr, not -sl\n", "")
}
func TestConfigDeprecatedPeerCAFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-serverCAFile", "/tmp/peer/file.ca"})
assert.NoError(t, err)
assert.Equal(t, c.Peer.CAFile, "/tmp/peer/file.ca", "")
})
assert.Equal(t, stderr, "[deprecated] use -peer-ca-file, not -serverCAFile", "")
assert.Equal(t, stderr, "[deprecated] use -peer-ca-file, not -serverCAFile\n", "")
}
func TestConfigDeprecatedPeerCertFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-serverCert", "/tmp/peer/file.cert"})
assert.NoError(t, err)
assert.Equal(t, c.Peer.CertFile, "/tmp/peer/file.cert", "")
})
assert.Equal(t, stderr, "[deprecated] use -peer-cert-file, not -serverCert", "")
assert.Equal(t, stderr, "[deprecated] use -peer-cert-file, not -serverCert\n", "")
}
func TestConfigDeprecatedPeerKeyFileFlag(t *testing.T) {
_, stderr := capture(func() {
c := NewConfig()
c := New()
err := c.LoadFlags([]string{"-serverKey", "/tmp/peer/file.key"})
assert.NoError(t, err)
assert.Equal(t, c.Peer.KeyFile, "/tmp/peer/file.key", "")
})
assert.Equal(t, stderr, "[deprecated] use -peer-key-file, not -serverKey", "")
assert.Equal(t, stderr, "[deprecated] use -peer-key-file, not -serverKey\n", "")
}
//--------------------------------------
@ -693,7 +759,7 @@ func TestConfigDeprecatedPeerKeyFileFlag(t *testing.T) {
func withEnv(key, value string, f func(c *Config)) {
os.Setenv(key, value)
defer os.Setenv(key, "")
c := NewConfig()
c := New()
f(c)
}

9
config/timeout.go Normal file
View File

@ -0,0 +1,9 @@
package config
const (
// The amount of time (in ms) to elapse without a heartbeat before becoming a candidate
defaultElectionTimeout = 200
// The frequency (in ms) by which heartbeats are sent to followers.
defaultHeartbeatInterval = 50
)

View File

@ -0,0 +1,9 @@
FROM stackbrew/ubuntu:raring
RUN apt-get update && apt-get install -y collectd
RUN adduser --system --group --no-create-home collectd
ADD collectd.conf /etc/collectd/collectd.conf.tmpl
ADD collectd-wrapper /bin/collectd-wrapper
RUN chown -R collectd:collectd /etc/collectd
CMD ["collectd-wrapper"]

20
contrib/collectd/README Normal file
View File

@ -0,0 +1,20 @@
We're going to use Docker to build a chroot env that can be run with systemd-nspawn since I cannot figure out how to run
a container using docker in the global network namespace.
1. Build the collectd image using docker
docker build -t collectd .
2. Run the container (since we have to run it to export it...)
COLLECTD_CONTAINER=`docker run -name collectd-tmp -d collectd`
3. Export then kill the container
docker export collectd-tmp > /tmp/collectd.tar
4. Kill the temporary container
docker kill $COLLECTD_CONTAINER
5. Unpack the tar archive
mkdir -p /tmp/collectd && tar -xvf /tmp/collectd.tar -C /tmp/collectd/
6. Run collectd with systemd-nspawn - replace the COLLECTD_* env vars with your parameters!
sudo systemd-run --unit collectd systemd-nspawn -D /tmp/collectd /bin/bash -c "COLLECTD_GRAPHITE_HOSTNAME=172.31.13.241 COLLECTD_LOCAL_HOSTNAME=node1 /bin/collectd-wrapper"

View File

@ -0,0 +1,16 @@
#!/bin/bash
cat /etc/collectd/collectd.conf.tmpl > /etc/collectd/collectd.conf
cat << EOF >> /etc/collectd/collectd.conf
Hostname "${COLLECTD_LOCAL_HOSTNAME}"
<Plugin write_graphite>
<Carbon>
Host "${COLLECTD_GRAPHITE_HOSTNAME}"
Port "2003"
</Carbon>
</Plugin>
EOF
collectd -C /etc/collectd/collectd.conf -f

View File

@ -0,0 +1,898 @@
# Config file for collectd(1).
#
# Some plugins need additional configuration and are disabled by default.
# Please read collectd.conf(5) for details.
#
# You should also read /usr/share/doc/collectd-core/README.Debian.plugins
# before enabling any more plugins.
#Hostname "localhost"
#FQDNLookup true
#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
#Interval 10
#Timeout 2
#ReadThreads 5
LoadPlugin logfile
#LoadPlugin syslog
<Plugin logfile>
LogLevel "info"
File STDOUT
Timestamp true
PrintSeverity false
</Plugin>
#<Plugin syslog>
# LogLevel info
#</Plugin>
#LoadPlugin amqp
#LoadPlugin apache
#LoadPlugin apcups
#LoadPlugin ascent
#LoadPlugin battery
#LoadPlugin bind
#LoadPlugin conntrack
#LoadPlugin contextswitch
LoadPlugin cpu
#LoadPlugin cpufreq
#LoadPlugin csv
#LoadPlugin curl
#LoadPlugin curl_json
#LoadPlugin curl_xml
#LoadPlugin dbi
LoadPlugin df
#LoadPlugin disk
#LoadPlugin dns
#LoadPlugin email
#LoadPlugin entropy
#LoadPlugin ethstat
#LoadPlugin exec
#LoadPlugin filecount
#LoadPlugin fscache
#LoadPlugin gmond
#LoadPlugin hddtemp
#LoadPlugin interface
#LoadPlugin ipmi
#LoadPlugin iptables
#LoadPlugin ipvs
#LoadPlugin irq
#LoadPlugin java
#LoadPlugin libvirt
#LoadPlugin load
#LoadPlugin madwifi
#LoadPlugin mbmon
#LoadPlugin md
#LoadPlugin memcachec
#LoadPlugin memcached
LoadPlugin memory
#LoadPlugin multimeter
#LoadPlugin mysql
#LoadPlugin netlink
#LoadPlugin network
#LoadPlugin nfs
#LoadPlugin nginx
#LoadPlugin notify_desktop
#LoadPlugin notify_email
#LoadPlugin ntpd
#LoadPlugin numa
#LoadPlugin nut
#LoadPlugin olsrd
#LoadPlugin openvpn
#<LoadPlugin perl>
# Globals true
#</LoadPlugin>
#LoadPlugin pinba
#LoadPlugin ping
#LoadPlugin postgresql
#LoadPlugin powerdns
#LoadPlugin processes
#LoadPlugin protocols
#<LoadPlugin python>
# Globals true
#</LoadPlugin>
#LoadPlugin rrdcached
#LoadPlugin rrdtool
#LoadPlugin sensors
#LoadPlugin serial
#LoadPlugin snmp
#LoadPlugin swap
#LoadPlugin table
#LoadPlugin tail
LoadPlugin tcpconns
#LoadPlugin teamspeak2
#LoadPlugin ted
#LoadPlugin thermal
#LoadPlugin tokyotyrant
#LoadPlugin unixsock
#LoadPlugin uptime
#LoadPlugin users
#LoadPlugin uuid
#LoadPlugin varnish
#LoadPlugin vmem
#LoadPlugin vserver
#LoadPlugin wireless
LoadPlugin write_graphite
#LoadPlugin write_http
#LoadPlugin write_mongodb
#<Plugin amqp>
# <Publish "name">
# Host "localhost"
# Port "5672"
# VHost "/"
# User "guest"
# Password "guest"
# Exchange "amq.fanout"
# RoutingKey "collectd"
# Persistent false
# StoreRates false
# </Publish>
#</Plugin>
#<Plugin apache>
# <Instance "foo">
# URL "http://localhost/server-status?auto"
# User "www-user"
# Password "secret"
# VerifyPeer false
# VerifyHost false
# CACert "/etc/ssl/ca.crt"
# Server "apache"
# </Instance>
#
# <Instance "bar">
# URL "http://some.domain.tld/status?auto"
# Host "some.domain.tld"
# Server "lighttpd"
# </Instance>
#</Plugin>
#<Plugin apcups>
# Host "localhost"
# Port "3551"
#</Plugin>
#<Plugin ascent>
# URL "http://localhost/ascent/status/"
# User "www-user"
# Password "secret"
# VerifyPeer false
# VerifyHost false
# CACert "/etc/ssl/ca.crt"
#</Plugin>
#<Plugin "bind">
# URL "http://localhost:8053/"
#
# ParseTime false
#
# OpCodes true
# QTypes true
# ServerStats true
# ZoneMaintStats true
# ResolverStats false
# MemoryStats true
#
# <View "_default">
# QTypes true
# ResolverStats true
# CacheRRSets true
#
# Zone "127.in-addr.arpa/IN"
# </View>
#</Plugin>
#<Plugin csv>
# DataDir "/var/lib/collectd/csv"
# StoreRates false
#</Plugin>
#<Plugin curl>
# <Page "stock_quotes">
# URL "http://finance.google.com/finance?q=NYSE%3AAMD"
# User "foo"
# Password "bar"
# VerifyPeer false
# VerifyHost false
# CACert "/etc/ssl/ca.crt"
# MeasureResponseTime false
# <Match>
# Regex "<span +class=\"pr\"[^>]*> *([0-9]*\\.[0-9]+) *</span>"
# DSType "GaugeAverage"
# Type "stock_value"
# Instance "AMD"
# </Match>
# </Page>
#</Plugin>
#<Plugin curl_json>
## See: http://wiki.apache.org/couchdb/Runtime_Statistics
# <URL "http://localhost:5984/_stats">
# Instance "httpd"
# <Key "httpd/requests/count">
# Type "http_requests"
# </Key>
#
# <Key "httpd_request_methods/*/count">
# Type "http_request_methods"
# </Key>
#
# <Key "httpd_status_codes/*/count">
# Type "http_response_codes"
# </Key>
# </URL>
## Database status metrics:
# <URL "http://localhost:5984/_all_dbs">
# Instance "dbs"
# <Key "*/doc_count">
# Type "gauge"
# </Key>
# <Key "*/doc_del_count">
# Type "counter"
# </Key>
# <Key "*/disk_size">
# Type "bytes"
# </Key>
# </URL>
#</Plugin>
#<Plugin "curl_xml">
# <URL "http://localhost/stats.xml">
# Host "my_host"
# Instance "some_instance"
# User "collectd"
# Password "thaiNg0I"
# VerifyPeer true
# VerifyHost true
# CACert "/path/to/ca.crt"
#
# <XPath "table[@id=\"magic_level\"]/tr">
# Type "magic_level"
# InstancePrefix "prefix-"
# InstanceFrom "td[1]"
# ValuesFrom "td[2]/span[@class=\"level\"]"
# </XPath>
# </URL>
#</Plugin>
#<Plugin dbi>
# <Query "num_of_customers">
# Statement "SELECT 'customers' AS c_key, COUNT(*) AS c_value \
# FROM customers_tbl"
# MinVersion 40102
# MaxVersion 50042
# <Result>
# Type "gauge"
# InstancePrefix "customer"
# InstancesFrom "c_key"
# ValuesFrom "c_value"
# </Result>
# </Query>
#
# <Database "customers_db">
# Driver "mysql"
# DriverOption "host" "localhost"
# DriverOption "username" "collectd"
# DriverOption "password" "secret"
# DriverOption "dbname" "custdb0"
# SelectDB "custdb0"
# Query "num_of_customers"
# Query "..."
# </Database>
#</Plugin>
#<Plugin df>
# Device "/dev/sda1"
# Device "192.168.0.2:/mnt/nfs"
# MountPoint "/home"
# FSType "ext3"
# IgnoreSelected false
# ReportByDevice false
# ReportReserved false
# ReportInodes false
#</Plugin>
#<Plugin disk>
# Disk "hda"
# Disk "/sda[23]/"
# IgnoreSelected false
#</Plugin>
#<Plugin dns>
# Interface "eth0"
# IgnoreSource "192.168.0.1"
# SelectNumericQueryTypes false
#</Plugin>
#<Plugin email>
# SocketFile "/var/run/collectd-email"
# SocketGroup "collectd"
# SocketPerms "0770"
# MaxConns 5
#</Plugin>
#<Plugin ethstat>
# Interface "eth0"
# Map "rx_csum_offload_errors" "if_rx_errors" "checksum_offload"
# Map "multicast" "if_multicast"
# MappedOnly false
#</Plugin>
#<Plugin exec>
# Exec user "/path/to/exec"
# Exec "user:group" "/path/to/exec"
# NotificationExec user "/path/to/exec"
#</Plugin>
#<Plugin filecount>
# <Directory "/path/to/dir">
# Instance "foodir"
# Name "*.conf"
# MTime "-5m"
# Size "+10k"
# Recursive true
# IncludeHidden false
# </Directory>
#</Plugin>
#<Plugin gmond>
# MCReceiveFrom "239.2.11.71" "8649"
#
# <Metric "swap_total">
# Type "swap"
# TypeInstance "total"
# DataSource "value"
# </Metric>
#
# <Metric "swap_free">
# Type "swap"
# TypeInstance "free"
# DataSource "value"
# </Metric>
#</Plugin>
#<Plugin hddtemp>
# Host "127.0.0.1"
# Port 7634
#</Plugin>
#<Plugin interface>
# Interface "eth0"
# IgnoreSelected false
#</Plugin>
#<Plugin ipmi>
# Sensor "some_sensor"
# Sensor "another_one"
# IgnoreSelected false
# NotifySensorAdd false
# NotifySensorRemove true
# NotifySensorNotPresent false
#</Plugin>
#<Plugin iptables>
# Chain "table" "chain"
#</Plugin>
#<Plugin irq>
# Irq 7
# Irq 8
# Irq 9
# IgnoreSelected true
#</Plugin>
#<Plugin java>
# JVMArg "-verbose:jni"
# JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar"
#
# LoadPlugin "org.collectd.java.GenericJMX"
# <Plugin "GenericJMX">
# # See /usr/share/doc/collectd/examples/GenericJMX.conf
# # for an example config.
# </Plugin>
#</Plugin>
#<Plugin libvirt>
# Connection "xen:///"
# RefreshInterval 60
# Domain "name"
# BlockDevice "name:device"
# InterfaceDevice "name:device"
# IgnoreSelected false
# HostnameFormat name
# InterfaceFormat name
#</Plugin>
#<Plugin madwifi>
# Interface "wlan0"
# IgnoreSelected false
# Source "SysFS"
# WatchSet "None"
# WatchAdd "node_octets"
# WatchAdd "node_rssi"
# WatchAdd "is_rx_acl"
# WatchAdd "is_scan_active"
#</Plugin>
#<Plugin mbmon>
# Host "127.0.0.1"
# Port 411
#</Plugin>
#<Plugin md>
# Device "/dev/md0"
# IgnoreSelected false
#</Plugin>
#<Plugin memcachec>
# <Page "plugin_instance">
# Server "localhost"
# Key "page_key"
# <Match>
# Regex "(\\d+) bytes sent"
# ExcludeRegex "<lines to be excluded>"
# DSType CounterAdd
# Type "ipt_octets"
# Instance "type_instance"
# </Match>
# </Page>
#</Plugin>
#<Plugin memcached>
# Socket "/var/run/memcached.sock"
# or:
# Host "127.0.0.1"
# Port "11211"
#</Plugin>
#<Plugin mysql>
# <Database db_name>
# Host "database.serv.er"
# Port "3306"
# User "db_user"
# Password "secret"
# Database "db_name"
# MasterStats true
# </Database>
#
# <Database db_name2>
# Host "localhost"
# Socket "/var/run/mysql/mysqld.sock"
# SlaveStats true
# SlaveNotifications true
# </Database>
#</Plugin>
#<Plugin netlink>
# Interface "All"
# VerboseInterface "All"
# QDisc "eth0" "pfifo_fast-1:0"
# Class "ppp0" "htb-1:10"
# Filter "ppp0" "u32-1:0"
# IgnoreSelected false
#</Plugin>
#<Plugin network>
# # client setup:
# Server "ff18::efc0:4a42" "25826"
# <Server "239.192.74.66" "25826">
# SecurityLevel Encrypt
# Username "user"
# Password "secret"
# Interface "eth0"
# </Server>
# TimeToLive "128"
#
# # server setup:
# Listen "0.0.0.0" "25826"
# <Listen "239.192.74.66" "25826">
# SecurityLevel Sign
# AuthFile "/etc/collectd/passwd"
# Interface "eth0"
# </Listen>
# MaxPacketSize 1024
#
# # proxy setup (client and server as above):
# Forward true
#
# # statistics about the network plugin itself
# ReportStats false
#
# # "garbage collection"
# CacheFlush 1800
#</Plugin>
#<Plugin nginx>
# URL "http://localhost/status?auto"
# User "www-user"
# Password "secret"
# VerifyPeer false
# VerifyHost false
# CACert "/etc/ssl/ca.crt"
#</Plugin>
#<Plugin notify_desktop>
# OkayTimeout 1000
# WarningTimeout 5000
# FailureTimeout 0
#</Plugin>
#<Plugin notify_email>
# SMTPServer "localhost"
# SMTPPort 25
# SMTPUser "my-username"
# SMTPPassword "my-password"
# From "collectd@main0server.com"
# # <WARNING/FAILURE/OK> on <hostname>.
# # Beware! Do not use not more than two placeholders (%)!
# Subject "[collectd] %s on %s!"
# Recipient "email1@domain1.net"
# Recipient "email2@domain2.com"
#</Plugin>
#<Plugin ntpd>
# Host "localhost"
# Port 123
# ReverseLookups false
#</Plugin>
#<Plugin nut>
# UPS "upsname@hostname:port"
#</Plugin>
#<Plugin olsrd>
# Host "127.0.0.1"
# Port "2006"
# CollectLinks "Summary"
# CollectRoutes "Summary"
# CollectTopology "Summary"
#</Plugin>
#<Plugin openvpn>
# StatusFile "/etc/openvpn/openvpn-status.log"
# ImprovedNamingSchema false
# CollectCompression true
# CollectIndividualUsers true
# CollectUserCount false
#</Plugin>
#<Plugin perl>
# IncludeDir "/my/include/path"
# BaseName "Collectd::Plugins"
# EnableDebugger ""
# LoadPlugin Monitorus
# LoadPlugin OpenVZ
#
# <Plugin foo>
# Foo "Bar"
# Qux "Baz"
# </Plugin>
#</Plugin>
#<Plugin pinba>
# Address "::0"
# Port "30002"
# <View "name">
# Host "host name"
# Server "server name"
# Script "script name"
# <View>
#</Plugin>
#<Plugin ping>
# Host "host.foo.bar"
# Host "host.baz.qux"
# Interval 1.0
# Timeout 0.9
# TTL 255
# SourceAddress "1.2.3.4"
# Device "eth0"
# MaxMissed -1
#</Plugin>
#<Plugin postgresql>
# <Query magic>
# Statement "SELECT magic FROM wizard WHERE host = $1;"
# Param hostname
#
# <Result>
# Type gauge
# InstancePrefix "magic"
# ValuesFrom "magic"
# </Result>
# </Query>
#
# <Query rt36_tickets>
# Statement "SELECT COUNT(type) AS count, type \
# FROM (SELECT CASE \
# WHEN resolved = 'epoch' THEN 'open' \
# ELSE 'resolved' END AS type \
# FROM tickets) type \
# GROUP BY type;"
#
# <Result>
# Type counter
# InstancePrefix "rt36_tickets"
# InstancesFrom "type"
# ValuesFrom "count"
# </Result>
# </Query>
#
# <Database foo>
# Host "hostname"
# Port 5432
# User "username"
# Password "secret"
#
# SSLMode "prefer"
# KRBSrvName "kerberos_service_name"
#
# Query magic
# </Database>
#
# <Database bar>
# Interval 60
# Service "service_name"
#
# Query backend # predefined
# Query rt36_tickets
# </Database>
#</Plugin>
#<Plugin powerdns>
# <Server "server_name">
# Collect "latency"
# Collect "udp-answers" "udp-queries"
# Socket "/var/run/pdns.controlsocket"
# </Server>
# <Recursor "recursor_name">
# Collect "questions"
# Collect "cache-hits" "cache-misses"
# Socket "/var/run/pdns_recursor.controlsocket"
# </Recursor>
# LocalSocket "/opt/collectd/var/run/collectd-powerdns"
#</Plugin>
#<Plugin processes>
# Process "name"
# ProcessMatch "foobar" "/usr/bin/perl foobar\\.pl.*"
#</Plugin>
#<Plugin protocols>
# Value "/^Tcp:/"
# IgnoreSelected false
#</Plugin>
#<Plugin python>
# ModulePath "/path/to/your/python/modules"
# LogTraces true
# Interactive true
# Import "spam"
#
# <Module spam>
# spam "wonderful" "lovely"
# </Module>
#</Plugin>
#<Plugin rrdcached>
# DaemonAddress "unix:/var/run/rrdcached.sock"
# DataDir "/var/lib/rrdcached/db/collectd"
# CreateFiles true
# CollectStatistics true
#</Plugin>
<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd"
# CacheTimeout 120
# CacheFlush 900
# WritesPerSecond 30
# RandomTimeout 0
#
# The following settings are rather advanced
# and should usually not be touched:
# StepSize 10
# HeartBeat 20
# RRARows 1200
# RRATimespan 158112000
# XFF 0.1
</Plugin>
#<Plugin sensors>
# SensorConfigFile "/etc/sensors3.conf"
# Sensor "it8712-isa-0290/temperature-temp1"
# Sensor "it8712-isa-0290/fanspeed-fan3"
# Sensor "it8712-isa-0290/voltage-in8"
# IgnoreSelected false
#</Plugin>
# See /usr/share/doc/collectd/examples/snmp-data.conf.gz for a
# comprehensive sample configuration.
#<Plugin snmp>
# <Data "powerplus_voltge_input">
# Type "voltage"
# Table false
# Instance "input_line1"
# Scale 0.1
# Values "SNMPv2-SMI::enterprises.6050.5.4.1.1.2.1"
# </Data>
# <Data "hr_users">
# Type "users"
# Table false
# Instance ""
# Shift -1
# Values "HOST-RESOURCES-MIB::hrSystemNumUsers.0"
# </Data>
# <Data "std_traffic">
# Type "if_octets"
# Table true
# InstancePrefix "traffic"
# Instance "IF-MIB::ifDescr"
# Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
# </Data>
#
# <Host "some.switch.mydomain.org">
# Address "192.168.0.2"
# Version 1
# Community "community_string"
# Collect "std_traffic"
# Inverval 120
# </Host>
# <Host "some.server.mydomain.org">
# Address "192.168.0.42"
# Version 2
# Community "another_string"
# Collect "std_traffic" "hr_users"
# </Host>
# <Host "some.ups.mydomain.org">
# Address "192.168.0.3"
# Version 1
# Community "more_communities"
# Collect "powerplus_voltge_input"
# Interval 300
# </Host>
#</Plugin>
#<Plugin swap>
# ReportByDevice false
#</Plugin>
#<Plugin table>
# <Table "/proc/slabinfo">
# Instance "slabinfo"
# Separator " "
# <Result>
# Type gauge
# InstancePrefix "active_objs"
# InstancesFrom 0
# ValuesFrom 1
# </Result>
# <Result>
# Type gauge
# InstancePrefix "objperslab"
# InstancesFrom 0
# ValuesFrom 4
# </Result>
# </Table>
#</Plugin>
#<Plugin "tail">
# <File "/var/log/exim4/mainlog">
# Instance "exim"
# <Match>
# Regex "S=([1-9][0-9]*)"
# DSType "CounterAdd"
# Type "ipt_bytes"
# Instance "total"
# </Match>
# <Match>
# Regex "\\<R=local_user\\>"
# ExcludeRegex "\\<R=local_user\\>.*mail_spool defer"
# DSType "CounterInc"
# Type "counter"
# Instance "local_user"
# </Match>
# </File>
#</Plugin>
<Plugin tcpconns>
LocalPort "4001"
LocalPort "7001"
</Plugin>
#<Plugin teamspeak2>
# Host "127.0.0.1"
# Port "51234"
# Server "8767"
#</Plugin>
#<Plugin ted>
# Device "/dev/ttyUSB0"
# Retries 0
#</Plugin>
#<Plugin thermal>
# ForceUseProcfs false
# Device "THRM"
# IgnoreSelected false
#</Plugin>
#<Plugin tokyotyrant>
# Host "localhost"
# Port "1978"
#</Plugin>
#<Plugin unixsock>
# SocketFile "/var/run/collectd-unixsock"
# SocketGroup "collectd"
# SocketPerms "0660"
# DeleteSocket false
#</Plugin>
#<Plugin uuid>
# UUIDFile "/etc/uuid"
#</Plugin>
#<Plugin varnish>
# <Instance>
# CollectCache true
# CollectBackend true
# CollectConnections true
# CollectSHM true
# CollectESI false
# CollectFetch false
# CollectHCB false
# CollectSMA false
# CollectSMS false
# CollectSM false
# CollectTotals false
# CollectWorkers false
# </Instance>
#
# <Instance "myinstance">
# CollectCache true
# </Instance>
#</Plugin>
#<Plugin vmem>
# Verbose false
#</Plugin>
#<Plugin write_graphite>
# <Carbon>
# Host "127.0.01"
# Port "2003"
# Prefix "collectd"
# Postfix "collectd"
# StoreRates false
# AlwaysAppendDS false
# EscapeCharacter "_"
# </Carbon>
#</Plugin>
#<Plugin write_http>
# <URL "http://example.com/collectd-post">
# User "collectd"
# Password "secret"
# VerifyPeer true
# VerifyHost true
# CACert "/etc/ssl/ca.crt"
# Format "Command"
# StoreRates false
# </URL>
#</Plugin>
#<Plugin write_mongodb>
# <Node "example">
# Host "localhost"
# Port "27017"
# Timeout 1000
# StoreRates false
# <Node>
#</Plugin>
Include "/etc/collectd/filters.conf"
Include "/etc/collectd/thresholds.conf"

View File

@ -0,0 +1,31 @@
from stackbrew/ubuntu:precise
run echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
run apt-get -y update
# Install required packages
run apt-get -y install python-cairo python-django python-twisted python-django-tagging python-simplejson python-pysqlite2 python-support python-pip gunicorn supervisor nginx-light
run pip install whisper
run pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" carbon
run pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/webapp" graphite-web
# Add system service config
add ./nginx.conf /etc/nginx/nginx.conf
add ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Add graphite config
add ./initial_data.json /var/lib/graphite/webapp/graphite/initial_data.json
add ./local_settings.py /var/lib/graphite/webapp/graphite/local_settings.py
add ./carbon.conf /var/lib/graphite/conf/carbon.conf
add ./storage-schemas.conf /var/lib/graphite/conf/storage-schemas.conf
run mkdir -p /var/lib/graphite/storage/whisper
run touch /var/lib/graphite/storage/graphite.db /var/lib/graphite/storage/index
run chown -R www-data /var/lib/graphite/storage
run chmod 0775 /var/lib/graphite/storage /var/lib/graphite/storage/whisper
run chmod 0664 /var/lib/graphite/storage/graphite.db
run cd /var/lib/graphite/webapp/graphite && python manage.py syncdb --noinput
expose :80
expose :2003
cmd ["/usr/bin/supervisord"]

7
contrib/graphite/README Normal file
View File

@ -0,0 +1,7 @@
Running graphite under Docker is straightforward:
1. Build the graphite image using Docker
docker build -t graphite .
2. Run a graphite container. Be sure to replace the $IP field with the IP address at which you wish to expose your graphite web service.
docker run -p $IP:8080:80 -p $IP:2003:2003 -d graphite

View File

@ -0,0 +1,62 @@
[cache]
LOCAL_DATA_DIR = /var/lib/graphite/storage/whisper/
# Specify the user to drop privileges to
# If this is blank carbon runs as the user that invokes it
# This user must have write access to the local data directory
USER =
# Limit the size of the cache to avoid swapping or becoming CPU bound.
# Sorts and serving cache queries gets more expensive as the cache grows.
# Use the value "inf" (infinity) for an unlimited cache size.
MAX_CACHE_SIZE = inf
# Limits the number of whisper update_many() calls per second, which effectively
# means the number of write requests sent to the disk. This is intended to
# prevent over-utilizing the disk and thus starving the rest of the system.
# When the rate of required updates exceeds this, then carbon's caching will
# take effect and increase the overall throughput accordingly.
MAX_UPDATES_PER_SECOND = 1000
# Softly limits the number of whisper files that get created each minute.
# Setting this value low (like at 50) is a good way to ensure your graphite
# system will not be adversely impacted when a bunch of new metrics are
# sent to it. The trade off is that it will take much longer for those metrics'
# database files to all get created and thus longer until the data becomes usable.
# Setting this value high (like "inf" for infinity) will cause graphite to create
# the files quickly but at the risk of slowing I/O down considerably for a while.
MAX_CREATES_PER_MINUTE = inf
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
#PICKLE_RECEIVER_INTERFACE = 0.0.0.0
#PICKLE_RECEIVER_PORT = 2004
#CACHE_QUERY_INTERFACE = 0.0.0.0
#CACHE_QUERY_PORT = 7002
LOG_UPDATES = False
# Enable AMQP if you want to receve metrics using an amqp broker
# ENABLE_AMQP = False
# Verbose means a line will be logged for every metric received
# useful for testing
# AMQP_VERBOSE = False
# AMQP_HOST = localhost
# AMQP_PORT = 5672
# AMQP_VHOST = /
# AMQP_USER = guest
# AMQP_PASSWORD = guest
# AMQP_EXCHANGE = graphite
# Patterns for all of the metrics this machine will store. Read more at
# http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings
#
# Example: store all sales, linux servers, and utilization metrics
# BIND_PATTERNS = sales.#, servers.linux.#, #.utilization
#
# Example: store everything
# BIND_PATTERNS = #

View File

@ -0,0 +1,20 @@
[
{
"pk": 1,
"model": "auth.user",
"fields": {
"username": "admin",
"first_name": "",
"last_name": "",
"is_active": true,
"is_superuser": true,
"is_staff": true,
"last_login": "2011-09-20 17:02:14",
"groups": [],
"user_permissions": [],
"password": "sha1$1b11b$edeb0a67a9622f1f2cfeabf9188a711f5ac7d236",
"email": "root@example.com",
"date_joined": "2011-09-20 17:02:14"
}
}
]

View File

@ -0,0 +1 @@
TIME_ZONE = 'UTC'

View File

@ -0,0 +1,69 @@
daemon off;
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 32;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
server {
listen 80 default_server;
server_name _;
open_log_file_cache max=1000 inactive=20s min_uses=2 valid=1m;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Host $host;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, OPTIONS";
add_header Access-Control-Allow-Headers "origin, authorization, accept";
location /content {
alias /var/lib/graphite/webapp/content;
}
location /media {
alias /usr/share/pyshared/django/contrib/admin/media;
}
}
}

View File

@ -0,0 +1,7 @@
[carbon]
pattern = ^carbon\..*
retentions = 1m:31d,10m:1y,1h:5y
[default]
pattern = .*
retentions = 10s:8d,1m:31d,10m:1y,1h:5y

View File

@ -0,0 +1,25 @@
[supervisord]
nodaemon = true
environment = GRAPHITE_STORAGE_DIR='/var/lib/graphite/storage',GRAPHITE_CONF_DIR='/var/lib/graphite/conf'
[program:nginx]
command = /usr/sbin/nginx
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
[program:carbon-cache]
user = www-data
command = /var/lib/graphite/bin/carbon-cache.py --debug start
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
[program:graphite-webapp]
user = www-data
directory = /var/lib/graphite/webapp
environment = PYTHONPATH='/var/lib/graphite/webapp'
command = /usr/bin/gunicorn_django -b127.0.0.1:8000 -w2 graphite/settings.py
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true

148
discovery/discovery.go Normal file
View File

@ -0,0 +1,148 @@
package discovery
import (
"errors"
"fmt"
"net/url"
"path"
"strings"
"time"
etcdErr "github.com/coreos/etcd/error"
"github.com/coreos/etcd/log"
"github.com/coreos/etcd/third_party/github.com/coreos/go-etcd/etcd"
)
const (
stateKey = "_state"
startedState = "started"
defaultTTL = 604800 // One week TTL
)
type Discoverer struct {
client *etcd.Client
name string
peer string
prefix string
discoveryURL string
}
var defaultDiscoverer *Discoverer
func init() {
defaultDiscoverer = &Discoverer{}
}
func (d *Discoverer) Do(discoveryURL string, name string, peer string, closeChan <-chan bool, startRoutine func(func())) (peers []string, err error) {
d.name = name
d.peer = peer
d.discoveryURL = discoveryURL
u, err := url.Parse(discoveryURL)
if err != nil {
return
}
// prefix is prepended to all keys for this discovery
d.prefix = strings.TrimPrefix(u.Path, "/v2/keys/")
// keep the old path in case we need to set the KeyPrefix below
oldPath := u.Path
u.Path = ""
// Connect to a scheme://host not a full URL with path
log.Infof("Discovery via %s using prefix %s.", u.String(), d.prefix)
d.client = etcd.NewClient([]string{u.String()})
if !strings.HasPrefix(oldPath, "/v2/keys") {
d.client.SetKeyPrefix("")
}
// Register this machine first and announce that we are a member of
// this cluster
err = d.heartbeat()
if err != nil {
return
}
// Start the very slow heartbeat to the cluster now in anticipation
// that everything is going to go alright now
startRoutine(func() { d.startHeartbeat(closeChan) })
// Attempt to take the leadership role, if there is no error we are it!
resp, err := d.client.Create(path.Join(d.prefix, stateKey), startedState, 0)
// Bail out on unexpected errors
if err != nil {
if clientErr, ok := err.(*etcd.EtcdError); !ok || clientErr.ErrorCode != etcdErr.EcodeNodeExist {
return nil, err
}
}
// If we got a response then the CAS was successful, we are leader
if resp != nil && resp.Node.Value == startedState {
// We are the leader, we have no peers
log.Infof("Discovery _state was empty, so this machine is the initial leader.")
return nil, nil
}
// Fall through to finding the other discovery peers
return d.findPeers()
}
func (d *Discoverer) findPeers() (peers []string, err error) {
resp, err := d.client.Get(path.Join(d.prefix), false, true)
if err != nil {
return nil, err
}
node := resp.Node
if node == nil {
return nil, fmt.Errorf("%s key doesn't exist.", d.prefix)
}
for _, n := range node.Nodes {
// Skip our own entry in the list, there is no point
if strings.HasSuffix(n.Key, "/"+d.name) {
continue
}
peers = append(peers, n.Value)
}
if len(peers) == 0 {
return nil, errors.New("Discovery found an initialized cluster but no reachable peers are registered.")
}
log.Infof("Discovery found peers %v", peers)
return
}
func (d *Discoverer) startHeartbeat(closeChan <-chan bool) {
// In case of errors we should attempt to heartbeat fairly frequently
heartbeatInterval := defaultTTL / 8
ticker := time.NewTicker(time.Second * time.Duration(heartbeatInterval))
defer ticker.Stop()
for {
select {
case <-ticker.C:
err := d.heartbeat()
if err != nil {
log.Warnf("Discovery heartbeat failed: %v", err)
}
case <-closeChan:
return
}
}
}
func (d *Discoverer) heartbeat() error {
_, err := d.client.Set(path.Join(d.prefix, d.name), d.peer, defaultTTL)
return err
}
func Do(discoveryURL string, name string, peer string, closeChan <-chan bool, startRoutine func(func())) ([]string, error) {
return defaultDiscoverer.Do(discoveryURL, name, peer, closeChan, startRoutine)
}

View File

@ -22,63 +22,81 @@ import (
"net/http"
)
var errors map[int]string
var errors = map[int]string{
// command related errors
EcodeKeyNotFound: "Key not found",
EcodeTestFailed: "Compare failed", //test and set
EcodeNotFile: "Not a file",
EcodeNoMorePeer: "Reached the max number of peers in the cluster",
EcodeNotDir: "Not a directory",
EcodeNodeExist: "Key already exists", // create
EcodeRootROnly: "Root is read only",
EcodeKeyIsPreserved: "The prefix of given key is a keyword in etcd",
EcodeDirNotEmpty: "Directory not empty",
EcodeExistingPeerAddr: "Peer address has existed",
// Post form related errors
EcodeValueRequired: "Value is Required in POST form",
EcodePrevValueRequired: "PrevValue is Required in POST form",
EcodeTTLNaN: "The given TTL in POST form is not a number",
EcodeIndexNaN: "The given index in POST form is not a number",
EcodeValueOrTTLRequired: "Value or TTL is required in POST form",
EcodeTimeoutNaN: "The given timeout in POST form is not a number",
EcodeNameRequired: "Name is required in POST form",
EcodeIndexOrValueRequired: "Index or value is required",
EcodeIndexValueMutex: "Index and value cannot both be specified",
EcodeInvalidField: "Invalid field",
// raft related errors
EcodeRaftInternal: "Raft Internal Error",
EcodeLeaderElect: "During Leader Election",
// etcd related errors
EcodeWatcherCleared: "watcher is cleared due to etcd recovery",
EcodeEventIndexCleared: "The event in requested index is outdated and cleared",
EcodeStandbyInternal: "Standby Internal Error",
EcodeInvalidActiveSize: "Invalid active size",
EcodeInvalidRemoveDelay: "Standby remove delay",
// client related errors
EcodeClientInternal: "Client Internal Error",
}
const (
EcodeKeyNotFound = 100
EcodeTestFailed = 101
EcodeNotFile = 102
EcodeNoMorePeer = 103
EcodeNotDir = 104
EcodeNodeExist = 105
EcodeKeyIsPreserved = 106
EcodeRootROnly = 107
EcodeDirNotEmpty = 108
EcodeKeyNotFound = 100
EcodeTestFailed = 101
EcodeNotFile = 102
EcodeNoMorePeer = 103
EcodeNotDir = 104
EcodeNodeExist = 105
EcodeKeyIsPreserved = 106
EcodeRootROnly = 107
EcodeDirNotEmpty = 108
EcodeExistingPeerAddr = 109
EcodeValueRequired = 200
EcodePrevValueRequired = 201
EcodeTTLNaN = 202
EcodeIndexNaN = 203
EcodeValueOrTTLRequired = 204
EcodeValueRequired = 200
EcodePrevValueRequired = 201
EcodeTTLNaN = 202
EcodeIndexNaN = 203
EcodeValueOrTTLRequired = 204
EcodeTimeoutNaN = 205
EcodeNameRequired = 206
EcodeIndexOrValueRequired = 207
EcodeIndexValueMutex = 208
EcodeInvalidField = 209
EcodeRaftInternal = 300
EcodeLeaderElect = 301
EcodeWatcherCleared = 400
EcodeEventIndexCleared = 401
EcodeWatcherCleared = 400
EcodeEventIndexCleared = 401
EcodeStandbyInternal = 402
EcodeInvalidActiveSize = 403
EcodeInvalidRemoveDelay = 404
EcodeClientInternal = 500
)
func init() {
errors = make(map[int]string)
// command related errors
errors[EcodeKeyNotFound] = "Key not found"
errors[EcodeTestFailed] = "Compare failed" //test and set
errors[EcodeNotFile] = "Not a file"
errors[EcodeNoMorePeer] = "Reached the max number of peers in the cluster"
errors[EcodeNotDir] = "Not a directory"
errors[EcodeNodeExist] = "Key already exists" // create
errors[EcodeRootROnly] = "Root is read only"
errors[EcodeKeyIsPreserved] = "The prefix of given key is a keyword in etcd"
errors[EcodeDirNotEmpty] = "Directory not empty"
// Post form related errors
errors[EcodeValueRequired] = "Value is Required in POST form"
errors[EcodePrevValueRequired] = "PrevValue is Required in POST form"
errors[EcodeTTLNaN] = "The given TTL in POST form is not a number"
errors[EcodeIndexNaN] = "The given index in POST form is not a number"
errors[EcodeValueOrTTLRequired] = "Value or TTL is required in POST form"
// raft related errors
errors[EcodeRaftInternal] = "Raft Internal Error"
errors[EcodeLeaderElect] = "During Leader Election"
// etcd related errors
errors[EcodeWatcherCleared] = "watcher is cleared due to etcd recovery"
errors[EcodeEventIndexCleared] = "The event in requested index is outdated and cleared"
}
type Error struct {
ErrorCode int `json:"errorCode"`
Message string `json:"message"`
@ -101,7 +119,7 @@ func Message(code int) string {
// Only for error interface
func (e Error) Error() string {
return e.Message
return e.Message + " (" + e.Cause + ")"
}
func (e Error) toJsonString() string {
@ -125,5 +143,6 @@ func (e Error) Write(w http.ResponseWriter) {
status = http.StatusInternalServerError
}
}
http.Error(w, e.toJsonString(), status)
w.WriteHeader(status)
fmt.Fprintln(w, e.toJsonString())
}

109
etcd.go
View File

@ -1,109 +0,0 @@
/*
Copyright 2013 CoreOS Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"fmt"
"os"
"time"
"github.com/coreos/etcd/log"
"github.com/coreos/etcd/server"
"github.com/coreos/etcd/store"
"github.com/coreos/raft"
)
func main() {
// Load configuration.
var config = server.NewConfig()
if err := config.Load(os.Args[1:]); err != nil {
fmt.Println(server.Usage() + "\n")
fmt.Println(err.Error() + "\n")
os.Exit(1)
} else if config.ShowVersion {
fmt.Println(server.ReleaseVersion)
os.Exit(0)
} else if config.ShowHelp {
fmt.Println(server.Usage() + "\n")
os.Exit(0)
}
// Enable options.
if config.VeryVerbose {
log.Verbose = true
raft.SetLogLevel(raft.Debug)
} else if config.Verbose {
log.Verbose = true
}
if config.CPUProfileFile != "" {
profile(config.CPUProfileFile)
}
if config.DataDir == "" {
log.Fatal("The data dir was not set and could not be guessed from machine name")
}
// Create data directory if it doesn't already exist.
if err := os.MkdirAll(config.DataDir, 0744); err != nil {
log.Fatalf("Unable to create path: %s", err)
}
// Load info object.
info, err := config.Info()
if err != nil {
log.Fatal("info:", err)
}
// Retrieve TLS configuration.
tlsConfig, err := info.EtcdTLS.Config()
if err != nil {
log.Fatal("Client TLS:", err)
}
peerTLSConfig, err := info.RaftTLS.Config()
if err != nil {
log.Fatal("Peer TLS:", err)
}
// Create etcd key-value store and registry.
store := store.New()
registry := server.NewRegistry(store)
// Create peer server.
ps := server.NewPeerServer(info.Name, config.DataDir, info.RaftURL, info.RaftListenHost, &peerTLSConfig, &info.RaftTLS, registry, store, config.SnapshotCount)
ps.MaxClusterSize = config.MaxClusterSize
ps.RetryTimes = config.MaxRetryAttempts
if config.Peer.HeartbeatTimeout > 0 {
ps.HeartbeatTimeout = time.Duration(config.Peer.HeartbeatTimeout) * time.Millisecond
}
if config.Peer.ElectionTimeout > 0 {
ps.ElectionTimeout = time.Duration(config.Peer.ElectionTimeout) * time.Millisecond
}
// Create client server.
s := server.New(info.Name, info.EtcdURL, info.EtcdListenHost, &tlsConfig, &info.EtcdTLS, ps, registry, store)
if err := s.AllowOrigins(config.CorsOrigins); err != nil {
panic(err)
}
ps.SetServer(s)
// Run peer server in separate thread while the client server blocks.
go func() {
log.Fatal(ps.ListenAndServe(config.Snapshot, config.Peers))
}()
log.Fatal(s.ListenAndServe())
}

416
etcd/etcd.go Normal file
View File

@ -0,0 +1,416 @@
/*
Copyright 2013 CoreOS Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package etcd
import (
"net/http"
"os"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
goetcd "github.com/coreos/etcd/third_party/github.com/coreos/go-etcd/etcd"
golog "github.com/coreos/etcd/third_party/github.com/coreos/go-log/log"
"github.com/coreos/etcd/third_party/github.com/goraft/raft"
httpclient "github.com/coreos/etcd/third_party/github.com/mreiferson/go-httpclient"
"github.com/coreos/etcd/config"
ehttp "github.com/coreos/etcd/http"
"github.com/coreos/etcd/log"
"github.com/coreos/etcd/metrics"
"github.com/coreos/etcd/server"
"github.com/coreos/etcd/store"
)
// TODO(yichengq): constant extraTimeout is a hack.
// Current problem is that there is big lag between join command
// execution and join success.
// Fix it later. It should be removed when proper method is found and
// enough tests are provided. It is expected to be calculated from
// heartbeatInterval and electionTimeout only.
const extraTimeout = time.Duration(1000) * time.Millisecond
type Etcd struct {
Config *config.Config // etcd config
Store store.Store // data store
Registry *server.Registry // stores URL information for nodes
Server *server.Server // http server, runs on 4001 by default
PeerServer *server.PeerServer // peer server, runs on 7001 by default
StandbyServer *server.StandbyServer
server *http.Server
peerServer *http.Server
mode Mode
modeMutex sync.Mutex
closeChan chan bool
readyNotify chan bool // To signal when server is ready to accept connections
onceReady sync.Once
stopNotify chan bool // To signal when server is stopped totally
}
// New returns a new Etcd instance.
func New(c *config.Config) *Etcd {
if c == nil {
c = config.New()
}
return &Etcd{
Config: c,
closeChan: make(chan bool),
readyNotify: make(chan bool),
stopNotify: make(chan bool),
}
}
// Run the etcd instance.
func (e *Etcd) Run() {
// Sanitize all the input fields.
if err := e.Config.Sanitize(); err != nil {
log.Fatalf("failed sanitizing configuration: %v", err)
}
// Force remove server configuration if specified.
if e.Config.Force {
e.Config.Reset()
}
// Enable options.
if e.Config.VeryVeryVerbose {
log.Verbose = true
raft.SetLogLevel(raft.Trace)
goetcd.SetLogger(
golog.New(
"go-etcd",
false,
golog.CombinedSink(
os.Stdout,
"[%s] %s %-9s | %s\n",
[]string{"prefix", "time", "priority", "message"},
),
),
)
} else if e.Config.VeryVerbose {
log.Verbose = true
raft.SetLogLevel(raft.Debug)
} else if e.Config.Verbose {
log.Verbose = true
}
if e.Config.CPUProfileFile != "" {
profile(e.Config.CPUProfileFile)
}
if e.Config.DataDir == "" {
log.Fatal("The data dir was not set and could not be guessed from machine name")
}
// Create data directory if it doesn't already exist.
if err := os.MkdirAll(e.Config.DataDir, 0744); err != nil {
log.Fatalf("Unable to create path: %s", err)
}
// Warn people if they have an info file
info := filepath.Join(e.Config.DataDir, "info")
if _, err := os.Stat(info); err == nil {
log.Warnf("All cached configuration is now ignored. The file %s can be removed.", info)
}
var mbName string
if e.Config.Trace() {
mbName = e.Config.MetricsBucketName()
runtime.SetBlockProfileRate(1)
}
mb := metrics.NewBucket(mbName)
if e.Config.GraphiteHost != "" {
err := mb.Publish(e.Config.GraphiteHost)
if err != nil {
panic(err)
}
}
// Retrieve CORS configuration
corsInfo, err := ehttp.NewCORSInfo(e.Config.CorsOrigins)
if err != nil {
log.Fatal("CORS:", err)
}
// Create etcd key-value store and registry.
e.Store = store.New()
e.Registry = server.NewRegistry(e.Store)
// Create stats objects
followersStats := server.NewRaftFollowersStats(e.Config.Name)
serverStats := server.NewRaftServerStats(e.Config.Name)
// Calculate all of our timeouts
heartbeatInterval := time.Duration(e.Config.Peer.HeartbeatInterval) * time.Millisecond
electionTimeout := time.Duration(e.Config.Peer.ElectionTimeout) * time.Millisecond
dialTimeout := (3 * heartbeatInterval) + electionTimeout
responseHeaderTimeout := (3 * heartbeatInterval) + electionTimeout
clientTransporter := &httpclient.Transport{
ResponseHeaderTimeout: responseHeaderTimeout + extraTimeout,
// This is a workaround for Transport.CancelRequest doesn't work on
// HTTPS connections blocked. The patch for it is in progress,
// and would be available in Go1.3
// More: https://codereview.appspot.com/69280043/
ConnectTimeout: dialTimeout + extraTimeout,
RequestTimeout: responseHeaderTimeout + dialTimeout + 2*extraTimeout,
}
if e.Config.PeerTLSInfo().Scheme() == "https" {
clientTLSConfig, err := e.Config.PeerTLSInfo().ClientConfig()
if err != nil {
log.Fatal("client TLS error: ", err)
}
clientTransporter.TLSClientConfig = clientTLSConfig
clientTransporter.DisableCompression = true
}
client := server.NewClient(clientTransporter)
// Create peer server
psConfig := server.PeerServerConfig{
Name: e.Config.Name,
Scheme: e.Config.PeerTLSInfo().Scheme(),
URL: e.Config.Peer.Addr,
SnapshotCount: e.Config.SnapshotCount,
RetryTimes: e.Config.MaxRetryAttempts,
RetryInterval: e.Config.RetryInterval,
}
e.PeerServer = server.NewPeerServer(psConfig, client, e.Registry, e.Store, &mb, followersStats, serverStats)
// Create raft transporter and server
raftTransporter := server.NewTransporter(followersStats, serverStats, e.Registry, heartbeatInterval, dialTimeout, responseHeaderTimeout)
if e.Config.PeerTLSInfo().Scheme() == "https" {
raftClientTLSConfig, err := e.Config.PeerTLSInfo().ClientConfig()
if err != nil {
log.Fatal("raft client TLS error: ", err)
}
raftTransporter.SetTLSConfig(*raftClientTLSConfig)
}
raftServer, err := raft.NewServer(e.Config.Name, e.Config.DataDir, raftTransporter, e.Store, e.PeerServer, "")
if err != nil {
log.Fatal(err)
}
raftServer.SetElectionTimeout(electionTimeout)
raftServer.SetHeartbeatInterval(heartbeatInterval)
e.PeerServer.SetRaftServer(raftServer, e.Config.Snapshot)
// Create etcd server
e.Server = server.New(e.Config.Name, e.Config.Addr, e.PeerServer, e.Registry, e.Store, &mb)
if e.Config.Trace() {
e.Server.EnableTracing()
}
e.PeerServer.SetServer(e.Server)
// Create standby server
ssConfig := server.StandbyServerConfig{
Name: e.Config.Name,
PeerScheme: e.Config.PeerTLSInfo().Scheme(),
PeerURL: e.Config.Peer.Addr,
ClientURL: e.Config.Addr,
DataDir: e.Config.DataDir,
}
e.StandbyServer = server.NewStandbyServer(ssConfig, client)
e.StandbyServer.SetRaftServer(raftServer)
// Generating config could be slow.
// Put it here to make listen happen immediately after peer-server starting.
peerTLSConfig := server.TLSServerConfig(e.Config.PeerTLSInfo())
etcdTLSConfig := server.TLSServerConfig(e.Config.EtcdTLSInfo())
if !e.StandbyServer.IsRunning() {
startPeerServer, possiblePeers, err := e.PeerServer.FindCluster(e.Config.Discovery, e.Config.Peers)
if err != nil {
log.Fatal(err)
}
if startPeerServer {
e.setMode(PeerMode)
} else {
e.StandbyServer.SyncCluster(possiblePeers)
e.setMode(StandbyMode)
}
} else {
e.setMode(StandbyMode)
}
serverHTTPHandler := &ehttp.CORSHandler{e.Server.HTTPHandler(), corsInfo}
peerServerHTTPHandler := &ehttp.CORSHandler{e.PeerServer.HTTPHandler(), corsInfo}
standbyServerHTTPHandler := &ehttp.CORSHandler{e.StandbyServer.ClientHTTPHandler(), corsInfo}
log.Infof("etcd server [name %s, listen on %s, advertised url %s]", e.Server.Name, e.Config.BindAddr, e.Server.URL())
listener := server.NewListener(e.Config.EtcdTLSInfo().Scheme(), e.Config.BindAddr, etcdTLSConfig)
e.server = &http.Server{Handler: &ModeHandler{e, serverHTTPHandler, standbyServerHTTPHandler}}
log.Infof("peer server [name %s, listen on %s, advertised url %s]", e.PeerServer.Config.Name, e.Config.Peer.BindAddr, e.PeerServer.Config.URL)
peerListener := server.NewListener(e.Config.PeerTLSInfo().Scheme(), e.Config.Peer.BindAddr, peerTLSConfig)
e.peerServer = &http.Server{Handler: &ModeHandler{e, peerServerHTTPHandler, http.NotFoundHandler()}}
wg := sync.WaitGroup{}
wg.Add(2)
go func() {
<-e.readyNotify
defer wg.Done()
if err := e.server.Serve(listener); err != nil {
if !isListenerClosing(err) {
log.Fatal(err)
}
}
}()
go func() {
<-e.readyNotify
defer wg.Done()
if err := e.peerServer.Serve(peerListener); err != nil {
if !isListenerClosing(err) {
log.Fatal(err)
}
}
}()
e.runServer()
listener.Close()
peerListener.Close()
wg.Wait()
log.Infof("etcd instance is stopped [name %s]", e.Config.Name)
close(e.stopNotify)
}
func (e *Etcd) runServer() {
var removeNotify <-chan bool
for {
if e.mode == PeerMode {
log.Infof("%v starting in peer mode", e.Config.Name)
// Starting peer server should be followed close by listening on its port
// If not, it may leave many requests unaccepted, or cannot receive heartbeat from the cluster.
// One severe problem caused if failing receiving heartbeats is when the second node joins one-node cluster,
// the cluster could be out of work as long as the two nodes cannot transfer messages.
e.PeerServer.Start(e.Config.Snapshot, e.Config.ClusterConfig())
removeNotify = e.PeerServer.RemoveNotify()
} else {
log.Infof("%v starting in standby mode", e.Config.Name)
e.StandbyServer.Start()
removeNotify = e.StandbyServer.RemoveNotify()
}
// etcd server is ready to accept connections, notify waiters.
e.onceReady.Do(func() { close(e.readyNotify) })
select {
case <-e.closeChan:
e.PeerServer.Stop()
e.StandbyServer.Stop()
return
case <-removeNotify:
}
if e.mode == PeerMode {
peerURLs := e.Registry.PeerURLs(e.PeerServer.RaftServer().Leader(), e.Config.Name)
e.StandbyServer.SyncCluster(peerURLs)
e.setMode(StandbyMode)
} else {
// Create etcd key-value store and registry.
e.Store = store.New()
e.Registry = server.NewRegistry(e.Store)
e.PeerServer.SetStore(e.Store)
e.PeerServer.SetRegistry(e.Registry)
e.Server.SetStore(e.Store)
e.Server.SetRegistry(e.Registry)
// Generate new peer server here.
// TODO(yichengq): raft server cannot be started after stopped.
// It should be removed when raft restart is implemented.
heartbeatInterval := time.Duration(e.Config.Peer.HeartbeatInterval) * time.Millisecond
electionTimeout := time.Duration(e.Config.Peer.ElectionTimeout) * time.Millisecond
raftServer, err := raft.NewServer(e.Config.Name, e.Config.DataDir, e.PeerServer.RaftServer().Transporter(), e.Store, e.PeerServer, "")
if err != nil {
log.Fatal(err)
}
raftServer.SetElectionTimeout(electionTimeout)
raftServer.SetHeartbeatInterval(heartbeatInterval)
e.PeerServer.SetRaftServer(raftServer, e.Config.Snapshot)
e.StandbyServer.SetRaftServer(raftServer)
e.PeerServer.SetJoinIndex(e.StandbyServer.JoinIndex())
e.setMode(PeerMode)
}
}
}
// Stop the etcd instance.
func (e *Etcd) Stop() {
close(e.closeChan)
<-e.stopNotify
}
// ReadyNotify returns a channel that is going to be closed
// when the etcd instance is ready to accept connections.
func (e *Etcd) ReadyNotify() <-chan bool {
return e.readyNotify
}
func (e *Etcd) Mode() Mode {
e.modeMutex.Lock()
defer e.modeMutex.Unlock()
return e.mode
}
func (e *Etcd) setMode(m Mode) {
e.modeMutex.Lock()
defer e.modeMutex.Unlock()
e.mode = m
}
func isListenerClosing(err error) bool {
// An error string equivalent to net.errClosing for using with
// http.Serve() during server shutdown. Need to re-declare
// here because it is not exported by "net" package.
const errClosing = "use of closed network connection"
return strings.Contains(err.Error(), errClosing)
}
type ModeGetter interface {
Mode() Mode
}
type ModeHandler struct {
ModeGetter
PeerModeHandler http.Handler
StandbyModeHandler http.Handler
}
func (h *ModeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
switch h.Mode() {
case PeerMode:
h.PeerModeHandler.ServeHTTP(w, r)
case StandbyMode:
h.StandbyModeHandler.ServeHTTP(w, r)
}
}
type Mode int
const (
PeerMode Mode = iota
StandbyMode
)

41
etcd/etcd_test.go Normal file
View File

@ -0,0 +1,41 @@
/*
Copyright 2013 CoreOS Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package etcd
import (
"io/ioutil"
"os"
"testing"
"github.com/coreos/etcd/config"
)
func TestRunStop(t *testing.T) {
path, _ := ioutil.TempDir("", "etcd-")
defer os.RemoveAll(path)
config := config.New()
config.Name = "ETCDTEST"
config.DataDir = path
config.Addr = "localhost:0"
config.Peer.Addr = "localhost:0"
etcd := New(config)
go etcd.Run()
<-etcd.ReadyNotify()
etcd.Stop()
}

View File

@ -1,4 +1,4 @@
package main
package etcd
import (
"os"

View File

@ -1,21 +1,13 @@
Testing x509 certs for etcd
The steps to regenerate this CA:
The passphrases for the keys are `asdf`.
1. Get etcd-ca source code and generate binary.
# Make the CA cert
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -config openssl.cnf -extensions v3_ca
$ go get github.com/coreos/etcd-ca
# Make server cert and signing request
openssl genrsa -des3 -out server.key 4096
openssl req -new -key server.key -out server.csr -config openssl.cnf
2. Run generate_testing_certs.sh with etcd-ca binary location.
# Sign the server csr and generate a crt
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt -extfile openssl.cnf -extensions v3_req
$ ./generate_testing_certs.sh
# Output unencrypted server key
openssl rsa -in server.key -out server.key.insecure
# Output "raw" public key from server crt
openssl x509 -pubkey -noout -in server.crt > server.pub
Details about generation are in the generate_testing_certs.sh script.
3. Check current directory to see regenerated files.

View File

@ -1,21 +0,0 @@
## Testing x509 certs for luvit
# Make the CA cert
openssl genrsa -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# Make server cert and signing request
openssl genrsa -out server.key 4096
openssl req -new -key server.key -out server.csr
# Sign the server csr and generate a crt
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt
# Output unencrypted server key
openssl rsa -in server.key -out server.key.insecure
# Output "raw" public key from server crt
openssl x509 -pubkey -noout -in server.crt > server.pub
# Sign the public key with the key (just for testing signatures)
openssl dgst -sign server.key.insecure -sha256 server.pub > server.pub.sig

View File

@ -1,33 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIFtTCCA52gAwIBAgIJANfWYo0ePBBqMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQwHhcNMTIwMzE1MjMxMzMwWhcNMTMwMzE1MjMxMzMwWjBF
MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhk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HXeRv
fnS4symw4IoIw0SV1TZOHfUT3e6/+dYwU91iJJCPuKpG0zI6n4ZCZ4gUGYrAGo7n
GjtNhehRsXapRXFP5fdghtdjEW75japifaHVp4spSh8AH1dY0m50EnJL7bMQHPWw
jZt5g64wMGZWQmh1hMtLKt1aAQO8tSFsTkoO2l0ebejRxDLOtQEX0P23RkeMMOIW
hlXX5UuvKEmbTmvUycrb9AWjJyBS5BQ7xKat/Sl4z9Mq0hqiUAuXAN8od7iUMVHG
fQNqz0Uey6EumVRJPuDlkT9JD1uhSCw0YhzDpY9I3jJny8yxi1vzVlgTwQBuqcDS
WjtWOCyx2UVCRN3TO9L/5TTJgf09Ut5Ce01/qZbk4HQiqNqo8b50CANAp0HnkEle
04nn7iIsV8ABhnYO3WTtDEpF/DQEj4kvwdylj+KUgwxM7EZs+FKkRtLZ5BUXwih7
ZATyezlnR2qYF55VASJkFjtjErT3p5mQc7lXApL+dkMLhQvIPxCpa7b80ZddQI4I
PS2QKSNAWjrVxPyxpAaT6VzYdD4tdBE54j4b32YV/0WG+IOlnlRrMaA+lfbx6w9T
7KeLvkCmUZXbA9HdWkb1788CAwEAAQ==
-----END PUBLIC KEY-----

Binary file not shown.

30
fixtures/ca/broken_ca.crt Normal file
View File

@ -0,0 +1,30 @@
-----BEGIN CERTIFICATE-----
MIIFNDCCAx6gAwIBAgIBATALBgkqhkiG9w0BAQUwLTEMMAoGA1UEBhMDVVNBMRAw
DgYDVQQKEwdldGNkLWNhMQswCQYDVQQLEwJDQTAeFw0xNDAzMTMwMjA4NTRaFw0y
NDAzMTMwMjA4NTRaMC0xDDAKBgNVBAYTA1VTQTEQMA4GA1UEChMHZXRjZC1jYTEL
MAkGA1UECxMCQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDGyDN5
EcwViDB+EpOvZNfW9AJ79EiY8yiGEgXF9M3BLVFoB09wDT0ASEmPrpZhMSZb1eSM
emUFELzuEEDtuEG0TrFFNI3/gScZm8Mp6+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rEm6aCTRi/5fqMys4vQuATPalI9/lLQa9NlMs1xoFAGjE6j8ybAUWxrAWdTWOOQd
S7IA0TU2JTIcWt8fbKUwf4gkO8rfCcj2Y2Y4xZQu8uqZI7uXCse8yNE2zWPTqCPf
BzA9kZs42AP47mknVGSl59HNAovBTjQuXlFZZ1BnBDAzCq49sDR5wcr4uetC1rss
dFfFqQPPonAGcEAaKsSoaOHgVaBHfufMM7nq8JqJvZGOmLFhUgsTO3xEgnpDts9h
cfhSS/5YVofp2Vy3+++yIkSC3NDuyNCPwfzSLA2pW1GoiIv0hdSco7ALuG9FxsCs
gSc5qcrrTkazbjlCwM9rgM0BEH8pXOAkRAEZLlKd9eg6Lh3q4yBnhw==
-----END CERTIFICATE-----

54
fixtures/ca/broken_ca.key Normal file
View File

@ -0,0 +1,54 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,29382520d522b331
Xf4bWUvPQD9R4uGGFXweLkKfdqwz37nHoAHXCbWu7Eb24tkyXE4ZtBrq2xyt7EWO
GD0Am2v9S8jhvOXEYUgdDyvCaX6jQQlSo2JAyg8aeepSf7vimineQSryZVAHuILw
lHBpD31Mxpg/sGHe+OPPMjvdoqVEPnRYZcnCpLeOuL6BqUnf387h9FSfehIAxTm3
s8xPOM5PxXye+F2AhdjYnZehlufhYEK472ZR7hffxunMP3x/cdmOQnC6VgPnTL6M
OA2uXTaexyFeUDQJzM0MxXTXRSqhzEZh0154TLikaK+o4Mc7P3UTIF9+wLkr43RR
Lxiyv/ie/OAxCa2GEnWyq3wDdgBb/NR2aTdYCDa8x5R1NLYOxQf4URH9npgMVJiY
5R1vPx2avnY3s8hWia1QztNLqWTXC9bvJnbJQ2DOndbeTLK6fIy0k9ZR2a0hrROI
OxZBMaAGdd4PBba3IA7jKlxOYVmdpXZoNGdL0W2KTYfm4h/ktQaGpn/lS06/ohwk
3u5bKq4tTUMs99GuaDXMQhStBsZr5jQjK8A7RKcPnT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fuILpGxTOQc1SgDMOiGboCB+f7cxPsjXHbVahNyxxAbDbTjbc6v7q1oiy
PESoLaBR0Bi0tdKivvbB63ok2Kq9XneFrQeCIyrhkXIvYDEwdcoCBpL1DEotbU+D
YjZTLr4UW92xi1M4d94zmG6pyJsfC4sHGflY5paml9dLiEy78rCPfrJkrSSUplf+
8CjfUoZsbq3haE0N4TbqV0I0W2Fm/a6U113CTRYxj9DeA3m/HFU3TLzk9Vg/vGxP
/xltsu/wd/GoyoD9OhWhW1Ck9dtQ0G64hQjeXVd/pzsDCMT8hrtKSlX1Q7vK96ml
OJ9Ju/CdhX2lJA8BrGVh4HS1fsuNFjr5KqZAY6MwFpjAPqvqD7WFE3Yflk5/7VtX
bsvBZoN2vp9hprXsgm8/KmSNnWxzQY1Nps4XjRJVYeTmND5EyQClGJyCYKg0QVDo
7L/2GAhnOrSLkAHOcYAlrNhZ85yBiLhjJcvWyT6DDcMpCusgictI2Qv2ZjMmz46v
62PzHm0/Z3yQMcJnpRO79OdodbY22Eg9xZGGhBp1Xbm/OXYLaEpGW9S7DqPvlD5v
O+VxENxJNwDELK9H2auGJAQdORwgF0VfvZxN6tGRyb7eI6aJj04YYMBkg5Nds+AR
sNEdGNzqKm8sWvINSoX+BCOyjElOSRW0glK+ala5Y7/mM3+KOWgMas2LZBcLZfBr
1/Z0DPIA2CkFtT1VsBKa+fSkEN0s+PRLRV/QWrcMbkSvIaKcswMwoyvI6OcddUEz
YgjAOZ3TdnRm1DMqZHIsPOj+3xQv6nETqSwhvLJT1wJwnJQVbxjZwoUmJKSsZDEB
2xL9OWlhFNY2qS7F77vv2ZUJYLYniiTGrC09AAQ4ti8zWnY1gqtaCp+1wynt/Abs
9gGcbEIaQGWhpVjPtlKjNm86jGP0IXPaAgaOViIuBH+0GeVOLuUMLvb0nL0NWMJa
-----END RSA PRIVATE KEY-----

View File

@ -0,0 +1,58 @@
#!/bin/bash
#
# This script is used to generate all cert related files for etcd testing.
# location for temporary depot
depot=".depot"
# The passphrases for the keys are `asdf`.
passphrase="--passphrase asdf"
# etcd-ca could be found at github.com/coreos/etcd-ca
if [ $# -eq 0 ]; then
# try to find it through $GOPATH
IFS=':' read -a paths <<< "${GOPATH}"
for path in ${paths[@]}; do
if [ -f "${path}/bin/etcd-ca" ]; then
ca="${path}/bin/etcd-ca --depot-path $depot"
break
fi
done
if [ "$ca" == "" ]; then echo "Failed finding etcd-ca binary"; exit 1; fi
else
# treat the first argument as the path to etcd-ca binary
ca="$1 --depot-path $depot"
fi
rm -rf $depot 2>/dev/null
# create ca, which is assumed to be the broken one
$ca init $passphrase
# export out and rename files
$ca export | tar xvf -
mv ca.crt broken_ca.crt
mv ca.key broken_ca.key
# create certificate
$ca new-cert $passphrase --ip 127.0.0.1 server
$ca sign $passphrase server
# export out and rename files
$ca export --insecure $passphrase server | tar xvf -
mv server.crt broken_server.crt
mv server.key.insecure broken_server.key.insecure
rm -rf $depot 2>/dev/null
# create ca
$ca init $passphrase
$ca export | tar xvf -
# create certificate for server
$ca new-cert $passphrase --ip 127.0.0.1 server
$ca sign $passphrase server
$ca export --insecure $passphrase server | tar xvf -
$ca chain server > server-chain.pem
# create certificate for server2
$ca new-cert $passphrase --ip 127.0.0.1 server2
$ca sign $passphrase server2
$ca export --insecure $passphrase server2 | tar xvf -
rm -rf $depot 2>/dev/null

View File

@ -1,337 +0,0 @@
[ new_oids ]
# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
# Add a simple OID like this:
# testoid1=1.2.3.4
# Or use config file substitution like this:
# testoid2=${testoid1}.5.6
# Policies used by the TSA examples.
tsa_policy1 = 1.2.3.4.1
tsa_policy2 = 1.2.3.4.5.6
tsa_policy3 = 1.2.3.4.5.7
####################################################################
[ ca ]
default_ca = CA_default # The default ca section
####################################################################
[ CA_default ]
dir = ./demoCA # Where everything is kept
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
database = $dir/index.txt # database index file.
#unique_subject = no # Set to 'no' to allow creation of
# several ctificates with same subject.
new_certs_dir = $dir/newcerts # default place for new certs.
certificate = $dir/cacert.pem # The CA certificate
serial = $dir/serial # The current serial number
crlnumber = $dir/crlnumber # the current crl number
# must be commented out to leave a V1 CRL
crl = $dir/crl.pem # The current CRL
private_key = $dir/private/cakey.pem# The private key
RANDFILE = $dir/private/.rand # private random number file
x509_extensions = usr_cert # The extentions to add to the cert
# Comment out the following two lines for the "traditional"
# (and highly broken) format.
name_opt = ca_default # Subject Name options
cert_opt = ca_default # Certificate field options
# Extension copying option: use with caution.
# copy_extensions = copy
# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
# so this is commented out by default to leave a V1 CRL.
# crlnumber must also be commented out to leave a V1 CRL.
# crl_extensions = crl_ext
default_days = 365 # how long to certify for
default_crl_days= 30 # how long before next CRL
default_md = default # use public key default MD
preserve = no # keep passed DN ordering
# A few difference way of specifying how similar the request should look
# For type CA, the listed attributes must be the same, and the optional
# and supplied fields are just that :-)
policy = policy_match
# For the CA policy
[ policy_match ]
countryName = match
stateOrProvinceName = match
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
# For the 'anything' policy
# At this point in time, you must list all acceptable 'object'
# types.
[ policy_anything ]
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
####################################################################
[ req ]
default_bits = 1024
default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
x509_extensions = v3_ca # The extentions to add to the self signed cert
# Passwords for private keys if not present they will be prompted for
# input_password = secret
# output_password = secret
# This sets a mask for permitted string types. There are several options.
# default: PrintableString, T61String, BMPString.
# pkix : PrintableString, BMPString (PKIX recommendation before 2004)
# utf8only: only UTF8Strings (PKIX recommendation after 2004).
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
# MASK:XXXX a literal mask value.
# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
string_mask = utf8only
req_extensions = v3_req # The extensions to add to a certificate request
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = AU
countryName_min = 2
countryName_max = 2
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = Some-State
localityName = Locality Name (eg, city)
0.organizationName = Organization Name (eg, company)
0.organizationName_default = Internet Widgits Pty Ltd
# we can do this but it is not needed normally :-)
#1.organizationName = Second Organization Name (eg, company)
#1.organizationName_default = World Wide Web Pty Ltd
organizationalUnitName = Organizational Unit Name (eg, section)
#organizationalUnitName_default =
commonName = Common Name (e.g. server FQDN or YOUR name)
commonName_max = 64
emailAddress = Email Address
emailAddress_max = 64
# SET-ex3 = SET extension number 3
[ req_attributes ]
challengePassword = A challenge password
challengePassword_min = 4
challengePassword_max = 20
unstructuredName = An optional company name
[ usr_cert ]
# This is required for TSA certificates.
# This is required for client Auth and server Auth
extendedKeyUsage = critical,timeStamping,serverAuth,clientAuth
# These extensions are added when 'ca' signs a request.
# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.
basicConstraints=CA:FALSE
# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.
# This is OK for an SSL server.
# nsCertType = server
# For an object signing certificate this would be used.
# nsCertType = objsign
# For normal client use this is typical
# nsCertType = client, email
# and for everything including object signing:
# nsCertType = client, email, objsign
# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"
# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move
# Copy subject details
# issuerAltName=issuer:copy
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName
[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage = critical,timeStamping,serverAuth,clientAuth
subjectAltName = @alt_names
[ v3_ca ]
# Extensions for a typical CA
# PKIX recommendation.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid:always,issuer
# This is what PKIX recommends but some broken software chokes on critical
# extensions.
#basicConstraints = critical,CA:true
# So we do this instead.
basicConstraints = CA:true
keyUsage = keyCertSign, cRLSign
# Key usage: this is typical for a CA certificate. However since it will
# prevent it being used as an test self-signed certificate it is best
# left out by default.
# keyUsage = cRLSign, keyCertSign
# Some might want this also
# nsCertType = sslCA, emailCA
# Include email address in subject alt name: another PKIX recommendation
# subjectAltName=email:copy
# Copy issuer details
# issuerAltName=issuer:copy
# DER hex encoding of an extension: beware experts only!
# obj=DER:02:03
# Where 'obj' is a standard or added object
# You can even override a supported extension:
# basicConstraints= critical, DER:30:03:01:01:FF
[ crl_ext ]
# CRL extensions.
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
# issuerAltName=issuer:copy
authorityKeyIdentifier=keyid:always
[ proxy_cert_ext ]
# These extensions should be added when creating a proxy certificate
# This goes against PKIX guidelines but some CAs do it and some software
# requires this to avoid interpreting an end user certificate as a CA.
basicConstraints=CA:FALSE
# Here are some examples of the usage of nsCertType. If it is omitted
# the certificate can be used for anything *except* object signing.
# This is OK for an SSL server.
# nsCertType = server
# For an object signing certificate this would be used.
# nsCertType = objsign
# For normal client use this is typical
# nsCertType = client, email
# and for everything including object signing:
# nsCertType = client, email, objsign
# This is typical in keyUsage for a client certificate.
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
# This will be displayed in Netscape's comment listbox.
nsComment = "OpenSSL Generated Certificate"
# PKIX recommendations harmless if included in all certificates.
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
# This stuff is for subjectAltName and issuerAltname.
# Import the email address.
# subjectAltName=email:copy
# An alternative to produce certificates that aren't
# deprecated according to PKIX.
# subjectAltName=email:move
# Copy subject details
# issuerAltName=issuer:copy
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
#nsBaseUrl
#nsRevocationUrl
#nsRenewalUrl
#nsCaPolicyUrl
#nsSslServerName
# This really needs to be in place for it to be a proxy certificate.
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
####################################################################
[ tsa ]
default_tsa = tsa_config1 # the default TSA section
[ tsa_config1 ]
# These are used by the TSA reply generation only.
dir = ./demoCA # TSA root directory
serial = $dir/tsaserial # The current serial number (mandatory)
crypto_device = builtin # OpenSSL engine to use for signing
signer_cert = $dir/tsacert.pem # The TSA signing certificate
# (optional)
certs = $dir/cacert.pem # Certificate chain to include in reply
# (optional)
signer_key = $dir/private/tsakey.pem # The TSA private key (optional)
default_policy = tsa_policy1 # Policy if request did not specify it
# (optional)
other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
digests = md5, sha1 # Acceptable message digests (mandatory)
accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
clock_precision_digits = 0 # number of digits after dot. (optional)
ordering = yes # Is ordering defined for timestamps?
# (optional, default: no)
tsa_name = yes # Must the TSA name be included in the reply?
# (optional, default: no)
ess_cert_id_chain = no # Must the ESS cert id chain be included?
# (optional, default: no)
[alt_names]
IP.1 = 127.0.0.1

View File

@ -1,63 +1,61 @@
-----BEGIN CERTIFICATE-----
MIIFajCCA1KgAwIBAgIJAKMtnrbM5eQaMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQwHhcNMTMxMTEzMTkwNzMwWhcNMTQxMTEzMTkwNzMwWjBF
MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhkiG9w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OzaJbxfRu
ZS0QL0VdQnpiMY+6sV9EEz4CEJvV+JdvG4aOb50FtkBHWDxIE+CVQ3SNbwR16Pz5
Maob/OIkvzG6CcJellEtKUKDMLLXvAoSKHjwaB87j+iFO2MDZr5bzbAnKuzltFIZ
tDMF2z0ysjXVCn5lyQ4qvV7/kgYoRzzyiqzSDziPQX2k70P5PAiNW5BUD+5s3p/4
fHjb3na66iHOSgOWyuLstKygyAAsM6vCPVx+u4D3PQc+C1rIW19yI5N9tyNWNDTk
iK7QlNkZ84DSYkpa1j3HLG8nFLDfLLwFIQrHS+pdUqrPlV+wAnC3lNjTogfp
-----END RSA PRIVATE KEY-----

View File

@ -1,3 +1,3 @@
// +build !go1.1
// +build !go1.2
"etcd requires go 1.1 or greater to build"
"etcd requires go 1.2 or greater to build"

View File

@ -14,56 +14,59 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package server
package http
import (
"fmt"
"net/http"
"net/url"
"github.com/gorilla/mux"
)
type corsHandler struct {
router *mux.Router
corsOrigins map[string]bool
}
type CORSInfo map[string]bool
// AllowOrigins sets a comma-delimited list of origins that are allowed.
func (s *corsHandler) AllowOrigins(origins []string) error {
func NewCORSInfo(origins []string) (*CORSInfo, error) {
// Construct a lookup of all origins.
m := make(map[string]bool)
for _, v := range origins {
if v != "*" {
if _, err := url.Parse(v); err != nil {
return fmt.Errorf("Invalid CORS origin: %s", err)
return nil, fmt.Errorf("Invalid CORS origin: %s", err)
}
}
m[v] = true
}
s.corsOrigins = m
return nil
info := CORSInfo(m)
return &info, nil
}
// OriginAllowed determines whether the server will allow a given CORS origin.
func (c *corsHandler) OriginAllowed(origin string) bool {
return c.corsOrigins["*"] || c.corsOrigins[origin]
func (c CORSInfo) OriginAllowed(origin string) bool {
return c["*"] || c[origin]
}
type CORSHandler struct {
Handler http.Handler
Info *CORSInfo
}
// addHeader adds the correct cors headers given an origin
func (h *corsHandler) addHeader(w http.ResponseWriter, origin string) {
func (h *CORSHandler) addHeader(w http.ResponseWriter, origin string) {
w.Header().Add("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
w.Header().Add("Access-Control-Allow-Origin", origin)
}
// ServeHTTP adds the correct CORS headers based on the origin and returns immediatly
// ServeHTTP adds the correct CORS headers based on the origin and returns immediately
// with a 200 OK if the method is OPTIONS.
func (h *corsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
func (h *CORSHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
// It is important to flush before leaving the goroutine.
// Or it may miss the latest info written.
defer w.(http.Flusher).Flush()
// Write CORS header.
if h.OriginAllowed("*") {
if h.Info.OriginAllowed("*") {
h.addHeader(w, "*")
} else if origin := req.Header.Get("Origin"); h.OriginAllowed(origin) {
} else if origin := req.Header.Get("Origin"); h.Info.OriginAllowed(origin) {
h.addHeader(w, origin)
}
@ -72,5 +75,5 @@ func (h *corsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
return
}
h.router.ServeHTTP(w, req)
h.Handler.ServeHTTP(w, req)
}

36
http/query_params.go Normal file
View File

@ -0,0 +1,36 @@
package http
import (
"net/http"
"strings"
)
func NewLowerQueryParamsHandler(hdlr http.Handler) *LowerQueryParamsHandler {
return &LowerQueryParamsHandler{hdlr}
}
type LowerQueryParamsHandler struct {
Handler http.Handler
}
func (h *LowerQueryParamsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
err := req.ParseForm()
if err == nil {
lowerBoolQueryParams(req)
}
h.Handler.ServeHTTP(w, req)
}
func lowerBoolQueryParams(req *http.Request) {
form := req.Form
for key, vals := range form {
for i, val := range vals {
lowered := strings.ToLower(val)
if lowered == "true" || lowered == "false" {
req.Form[key][i] = lowered
} else {
req.Form[key][i] = val
}
}
}
}

46
http/query_params_test.go Normal file
View File

@ -0,0 +1,46 @@
package http
import (
"net/http"
"testing"
)
type NilResponseWriter struct{}
func (w NilResponseWriter) Header() http.Header {
return http.Header{}
}
func (w NilResponseWriter) Write(data []byte) (int, error) {
return 0, nil
}
func (w NilResponseWriter) WriteHeader(code int) {
return
}
type FunctionHandler struct {
f func(*http.Request)
}
func (h FunctionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.f(r)
}
func TestQueryParamsLowered(t *testing.T) {
assertFunc := func(req *http.Request) {
if len(req.Form["One"]) != 1 || req.Form["One"][0] != "true" {
t.Errorf("Unexpected value for One: %s", req.Form["One"])
} else if len(req.Form["TWO"]) != 1 || req.Form["TWO"][0] != "false" {
t.Errorf("Unexpected value for TWO")
} else if len(req.Form["three"]) != 2 || req.Form["three"][0] != "true" || req.Form["three"][1] != "false" {
t.Errorf("Unexpected value for three")
}
}
assertHdlr := FunctionHandler{assertFunc}
hdlr := NewLowerQueryParamsHandler(assertHdlr)
respWriter := NilResponseWriter{}
req, _ := http.NewRequest("GET", "http://example.com?One=TRUE&TWO=False&three=true&three=FALSE", nil)
hdlr.ServeHTTP(respWriter, req)
}

View File

@ -1,8 +1,9 @@
package log
import (
golog "github.com/coreos/go-log/log"
"os"
golog "github.com/coreos/etcd/third_party/github.com/coreos/go-log/log"
)
// The Verbose flag turns on verbose logging.

44
main.go Normal file
View File

@ -0,0 +1,44 @@
/*
Copyright 2013 CoreOS Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"fmt"
"os"
"github.com/coreos/etcd/config"
"github.com/coreos/etcd/etcd"
"github.com/coreos/etcd/server"
)
func main() {
var config = config.New()
if err := config.Load(os.Args[1:]); err != nil {
fmt.Println(server.Usage() + "\n")
fmt.Println(err.Error() + "\n")
os.Exit(1)
} else if config.ShowVersion {
fmt.Println("etcd version", server.ReleaseVersion)
os.Exit(0)
} else if config.ShowHelp {
fmt.Println(server.Usage() + "\n")
os.Exit(0)
}
var etcd = etcd.New(config)
etcd.Run()
}

42
metrics/metrics.go Normal file
View File

@ -0,0 +1,42 @@
// Package metrics provides both a means of generating metrics and the ability
// to send metric data to a graphite endpoint.
// The usage of this package without providing a graphite_addr when calling
// NewBucket results in NOP metric objects. No data will be collected.
package metrics
import (
"io"
gometrics "github.com/coreos/etcd/third_party/github.com/rcrowley/go-metrics"
)
type Timer gometrics.Timer
type Gauge gometrics.Gauge
type Bucket interface {
// If a timer exists in this Bucket, return it. Otherwise, create
// a new timer with the given name and store it in this Bucket.
// The returned object will fulfull the Timer interface.
Timer(name string) Timer
// This acts similarly to Timer, but with objects that fufill the
// Gauge interface.
Gauge(name string) Gauge
// Write the current state of all Metrics in a human-readable format
// to the provide io.Writer.
Dump(io.Writer)
// Instruct the Bucket to periodically push all metric data to the
// provided graphite endpoint.
Publish(string) error
}
// Create a new Bucket object that periodically
func NewBucket(name string) Bucket {
if name == "" {
return nilBucket{}
}
return newStandardBucket(name)
}

25
metrics/nil.go Normal file
View File

@ -0,0 +1,25 @@
package metrics
import (
"io"
gometrics "github.com/coreos/etcd/third_party/github.com/rcrowley/go-metrics"
)
type nilBucket struct{}
func (nmb nilBucket) Dump(w io.Writer) {
return
}
func (nmb nilBucket) Timer(name string) Timer {
return gometrics.NilTimer{}
}
func (nmf nilBucket) Gauge(name string) Gauge {
return gometrics.NilGauge{}
}
func (nmf nilBucket) Publish(string) error {
return nil
}

86
metrics/standard.go Normal file
View File

@ -0,0 +1,86 @@
package metrics
import (
"io"
"net"
"sync"
"time"
gometrics "github.com/coreos/etcd/third_party/github.com/rcrowley/go-metrics"
)
const (
// RuntimeMemStatsSampleInterval is the interval in seconds at which the
// Go runtime's memory statistics will be gathered.
RuntimeMemStatsSampleInterval = time.Duration(2) * time.Second
// GraphitePublishInterval is the interval in seconds at which all
// gathered statistics will be published to a Graphite endpoint.
GraphitePublishInterval = time.Duration(2) * time.Second
)
type standardBucket struct {
sync.Mutex
name string
registry gometrics.Registry
timers map[string]Timer
gauges map[string]Gauge
}
func newStandardBucket(name string) standardBucket {
registry := gometrics.NewRegistry()
gometrics.RegisterRuntimeMemStats(registry)
go gometrics.CaptureRuntimeMemStats(registry, RuntimeMemStatsSampleInterval)
return standardBucket{
name: name,
registry: registry,
timers: make(map[string]Timer),
gauges: make(map[string]Gauge),
}
}
func (smb standardBucket) Dump(w io.Writer) {
gometrics.WriteOnce(smb.registry, w)
return
}
func (smb standardBucket) Timer(name string) Timer {
smb.Lock()
defer smb.Unlock()
timer, ok := smb.timers[name]
if !ok {
timer = gometrics.NewTimer()
smb.timers[name] = timer
smb.registry.Register(name, timer)
}
return timer
}
func (smb standardBucket) Gauge(name string) Gauge {
smb.Lock()
defer smb.Unlock()
gauge, ok := smb.gauges[name]
if !ok {
gauge = gometrics.NewGauge()
smb.gauges[name] = gauge
smb.registry.Register(name, gauge)
}
return gauge
}
func (smb standardBucket) Publish(graphite_addr string) error {
addr, err := net.ResolveTCPAddr("tcp", graphite_addr)
if err != nil {
return err
}
go gometrics.Graphite(smb.registry, GraphitePublishInterval, smb.name, addr)
return nil
}

View File

@ -1,3 +1,3 @@
{
"directory": "app/bower_components"
"directory": "app/bower_components"
}

View File

@ -1,21 +0,0 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
indent_size = 2
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

View File

@ -1 +0,0 @@
* text=auto

View File

@ -1,6 +1,6 @@
/go-bindata
node_modules
dist
.tmp
.sass-cache
app/compiled
app/bower_components
/go-bindata

View File

@ -1,3 +0,0 @@
app/scripts/vega.js
app/scripts/moment.min.js
app/scripts/ng-time-relative.min.js

View File

@ -1,27 +0,0 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": false,
"strict": true,
"trailing": true,
"smarttabs": true,
"globals": {
"angular": false,
"$": false,
"vg": false,
"moment": false
}
}

View File

@ -1,7 +0,0 @@
language: node_js
node_js:
- '0.8'
- '0.10'
before_script:
- 'npm install -g bower grunt-cli'
- 'bower install'

View File

@ -1,345 +1,307 @@
// Generated on 2013-10-07 using generator-webapp 0.4.3
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
var util = require('util');
module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);
module.exports = function(grunt) {
/*jshint maxstatements:false */
grunt.initConfig({
// configurable paths
uglify: {
options: {
mangle: false
},
},
yeoman: {
app: 'app',
dist: 'dist'
},
watch: {
compass: {
files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
tasks: ['compass:server', 'autoprefixer']
},
styles: {
files: ['<%= yeoman.app %>/styles/{,*/}*.css'],
tasks: ['copy:styles', 'autoprefixer']
},
livereload: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'<%= yeoman.app %>/*.html',
'.tmp/styles/{,*/}*.css',
'{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
'<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
}
},
connect: {
options: {
port: 9000,
livereload: 35729,
// change this to '0.0.0.0' to access the server from outside
hostname: 'localhost'
},
livereload: {
options: {
open: true,
base: [
'.tmp',
'<%= yeoman.app %>'
]
}
},
test: {
options: {
base: [
'.tmp',
'test',
'<%= yeoman.app %>'
]
}
},
dist: {
options: {
open: true,
base: '<%= yeoman.dist %>'
}
}
},
clean: {
dist: {
files: [{
dot: true,
src: [
'.tmp',
'<%= yeoman.dist %>/*',
'!<%= yeoman.dist %>/.git*'
]
}]
},
server: '.tmp'
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'<%= yeoman.app %>/scripts/{,*/}*.js',
'!<%= yeoman.app %>/scripts/vendor/*',
]
},
mocha: {
all: {
options: {
run: true,
urls: ['http://<%= connect.test.options.hostname %>:<%= connect.test.options.port %>/index.html']
}
}
},
compass: {
options: {
sassDir: '<%= yeoman.app %>/styles',
cssDir: '.tmp/styles',
generatedImagesDir: '.tmp/images/generated',
imagesDir: '<%= yeoman.app %>/images',
javascriptsDir: '<%= yeoman.app %>/scripts',
fontsDir: '<%= yeoman.app %>/styles/fonts',
importPath: '<%= yeoman.app %>/bower_components',
httpImagesPath: '/images',
httpGeneratedImagesPath: '/images/generated',
httpFontsPath: '/styles/fonts',
relativeAssets: false,
assetCacheBuster: false
},
dist: {
options: {
generatedImagesDir: '<%= yeoman.dist %>/images/generated'
}
},
server: {
options: {
debugInfo: true
}
}
},
autoprefixer: {
options: {
browsers: ['last 1 version']
},
dist: {
files: [{
expand: true,
cwd: '.tmp/styles/',
src: '{,*/}*.css',
dest: '.tmp/styles/'
}]
}
},
// not used since Uglify task does concat,
// but still available if needed
/*concat: {
dist: {}
},*/
requirejs: {
dist: {
// Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
options: {
// `name` and `out` is set by grunt-usemin
baseUrl: '<%= yeoman.app %>/scripts',
optimize: 'none',
// TODO: Figure out how to make sourcemaps work with grunt-usemin
// https://github.com/yeoman/grunt-usemin/issues/30
//generateSourceMaps: true,
// required to support SourceMaps
// http://requirejs.org/docs/errors.html#sourcemapcomments
preserveLicenseComments: false,
useStrict: true,
wrap: true
//uglify2: {} // https://github.com/mishoo/UglifyJS2
}
}
},
useminPrepare: {
options: {
dest: '<%= yeoman.dist %>'
},
html: ['<%= yeoman.app %>/**/*.html']
},
usemin: {
options: {
dirs: ['<%= yeoman.dist %>']
},
html: ['<%= yeoman.dist %>/{,*/}*.html'],
css: ['<%= yeoman.dist %>/styles/{,*/}*.css']
},
imagemin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.{png,jpg,jpeg}',
dest: '<%= yeoman.dist %>/images'
}]
}
},
svgmin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.svg',
dest: '<%= yeoman.dist %>/images'
}]
}
},
cssmin: {
// This task is pre-configured if you do not wish to use Usemin
// blocks for your CSS. By default, the Usemin block from your
// `index.html` will take care of minification, e.g.
//
// <!-- build:css({.tmp,app}) styles/main.css -->
//
// dist: {
// files: {
// '<%= yeoman.dist %>/styles/main.css': [
// '.tmp/styles/{,*/}*.css',
// '<%= yeoman.app %>/styles/{,*/}*.css'
// ]
// }
// }
},
htmlmin: {
dist: {
options: {
/*removeCommentsFromCDATA: true,
// https://github.com/yeoman/grunt-usemin/issues/44
//collapseWhitespace: true,
collapseBooleanAttributes: true,
removeAttributeQuotes: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeOptionalTags: true*/
},
files: [{
expand: true,
cwd: '<%= yeoman.app %>',
src: '*.html',
dest: '<%= yeoman.dist %>'
}]
}
},
// Put files not handled in other tasks here
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: [
'*.{ico,png,txt}',
'.htaccess',
'images/{,*/}*.{webp,gif}',
'styles/fonts/{,*/}*.*',
'views/*.*',
'index.html',
'bower_components/sass-bootstrap/fonts/*.*'
]
}]
},
styles: {
expand: true,
dot: true,
cwd: '<%= yeoman.app %>/styles',
dest: '.tmp/styles/',
src: '{,*/}*.css'
}
},
modernizr: {
devFile: '<%= yeoman.app %>/bower_components/modernizr/modernizr.js',
outputFile: '<%= yeoman.dist %>/bower_components/modernizr/modernizr.js',
files: [
'<%= yeoman.dist %>/scripts/{,*/}*.js',
'<%= yeoman.dist %>/styles/{,*/}*.css',
'!<%= yeoman.dist %>/scripts/vendor/*'
],
uglify: true
},
concurrent: {
server: [
'compass',
'copy:styles'
],
test: [
'copy:styles'
],
dist: [
'compass',
'copy:styles',
'imagemin',
'svgmin',
'htmlmin'
]
},
bower: {
options: {
exclude: ['modernizr']
},
all: {
rjsConfig: '<%= yeoman.app %>/scripts/main.js'
}
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
config: {
appName: 'etcd-dashboard',
appPath: 'app',
bowerPath: 'app/bower_components',
tmpPath: '.tmp',
distPath: 'dist'
},
watch: {
css: {
files: ['<%= config.appPath %>/{page,ui,style}/{**/,}*.scss'],
tasks: ['sass']
},
html: {
files: [
'<%= config.appPath %>/{module,ui,page}/**/*.html'
],
tasks: ['views']
},
js: {
files: [
'<%= config.appPath %>/{module,page}/**/*.js',
'<%= config.appPath %>/*.js'
],
tasks: ['jshint']
}
},
concurrent: {
dev: {
tasks: [
'watch',
//'test-watch'
],
options: {
logConcurrentOutput: true
}
});
}
},
grunt.registerTask('server', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
clean: {
tmp: {
files: [{
dot: true,
src: [
'<%= config.tmpPath %>',
'.sass-cache/**/*'
]
}]
},
dist: {
files: [{
dot: true,
src: [
'<%= config.distPath %>/*'
]
}]
},
'dist-static': {
files: [{
dot: true,
src: [
'<%= config.distPath %>/cp/**'
]
}]
},
compiled: {
files: [{
dot: true,
src: [
'<%= config.appPath %>/compiled/**'
]
}]
}
},
// JS code linting.
jshint: {
options: {
camelcase: true,
curly: true,
eqeqeq: true,
eqnull: true,
forin: true,
freeze: true,
immed: true,
indent: 2,
latedef: true,
maxcomplexity: 10,
maxdepth: 3,
maxlen: 80,
maxparams: 20,
maxstatements: 200,
newcap: true,
noarg: true,
node: true,
noempty: true,
nonew: true,
nonbsp: true,
quotmark: 'single',
strict: true,
sub: true,
trailing: true,
undef: true,
unused: true
},
src: {
node: false,
options: {
globals: {
angular: true,
window: true
}
},
files: {
src: [
'<%= config.appPath %>/*.js',
'<%= config.appPath %>/{module,page}**/*.js',
'!<%= config.appPath %>/vega.js'
]
}
}
},
grunt.task.run([
'clean:server',
'concurrent:server',
'autoprefixer',
'connect:livereload',
'watch'
]);
// Compile SCSS to CSS.
sass: {
etcd: {
options: {
includePaths: ['<%= config.appPath %>/coreos-web/sass'],
outputStyle: 'nested'
},
files: {
'<%= config.appPath %>/compiled/main.css': '<%= config.appPath %>/main.scss'
}
}
},
/**
* Generate grunt configs for concat, uglify, cssmin.
*/
useminPrepare: {
html: '<%= config.appPath %>/index.html',
options: {
dest: '<%= config.distPath %>'
}
},
usemin: {
html: ['<%= config.distPath %>/index.html']
},
// This block gets generated by usemin.
cssmin: {
},
// This block gets generated by usemin.
uglify: {
},
// This block gets generated by usemin.
concat: {
},
// Make our angular code minification friendly.
ngmin: {
dist: {
files: [{
src: '<%= config.tmpPath %>/concat/app.js',
dest: '<%= config.tmpPath %>/concat/app.js'
}]
}
},
copy: {
dist: {
files: [{
expand: true,
cwd: '<%= config.appPath %>',
src: ['index.html'],
dest: '<%= config.distPath %>'
}]
},
images: {
files: [{
expand: true,
cwd: '<%= config.appPath %>/img',
src: ['**'],
dest: '<%= config.distPath %>/img'
}]
},
'coreos-web': {
files: [{
cwd: '<%= config.appPath %>/coreos-web',
expand: true,
src: [
'fonts/*',
'img/*'
],
dest: '<%= config.distPath %>/coreos-web'
}]
},
'dist-static': {
files: [
{
expand: true,
flatten: true,
src: [
'<%= config.distPath %>/cp/static/*'
],
dest: '<%= config.distPath %>'
}
]
}
},
// Precompile html views into a single javascript file.
html2js: {
options: {
base: '<%= config.appPath %>',
rename: function(moduleName) {
return '/' + moduleName;
}
},
views: {
src: [
'<%= config.appPath %>/{page,ui,module}/**/*.html'
],
dest: '<%= config.appPath %>/compiled/views.js'
}
}
});
grunt.registerTask('clean-paths', 'clean up resource paths', function() {
grunt.log.writeln('cleaning paths...');
function clean(path) {
return path.replace('mod/dashboard/static/', '');
}
['concat', 'uglify', 'cssmin'].forEach(function(task) {
var config = grunt.config(task);
config.generated.files.forEach(function(fileGroup) {
fileGroup.dest = clean(fileGroup.dest);
fileGroup.src = fileGroup.src.map(function(path) {
return clean(path);
});
});
grunt.config(task, config);
grunt.log.ok(task + ' config is now:');
grunt.log.writeln(util.inspect(grunt.config(task), false, 4, true));
});
});
grunt.registerTask('test', [
'clean:server',
'concurrent:test',
'autoprefixer',
'connect:test',
'mocha'
]);
grunt.registerTask('test', [
'views',
'karma:unit'
]);
grunt.registerTask('build', [
'clean:dist',
'useminPrepare',
'concurrent:dist',
'autoprefixer',
'concat',
'cssmin',
'uglify',
'usemin',
'copy:dist'
]);
grunt.registerTask('test-watch', [
'karma:dev'
]);
grunt.registerTask('default', [
'jshint',
'test',
'build'
]);
grunt.registerTask('views', [
'html2js:views'
]);
grunt.registerTask('dev', [
'clean',
'jshint',
'views',
'sass',
'concurrent:dev'
]);
grunt.registerTask('build', [
'clean',
'jshint',
'views',
//'test',
'sass',
'useminPrepare',
'clean-paths',
'concat',
'ngmin:dist',
'uglify',
'cssmin',
'copy:dist',
'usemin',
'copy:dist-static',
'clean:dist-static',
'copy:images',
'copy:coreos-web'
]);
grunt.registerTask('default', ['build']);
};

View File

@ -4,24 +4,38 @@
If you'd like to contribute to the etcd dashboard mod, follow these instructions. For contributing to the rest of etcd, see the contributing document in the root of the repository.
### Install yeoman
### Install Dependencies
http://yeoman.io/
Requires nodejs.
### Install NPM locally
Run all commands from within the `/mod/dashboard` directory.
run `./setup` to install npm modules and bower front-end dependencies.
To run a non-compiled development version of the dashboard:
Continually compile html templates, sass/css, and run unit tests.
```
npm install
grunt dev
```
### Install Bower Components
Export an environment varible to notify etcd of the dashboard source code location:
```
bower install
export ETCD_DASHBOARD_DIR=./mod/dashboard/app
```
### View in Browser
Run local etc as usual (be sure to include the cors flag).
Run etcd like you normally would and afterward browse to:
```
// from etcd root dir
./bin/etcd -cors="*"
```
http://localhost:4001/mod/dashboard/
Alternatively, build the optimized production-build version of the website and run etcd as above:
```
grunt
export ETCD_DASHBOARD_DIR=./mod/dashboard/dist
```

View File

@ -1 +0,0 @@
*.coffee

View File

@ -0,0 +1,31 @@
<div class="co-m-404">
<div class="row co-l-secondary-nav">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-6 co-m-primary-action"></div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 co-m-page-title">
<h1 class="co-fx-text-shadow">Page Not Found</h1>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="panel co-m-panel co-fx-box-shadow-heavy">
<div class="panel-body">
<div class="row">
<div class="col-lg-6 col-lg-offset-3 col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2 col-xs-12 co-m-404-animation">
<div class="co-m-404-logo" ng-include="'/cp/static/img/globe-only.svg'"></div>
<div class="co-m-404-orbit">
<div class="co-m-404-moon">
<div class="co-m-404-moon-text">404</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More