176 Commits

Author SHA1 Message Date
Fabrizio (Misto) Milo
82fe001c65 move etcdMux to etcd_handlers.go (better proximity code) 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
0aebf3757d use check utl 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
6299f316f1 use check util 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
3102420542 use infof instead of fmt.Printf 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
e7d15b6488 split config 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
339d8b435d move to util 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
e6d8d4046d split raft server logic into separate module 2013-08-13 11:52:55 -07:00
Fabrizio (Misto) Milo
ddc53c6584 use filepath 2013-08-12 17:18:05 -07:00
Xiang Li
21c658b151 Merge pull request #86 from xiangli-cmu/master
Change snapshot to clientside
2013-08-12 10:46:34 -07:00
Brandon Philips
5a88da1d37 fix(etcd): add a default name
etcd shouldn't require flags by default.
2013-08-11 13:28:53 -07:00
Xiang Li
8e48a20c85 clean up trans.go 2013-08-11 11:56:18 -07:00
Brandon Philips
be85442e5e fix(etcd): remove insecureskipverify
The client certs and server certs should share the same CA since
everyone is a peer. Use this logic instead of InsecureSkipVerify.

Test-plan: tested manually and tests pass still.
2013-08-11 10:36:34 -07:00
Xiang Li
1124fe21a0 cleaning up 2013-08-11 10:18:40 -07:00
Xiang Li
d3649d3254 gofmt 2013-08-11 09:48:12 -07:00
Xiang Li
434b0045db add snapshot 2013-08-11 09:47:23 -07:00
Xiang Li
0e1125666f better naming in join 2013-08-11 00:42:46 -07:00
Brandon Philips
466229cf4d fix(etcd): reverse the cert handling
the server tls config needs the client CA information and the client
needs the pub/priv key. This is how this code used to work.
2013-08-10 23:33:40 -07:00
Brandon Philips
3be13a38f1 fix(etcd): use transporter scheme in joinCluster
Follow the transporter scheme when trying to join the cluster. Otherwise
the scheme is empty and the http client errors.
2013-08-10 21:35:22 -07:00
Brandon Philips
7db07aa96a fix(etcd): fatal when err != nil
stupid typo, fix
2013-08-10 21:09:46 -07:00
Brandon Philips
eb8f1dc6eb fix(etcd): fixup TLSInfo json
the JSON wasn't getting generated properly. Fix it up.
2013-08-10 19:52:29 -07:00
Brandon Philips
8c09f98882 chore(etcd): cleanup TLS configuration
the TLS configuration was getting rather complex with slices of
tls.Config's being passed around and pointer nil checking for schema
types.

Introduce a new TLSInfo type that is in charge of holding the various
TLS key/cert/CA filenames the user passes in.

Then create a new TlsConfig type that has a Scheme and the Client and
Server tls.Config objects inside of it. This is used by the two
transport start methods which had been using a slice of tls.Config
objects and guessing at the scheme based on the non-nil value of the
Config.
2013-08-10 19:31:54 -07:00
Brandon Philips
9111617f32 chore(etcd): introduce sanitizeURL
checkURL was a little weird and allowed two different ways to specify
flags. Introduce sanitizeURL which will make sure the host passed in is
simply hostname:port and then appends a Scheme.
2013-08-10 19:22:04 -07:00
Xiang Li
6610fc39cc defaultScheme based on tls 2013-08-10 17:49:30 -07:00
Xiang Li
84624f1ec0 fix join command 2013-08-10 17:00:25 -07:00
Xiang Li
bbf78b076a update 2013-08-10 16:23:51 -07:00
Xiang Li
ba697f6ac9 fix web 2013-08-10 16:20:00 -07:00
Brandon Philips
60c71a98a4 fix(etcd): checkURL on webURL
make it so that dropping the schema isn't fatal.
2013-08-10 11:01:09 -07:00
Brandon Philips
0e5ee2742d fix(web): don't share the DefaultMux
All of the web handlers were sharing one mux. Separate them out into
individual muxes.
2013-08-10 10:54:59 -07:00
Brandon Philips
8174669519 fix(etcd): be more explicit with name error message 2013-08-10 09:42:39 -07:00
Xiang Li
ce3c55ba3f refactor 2013-08-09 23:03:49 -07:00
Xiang Li
d3471eec7f separate_id 2013-08-09 21:06:16 -07:00
Brandon Philips
a19048841f feat(trasnport): add an independent node name
Don't let the raft algorithm know anything about the transport. Give it
a nodename instead. This will allow us to support more complex
networking setups in the future.
2013-08-09 17:09:57 -07:00
Xiang Li
06fab60dd6 simplify createTrans 2013-08-09 13:57:51 -07:00
Fabrizio (Misto) Milo
ab10f95911 set messager as send only 2013-08-08 16:46:29 -07:00
Brandon Philips
5000e1de4a chore(etcd): pretty print the conf json
someone might edit this so pretty print it.
2013-08-08 13:59:45 -07:00
Brandon Philips
04318ff1be fix(etcd): rename ignore to force
It was suprising that the ignore file deleted node configuration. Change
the name to force!
2013-08-08 13:27:00 -07:00
Brandon Philips
27000cf5df chore(etcd): un-nest error handling logic 2013-08-08 13:19:33 -07:00
Brandon Philips
99d69cf842 feat(etcd): print out log line of where the configuration is
It is a bit confusing that your flags are ignored if there is an
existing info file. Inform the user.
2013-08-08 13:11:29 -07:00
Brandon Philips
5e8f9a57a5 fix(etcd): use . as the storage
/tmp is convienent but a little unexpected. Just use the cwd.
2013-08-08 12:58:11 -07:00
Brandon Philips
6a9a0a6fbe fix(etcd): use Info structs for "start" functions
instead of passing in half of the info pass everything in as info
structs
2013-08-08 12:49:35 -07:00
Brandon Philips
8e5a24d367 chore(etcd): introduce argInfo variable
reduce the global sprawl and put all of the basic info in an instance of
Info Struct
2013-08-08 12:17:25 -07:00
Brandon Philips
f946ff0aab fix(etcd): log same port argument 2013-08-08 12:07:58 -07:00
Xiang Li
e5aa6256f0 Merge https://github.com/coreos/etcd 2013-08-06 19:57:03 -07:00
Fabrizio (Misto) Milo
a15b4bb687 gofmt 2013-08-06 17:46:21 -07:00
Fabrizio (Misto) Milo
742589aa72 nip 2013-08-06 17:34:39 -07:00
Fabrizio (Misto) Milo
1b69ebcb6c nip 2013-08-06 17:26:52 -07:00
Fabrizio (Misto) Milo
efc14b719d nip 2013-08-06 17:24:51 -07:00
Fabrizio (Misto) Milo
4247e1ce74 prevent white spaces as being accepted as valid host 2013-08-06 17:20:40 -07:00
Fabrizio (Misto) Milo
50277df74c format 2013-08-06 17:19:49 -07:00
Fabrizio (Misto) Milo
11a7cd0bc2 nip 2013-08-06 17:11:10 -07:00