From 2124ebb383ba98014ba7aab87b0e2ce76c6716e3 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Thu, 18 Dec 2014 11:35:03 -0800 Subject: [PATCH 1/3] The flag is 'seed-servers' --- cmd/influxd/join_cluster.go | 2 +- cmd/influxd/run.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/influxd/join_cluster.go b/cmd/influxd/join_cluster.go index 308ee576ff..9c156ff964 100644 --- a/cmd/influxd/join_cluster.go +++ b/cmd/influxd/join_cluster.go @@ -93,7 +93,7 @@ join-cluster creates a completely new node that will attempt to join an existing 'combined' means it will do both. The default is 'combined'. In role other than these three is invalid. - -seedservers + -seed-servers Set the list of servers the node should contact, to join the cluster. This should be comma-delimited list of servers, in the form host:port. This option is REQUIRED. diff --git a/cmd/influxd/run.go b/cmd/influxd/run.go index abc5bc6ba0..4d24ef76ad 100644 --- a/cmd/influxd/run.go +++ b/cmd/influxd/run.go @@ -157,7 +157,7 @@ use Distributed Consensus, but is otherwise fully-functional. -hostname Override the hostname, the 'hostname' configuration option will be overridden. - -seedservers + -seed-servers If joining a cluster, overrides any previously configured or discovered Data node seed servers. From bc6d951057beac7428d9bfdc50b8a933c3951023 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Fri, 19 Dec 2014 11:34:32 -0500 Subject: [PATCH 2/3] Launch HTTP handlers in goroutines --- cmd/influxd/run.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/influxd/run.go b/cmd/influxd/run.go index 4d24ef76ad..f7890bd9af 100644 --- a/cmd/influxd/run.go +++ b/cmd/influxd/run.go @@ -130,14 +130,14 @@ func execRun(args []string) { // Start up HTTP server(s) if config.ApiHTTPListenAddr() != config.RaftListenAddr() { if serverHandler != nil { - func() { log.Fatal(http.ListenAndServe(config.ApiHTTPListenAddr(), serverHandler)) }() + go func() { log.Fatal(http.ListenAndServe(config.ApiHTTPListenAddr(), serverHandler)) }() } if brokerHandler != nil { - func() { log.Fatal(http.ListenAndServe(config.RaftListenAddr(), brokerHandler)) }() + go func() { log.Fatal(http.ListenAndServe(config.RaftListenAddr(), brokerHandler)) }() } } else { h := NewHandler(brokerHandler, serverHandler) - func() { log.Fatal(http.ListenAndServe(config.ApiHTTPListenAddr(), h)) }() + go func() { log.Fatal(http.ListenAndServe(config.ApiHTTPListenAddr(), h)) }() } // Wait indefinitely. From 72d73b800c70442014a9e22c66a530a54a8e36bb Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Fri, 19 Dec 2014 13:07:53 -0500 Subject: [PATCH 3/3] Use existing config variable, not a new one Without this, log remained closed. Always. --- raft/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/log.go b/raft/log.go index b4e9b89a44..97d5daeb1c 100644 --- a/raft/log.go +++ b/raft/log.go @@ -377,7 +377,7 @@ func (l *Log) readConfig() (*Config, error) { // Marshal file to a config type. var config *Config if f != nil { - config := &Config{} + config = &Config{} if err := NewConfigDecoder(f).Decode(config); err != nil { return nil, err }