Commit Graph

457 Commits (d36bc3239501652dacaebbc06f91bdb7f1fc6ed5)

Author SHA1 Message Date
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
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
Jason Wilder 9e109e847b Fix typos in comments 2015-04-06 21:39:18 -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
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 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 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
Philip O'Toole dbb7d2a319 Tweak openTSDB changes and update CHANGELOG 2015-04-06 11:10:50 -07:00
Tristan Colgate-McFarlane 32d6433c04 OpenTSDB server interface
Add an input collector for the OpenTSDB telnet protcol
2015-04-05 10:29:49 +01:00
Jari Sukanen a56ea6f191 client: rename client.Results type to client.Response (issue: #2050)
Rename client.Results to client.Response as it already has Results
property itself. Renaming it to Response makes code look much less
ugly.
2015-04-04 11:43:53 +03:00
Jason Wilder 9ee0f6445e Fix broker connect race at startup
When a data node starts up, the broker URLs were not set before
they were actually being used.  The call to client.Open() in
turn triggers the raft streamer and heartbeat which try to connect
to the broker.   If those started before the subsequent client.SetURLs()
call, you would see the following error in the logs at startup:

[messaging] 2015/04/01 11:59:22 reconnecting to broker: url={  <nil>  /messaging/messages index=2&streaming=true&topicID=0 }, err=Get /messaging/messages?index=2&streaming=true&topicID=0: unsupported protocol scheme ""

Fixing this race uncovered another bug where the join urls would be
cleared the first time the broker was started.  In this case, the
join urls should be left alone since they were set properly w/ SetURLs.

Fixes #2152
2015-04-03 21:04:42 -06:00
Jason Wilder 6d4c7e9cd5 Handle broker and data node endpoints regardless of role
This is a pre-requisite for #1934.  When running separate
broker and data nodes, you currently need to know what role
a host is performing.  This complicates cluster setup in
that you must configure separate broker URLs and data node
URLs.

This change allows a broker only node to redirect data nodes endpoints
to a valid data node and a data only node to redirect broker
endpoints to a valid broker.
2015-04-03 21:00:43 -06:00
Todd Persen 82bf75c691 Merge pull request #2150 from runner-mei/connection_refused
Make InfluxDB win32 friendly, fix unit test is failed on the windows and it is for connection refused.
2015-04-03 16:31:51 -07:00
Philip O'Toole 84d590ce44 Monitoring database should not be configurable 2015-04-03 14:40:36 -07:00
Philip O'Toole 5df05d1256 It's for stats and diags, not just diags 2015-04-03 14:26:17 -07:00
Philip O'Toole a8559cc37d Unit test OR tags 2015-04-03 11:41:16 -07:00
runner.mei 6a7cb61f6d fix unit test is failed with connection refused on the win32 2015-04-03 13:48:52 +08:00
Paul Dix f3dce09621 uncoment raw ordering test 2015-04-02 15:22:27 -07:00
Paul Dix c4b780d8b2 remove xxx before integration test 2015-04-02 15:22:27 -07:00
Paul Dix 6c46a5c83b Add chunked responses and streaming of raw queries.
Refactored query engine to have different processing pipeline for raw queries. This enables queries that have a large offset to not keep everything in memory. It also makes it so that queries against raw data that have a limit will only p
rocess up to that limit and then bail out.

Raw data queries will only read up to a certain point in the map phase before yielding to the engine for further processing.

Fixes #2029 and fixes #2030
2015-04-02 15:22:27 -07:00
Philip O'Toole 7b720b6169 Unit-test two queries in a single request 2015-04-02 11:38:39 -07:00