Commit Graph

444 Commits (adc6968e20f5b1025968085cb01555d062e89d98)

Author SHA1 Message Date
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 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 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: )
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 
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 .  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 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  and fixes 
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
Philip O'Toole 8a9f8d0eda Add simple test that results in entries in values 2015-04-02 11:36:02 -07:00
Jason Wilder 91fb7e3756 Track data node urls on brokers
This sends data node urls via the broker heartbeat from each data
node.  The urls are tracked on the broker to support simpler
cluster setup as well as distributed queries.
2015-04-02 11:27:53 -06:00
Jason Wilder 0af6d1006d Move RestoreCommandTest to integration tests 2015-04-02 10:22:28 -06:00
Cory LaNou 8fa3571782 only need max procs for running 2015-04-02 10:27:35 -05:00
Cory LaNou e7866d3600 Set Go Max procs in a better location 2015-04-02 09:33:09 -05:00
Cory LaNou 87c3c46208 encode toml durations correctly 2015-04-01 20:20:04 -05:00
Philip O'Toole a7d904778a Correctly filter series for NEQREGEX
Series that do not have any tags are considered matching in the NEQREGEX
case so the must be explicitly added.
2015-03-31 16:14:30 -07:00
Philip O'Toole 60149cf7b5 Unit test EQ and NEQ tag query 2015-03-31 16:14:30 -07:00
Philip O'Toole 26b2a2662c Add unit test showing issue is fixed 2015-03-31 16:14:30 -07:00
Philip O'Toole 70d57d399d Check if the tag filter is a NOT
If so, then return all series IDs which do not match.

Fix for issue 
2015-03-31 16:14:30 -07:00
Paul Dix d8aca6029d Remove logo output on startup and output gomaxprocs setting 2015-03-29 19:01:38 -04:00
Ben Johnson 24db5f23e1 Set GOMAXPROCS. 2015-03-29 15:39:43 -06:00
Philip O'Toole 1b700264a7 Also include NEQ in filters
This fixes != for field value comparisons.
2015-03-27 23:07:57 -07:00
Philip O'Toole a0e9daee63 SHOW DATABASES returns series name "databases" 2015-03-27 16:24:57 -07:00
Philip O'Toole 3e59dac0fb Allow integration tests to be skipped 2015-03-27 11:28:19 -07:00
Philip O'Toole 8fe4e428a7 Bring 3-node test back online 2015-03-27 10:45:38 -07:00
Philip O'Toole a23984a840 Allow int tests to query only 1 node 2015-03-27 10:45:38 -07:00
Philip O'Toole 5e08351a27 Merge pull request from influxdb/_internal_not_internal
Use _internal as default self-monitoring database
2015-03-26 17:13:44 -07:00
Philip O'Toole efdb7e89e2 Disable snapshot endpoint during testing
Once we have proper endpoint layering, this can be re-enabled.
2015-03-26 16:25:30 -07:00
Philip O'Toole f829355e3e Allow snapshot endpoint to be disabled
Fix isse 
2015-03-26 16:13:23 -07:00
Philip O'Toole 1e10c46ea1 Remove all backup test paths 2015-03-26 14:58:07 -07:00
Philip O'Toole 7a5f66c75a Use _internal as default self-monitoring database 2015-03-26 14:12:14 -07:00
Philip O'Toole f22778a41f Merge pull request from influxdb/leading_underscores
Test leading underscores
2015-03-26 13:52:59 -07:00
Philip O'Toole ed918304c4 Test tags with leading underscores 2015-03-26 13:48:26 -07:00
Philip O'Toole 2a2c8ecddb Remove redundant writes from WHERE testing 2015-03-26 13:41:22 -07:00
Cory LaNou d653e41712 support fractional time on graphite endpoint 2015-03-26 14:18:40 -06:00
Cory LaNou 524eb78a69 graphite logs in seconds, not milliseconds 2015-03-26 14:18:40 -06:00
Philip O'Toole c461c7e7b4 Remove logging to specific file 2015-03-25 17:41:39 -07:00
Philip O'Toole 225459b25c Always write the logo to stdout
This change means it will always go to stdout, regardless of the log
setting.
2015-03-25 15:56:03 -07:00
Paul Dix 7076b9ea9a Merge pull request from influxdb/relative-times-off-2045
Fixing intervals for group by.
2015-03-24 22:17:12 -04:00
Cory LaNou 805cba71a4 clarify test name 2015-03-24 20:14:05 -06:00
Cory Lanou 7be574534c Fixing intervals for group by. Fixing bad PR 2015-03-24 20:13:05 -06:00
Ben Johnson 21782c0a67 Merge branch 'master' of https://github.com/influxdb/influxdb into backup-restore 2015-03-24 16:05:49 -06:00
Ben Johnson 4bc92c3018 Code review fixes. 2015-03-24 16:04:39 -06:00
Ben Johnson 2401e69f58 Add incremental backups.
This commit adds incremental backup support. Snapshotting from the server
now creates a full backup if one does not exist and creates numbered
incremental backups after that.

For example, if you ran:

  $ influxd backup /tmp/snapshot

Then you'll see a full snapshot in /tmp/snapshot. If you run the same
command again then an incremental snapshot will be created at
/tmp/snapshot.0. Running it again will create /tmp/snapshot.1.
2015-03-24 15:57:03 -06:00
Philip O'Toole fba41df82b Push version and commit hash onto Server 2015-03-23 23:45:57 -07:00
Ben Johnson 29cb550d95 Code review fixes. 2015-03-23 16:06:29 -06:00
Philip O'Toole 14585db38b Move TestServer_RawDataReturnsInOrder to int tests
Fix 
2015-03-23 12:14:15 -07:00
Ben Johnson 3befa12fa3 Merge branch 'master' of https://github.com/influxdb/influxdb into backup-restore
Conflicts:
	cmd/influxd/main.go
	cmd/influxd/run.go
2015-03-22 15:38:41 -06:00
Ben Johnson 11c808f55f Add restore and bootstrap.
This commit adds the "influxd restore" command to the CLI. This allows
a snapshot that has been produced by "influxd backup" to be restored
to a config location and the broker and raft directories will be
bootstrapped based on the state of the snapshot.
2015-03-22 15:31:49 -06:00
Ben Johnson 963d277a75 Add "influxd backup" command.
This commit adds the backup command to the influxd binary as well as
implements a SnapshotWriter in the influxdb package.

By default the snapshot handler binds to 127.0.0.1 so it cannot be
accessed outside of the local machine.
2015-03-22 10:54:14 -06:00
Philip O'Toole 2a4032a9a5 TestServer_LimitAndOffset to integration test 2015-03-20 20:54:40 -07:00
Philip O'Toole 57a1f5e500 Remove debug fmt.Println from tests 2015-03-20 16:36:49 -07:00
Philip O'Toole 1cc1902fb7 Merge pull request from influxdb/merge_many_series
Move "merge many" test to integration test
2015-03-20 16:35:28 -07:00
Philip O'Toole 8b48ff9a28 Move MergeMany to integration test 2015-03-20 16:32:34 -07:00
Philip O'Toole 566b2b62af Support writing test data via a function 2015-03-20 16:11:00 -07:00
Philip O'Toole 1cb60bdb62 Add help for 'config' command 2015-03-20 15:58:17 -07:00
Philip O'Toole ee29214898 Make it clear where influxd storage is 2015-03-20 15:19:30 -07:00
Philip O'Toole 45ac8ff2d9 Explicitly check for errors getting current user 2015-03-20 15:18:29 -07:00
Philip O'Toole f6f74a11bd Don't check 'configExists' at Run() level
*config was always non-null, since code at a higher level ensures that a
default config is passed down if no config is specified. So this logic
was pointless.
2015-03-20 14:10:50 -07:00
Ben Johnson 0461f401f6 Add SnapshotWriter. 2015-03-19 22:23:52 -06:00