Commit Graph

36 Commits (d4fb66290a338e74b6027345117c589b90676bfa)

Author SHA1 Message Date
Philip O'Toole d74e0690c7 Revert "Merge pull request #4233 from influxdb/drop-server"
This reverts commit 0bdb36f6dc, reversing
changes made to 3085fbc138.
2015-10-02 08:39:57 -07:00
Cory LaNou 7a3e1f6b27 removing peer wip 2015-10-01 15:39:15 -05:00
Philip O'Toole 9b900a0b3b Add RP create-and-get test cases 2015-09-16 16:21:41 -07:00
Jason Wilder 3404fe3872 Wait for meta-store to find the leader before returning
The meta-store would open but may not have finished loading the raft log. If write
requests came in, they could fail or be dropped because of missing shard group
info.  This change makes the meta store only return after it has found the leader
and is really ready.

This change also fixed a race in the ClusterRestart test that may be causing it
to fail sporadically.

Fixes #3677 #3960
2015-09-04 14:51:57 -06:00
Philip O'Toole cf5a655249 Don't precreate shard groups entirely in past
Fixes issue #3722
2015-09-04 08:31:50 -07:00
Philip O'Toole 878d7fc5f5 Update shard retention time when policy changes
Fixes issue #3702.
2015-08-19 12:42:05 -07:00
Jason Wilder 0e59568825 Change how cluster is started in tests
Instead of trying to start all the nodes with dynamic peer addresses
set, alwasy start one, then join the rest to this one.  The SetPeers
in the test may be causing leadership changes and sporadic failures.
2015-08-14 13:17:38 -06:00
Jason Wilder b5b8754904 Fix comments and whitespace issues 2015-08-05 14:17:26 -06:00
Jason Wilder 13052e60f2 Sync hostname to metastore after startup
If the -hostname flag is passed, the node will startup and be accessible from
remote nodes using the specified hostname.  At startup, we attempt to update
the hostname if it's different.  For data-only nodes, this is pretty straight-forward.
For nodes part of the raft cluster, it is much more complicated as the the cluster
must be up and stable (with a leader) for a the update to take place.  The main
complication in this case is that the node starting up will have a different
hostname and will fail to take part of the raft cluster because each other node
does not have this new name in the it's raft peers list.  Since this is very problematic
and very easy to break a cluster, this PR just aborts startup and alerts the operator that
some manual actions must be taken to update the raft peer on all raft members before
the hostname can be fully updated.

Fixes #3421
2015-08-05 14:17:26 -06:00
Jason Wilder 2b76dac479 Don't resolve hostname when creating node
Hostnames were always being resolved to an IP address and the IP
address was used as the host address and raft peer address.  There
was no way to use an actual hostname instead of an IP address.
2015-08-05 14:17:26 -06:00
Jason Wilder 06d8ff7c13 Use config.Peers when passing -join flag
Removes the two separate variables in the meta.Config.  -join will
now override the Peers var.
2015-07-28 09:40:25 -06:00
Jason Wilder 2938601e9e Add more meta store cluster tests
* Test add new nodes that become raft peers
* Test restarting a cluster w/ 3 raft nodes and 3 non-raft nodes
2015-07-28 09:40:25 -06:00
Jason Wilder 84a8d7d24b Add cluster-tracing option to meta config
Useful for troubleshooting but too verbose for regular use.
2015-07-23 10:21:24 -06:00
Jason Wilder abfd438a11 Implement remote meta data fetch
This adds some basic plumbing to make remote procedure calls to other cluster
members.  This first implementation allows a node to contact the raft leader
and fetch a copy of the meta data. This will be used by non-raft members to
pull down the latest metadata.
2015-07-23 10:21:22 -06:00
David Norton ba6bddc5f8 fix #3102: fix race in test 2015-06-30 18:29:36 -04:00
David Norton 3463d906e9 fix #3102: add unit test for authentication 2015-06-30 18:29:36 -04:00
Philip O'Toole 64ace983e8 Support return of shard groups for timerange 2015-06-26 17:28:52 -04:00
David Norton 4c194f2c8d fix #3014: make code review changes 2015-06-25 22:26:53 -04:00
David Norton e2f0814904 fix #3014: make code review changes 2015-06-25 20:10:17 -04:00
David Norton 3c7a82d91c fix #3014: implement snapshots 2015-06-25 19:54:00 -04:00
Ben Johnson 405ec78f42 Limit cluster to 3 nodes
This commit restricts the maximum number of nodes in a cluster to 3.

Fixes #2750
2015-06-11 00:11:47 -06:00
Ben Johnson 52696ae3a1 Require replication factor to equal cluster size
This commit adds a requirement that retention policies must
be fully committed. This means that the replication factor
must be set to whatever the node count is in the cluster.

Fixes #2738
2015-06-11 00:11:03 -06:00
Ben Johnson 586da7f558 Generate cluster id on first node
This commit sets a cluster ID when the first node is initialized.
The ID is generated on every CreateNodeCommand so that it can be
applied consistently in the state machine of every server.
2015-06-10 22:33:58 -06:00
Philip O'Toole 5798d99692 Move shard precreation logic to meta/store 2015-06-10 15:37:00 -07:00
Philip O'Toole c455c374d1 Increase Raft timeouts during test
Previous timeouts may be too short for CI testing resources.
2015-06-09 12:32:16 -07:00
Ben Johnson 6cf78206f0 refactor run.Server to use tcp.Mux 2015-06-05 16:31:58 -06:00
Ben Johnson db2d94a6a5 refactor store to use external listeners 2015-06-05 16:08:07 -06:00
Ben Johnson b925e1c1af Multi-node clustering.
This commit adds the ability to cluster multiple nodes together to share
the same metadata through raft consensus.
2015-06-05 14:41:19 -06:00
Cory LaNou d962283ae6 adding some integration tests 2015-06-01 16:04:20 -06:00
Cory LaNou d581254719 fix tests 2015-06-01 11:59:58 -06:00
Paul Dix f3245ab9ac Make Authenticate return true if no users and creating a root user. 2015-05-30 14:29:16 -04:00
Ben Johnson 75ab63b538 Refactor meta statement execution to meta.StatementExecutor. 2015-05-29 14:54:04 -06:00
Ben Johnson 736875b858 Integrate meta package. 2015-05-29 14:54:04 -06:00
Ben Johnson 7258a9be3c Implement meta.Store and meta.Data. 2015-05-25 16:28:58 -06:00
Ben Johnson 12e4253e15 Add single-node raft back metastore.
This commit adds the meta.RaftStore which can start a single node
cluster and create nodes on the meta.Data internal structure.

Conflicts:
	meta/meta.go
2015-05-20 16:49:03 -06:00
Ben Johnson 85e285623e Refactor meta data to separate package.
This commit moves meta data from the influxdb.Server and extracts it
out to a new "meta" package. This package handles all strongly
consistent data in the database and maintains a small set of metadata
in-memory.

Conflicts:
	meta/store.go
2015-05-08 11:52:05 -06:00