Todd Persen
e1472257b0
Make sure that we return a `200 OK` when querying for a tag that doesn't exist.
2015-04-07 12:28:38 -07:00
Ben Johnson
7aad1a5820
Remove dead code in messaging.
2015-04-07 12:36:07 -06:00
Todd Persen
214b405c47
Merge pull request #2181 from influxdb/show_diags
...
Switch on "SHOW DIAGNOSTICS" statement
2015-04-07 11:18:22 -07:00
Jason Wilder
be10db87d2
Ensure broker and data nodes are enabled by default
...
NewTestConfig() would enable broker and data nodes so running
influxd w/o a config file would start the nodes. If you ran
influxd w/ a config file but did not explicitly set Data.Enabled
or Broker.Enabled, the server would not start. This is not
intuitive when moving to a config file setup.
Instead, broker and data are enabled w/ the config file (like w/o)
and they must be explicitly disabled to run in a data or broker
only mode. This will help w/ backwards compatibility with existing
config files.
2015-04-07 12:17:34 -06:00
Jason Wilder
2b502858dc
Prevent starting server if both broker and data are disabled
...
Not a valid configuration so print the error and some suggestions
to fix it.
2015-04-07 12:17:28 -06:00
Cory LaNou
fadcef0bd3
Merge pull request #2180 from influxdb/http-gzip-posts
...
Allow http write handler to decode gzipped body
2015-04-07 11:00:14 -05:00
Cory LaNou
43cefd45ea
Update CHANGELOG.md
2015-04-07 10:55:07 -05:00
Cory LaNou
13f318b084
Allow http write handler to decode gzipped body
2015-04-07 10:34:55 -05:00
Paul Dix
a72707bdbc
Merge pull request #2175 from influxdb/data-broker-1934
...
Separate broker and data nodes
2015-04-07 11:33:39 -04:00
Philip O'Toole
6536beb549
Switch on "SHOW DIAGNOSTICS" statement
...
Fix issue #2179
2015-04-07 08:21:42 -07:00
Jason Wilder
fd11797dcb
Update CHANGELOG
...
Add #2175
2015-04-06 21:41:46 -06:00
Jason Wilder
9e109e847b
Fix typos in comments
2015-04-06 21:39:18 -06:00
Jason Wilder
0f1fb3a5c3
Fix race on Topic.indexByUrl
...
applySetTopicMaxIndex() was updating the topics.indexByUrl w/o locking it.
WARNING: DATA RACE
Write by goroutine 1365:
runtime.mapassign1()
/usr/local/go/src/runtime/hashmap.go:376 +0x0
github.com/influxdb/influxdb/messaging.(*Broker).applySetTopicMaxIndex()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:496 +0x198
github.com/influxdb/influxdb/messaging.(*Broker).Apply()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:542 +0x33a
github.com/influxdb/influxdb.(*Broker).Apply()
<autogenerated>:1 +0x78
github.com/influxdb/influxdb/messaging.(*RaftFSM).Apply()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:614 +0x24f
github.com/influxdb/influxdb/raft.(*Log).applyNextUnappliedEntry()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:1431 +0x75c
github.com/influxdb/influxdb/raft.(*Log).applier()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:1369 +0x18f
Previous read by goroutine 1540:
runtime.mapiterinit()
/usr/local/go/src/runtime/hashmap.go:535 +0x0
github.com/influxdb/influxdb/messaging.(*Topic).DataURLs()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/messaging/broker.go:681 +0x11d
github.com/influxdb/influxdb/cmd/influxd.(*Handler).serveMetadata()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/cmd/influxd/handler.go:95 +0x3fd
github.com/influxdb/influxdb/cmd/influxd.(*Handler).ServeHTTP()
/home/ubuntu/.go_project/src/github.com/influxdb/influxdb/cmd/influxd/handler.go:45 +0x540
net/http.serverHandler.ServeHTTP()
/usr/local/go/src/net/http/server.go:1703 +0x1f6
net/http.(*conn).serve()
/usr/local/go/src/net/http/server.go:1204 +0x1087
2015-04-06 21:16:19 -06:00
Mark Rushakoff
48b3986579
Merge pull request #2176 from influxdb/consistent-usage-printing
...
Use fmt.Println, not log.Println to print usage
2015-04-06 15:55:21 -07:00
Todd Persen
89ae8b36ee
Merge pull request #2177 from influxdb/gzip-post-script
...
Update test script to read and write with gzip compression
2015-04-06 15:39:53 -07:00
Cory LaNou
4e8b98702a
properly submit gzipped data.
2015-04-06 15:38:14 -07:00
Cory LaNou
63ded4f3f5
update test script to read and write with gzip compression
2015-04-06 15:38:14 -07:00
Jason Wilder
01c2de62b0
Rename Server to Node
...
Server is very overloaded currently so use Node to represent the
container that holds onto a broker and data node (server currently)
2015-04-06 16:38:01 -06:00
Jason Wilder
ba61643a91
Update config.toml.sample
...
Removed unused items and add new ones
2015-04-06 16:38:01 -06:00
Jason Wilder
54821538d1
Ignore join urls if restarting a node
...
If a node is restarted and it had already joined the cluster,
ignore and log that the join urls are being ignored and existing
cluster state will be used.
2015-04-06 16:38:01 -06:00
Jason Wilder
aa5696c10d
Handle server unavailable response
...
When starting multiple servers concurrently, they can race to connect
to each other. This change just has the join attempts retry to make
cluster setup easier.
2015-04-06 16:38:01 -06:00
Jason Wilder
01ee3fe352
Re-enable 3 node test
2015-04-06 16:38:01 -06:00
Jason Wilder
8b5307f6e8
Remove all join URLs from config
...
This removes all join URLs from the config. To join a node to a
cluster, the URL of another member of the cluster should be passed
on the command line w/ the -join flag. The join URLs can now be
any node regardless of whether the node is a broker only or data
only node. At join time, the receiving node will redirect the
request to a valid broker or data node if it cannot handle the request
itself.
2015-04-06 16:38:01 -06:00
Jason Wilder
9af362bff5
Rename DataAddrUDP to APIAddrUDP
2015-04-06 16:38:00 -06:00
Jason Wilder
d06c4ead5c
Replace broker url w/ cluster url
2015-04-06 16:38:00 -06:00
Jason Wilder
5e3c26a636
Replace data port w/ cluster port
2015-04-06 16:38:00 -06:00
Jason Wilder
b85eba550d
Separate cluster and API endpoints
2015-04-06 16:38:00 -06:00
Jason Wilder
4a7cae4391
Replace broker port w/ cluster port
2015-04-06 16:38:00 -06:00
Jason Wilder
23819d10d2
Add Cluster port
...
This is the port that all cluster communication will take place
over. It will replace the separate data and broker ports.
2015-04-06 16:38:00 -06:00
Jason Wilder
73f6f8cb44
Remove unused cluster config section
2015-04-06 16:38:00 -06:00
Jason Wilder
8ff4b51063
Temporarily disable 3 node server test
...
How a cluster is setup has changed and this test is failing w/
panic: assert failed: invalid initial server id: 2 [recovered]
There is an existing multi-node test w/ a broker and two data
nodes so we're still covering this case and will need to come
back to it.
2015-04-06 16:38:00 -06:00
Jason Wilder
60c66c8515
Add data node join URLs
...
To add a new data node, it currently needs a broker
and another data node to join. Temporarily adding
a JoinURLs option to the Data node section so a
standalone data node can be created but the intent is
that this will be removed.
Ideally, the the joinURL could point to either a data node
or a broker and it would get the required URLs from that
host but that is not possible currently.
2015-04-06 16:38:00 -06:00
Jason Wilder
5d6536f693
First pass at separate data and broker nodes
...
Adds a simple test to start a separate broker and
data node. Data nodes still need a separate set
join URLs which is not in place yet.
2015-04-06 16:38:00 -06:00
Jason Wilder
388b1c2c05
Refactor openServer/openBroker
...
Simplified signature and state now depends on indexes vs directory
existence
2015-04-06 16:38:00 -06:00
Jason Wilder
6fa0ea01dd
Move openBroker to RunCommand.openBroker
2015-04-06 16:38:00 -06:00
Jason Wilder
c63866ea62
Remove Broker.Timout config
...
Not used
2015-04-06 16:38:00 -06:00
Jason Wilder
18db6fa7ba
Separate baseline config from test config
2015-04-06 16:38:00 -06:00
Jason Wilder
45a2db9f0d
Rename graphite/collect bind address config var name
...
Make it consistent w/ pre-existing "bind-address config options.
2015-04-06 16:37:59 -06:00
Jason Wilder
524e0719ed
Add missing tests for snaphost config
2015-04-06 16:37:59 -06:00
Jason Wilder
384e3f3683
Add tests for config data/broker enabled
2015-04-06 16:37:59 -06:00
Jason Wilder
eb9956b844
Rename ContinuouseQuery Disable to Disabled
...
Match Broker and Data config var names
2015-04-06 16:37:59 -06:00
Jason Wilder
dcb3e85e84
Add a enabled config option for broker and data options
2015-04-06 16:37:59 -06:00
Jason Wilder
358bb9b3d9
Convert flag.String to flag.StringVar
2015-04-06 16:37:59 -06:00
Jason Wilder
5918d48f73
Allow passing config to RunCommand.Open
2015-04-06 16:37:59 -06:00
Jason Wilder
070bb3ccc6
Add logger to RunCommand
2015-04-06 16:37:59 -06:00
Jason Wilder
82b3108f6d
Refactor execRun to RunCommand
2015-04-06 16:37:59 -06:00
Jason Wilder
88f9810ea9
Refactor help into command
2015-04-06 16:37:59 -06:00
Jason Wilder
231f05195f
Merge pull request #2178 from influxdb/err
...
Return fmt.Errorf()
2015-04-06 16:37:10 -06:00
Jason Wilder
c356ff6483
Return fmt.Errorf()
2015-04-06 16:29:00 -06:00
Mark Rushakoff
a13af0483a
Use fmt.Println, not log.Println to print usage
...
The previous behavior caused "[srvr]" to print out during usage, e.g. in
`influxd help run`:
```
[srvr] 2015/04/06 11:58:04 usage: run [flags]
run starts the broker and data node server....
```
2015-04-06 13:12:00 -07:00