Commit Graph

40 Commits

Author SHA1 Message Date
Kyle Havlovitz c6f461aa25 Enable snapshots in dev mode (#2453) 2016-10-31 14:39:47 -04:00
James Phillips bc29610124 Adds support for snapshots and restores. (#2396)
* Updates Raft library to get new snapshot/restore API.

* Basic backup and restore working, but need some cleanup.

* Breaks out a snapshot module and adds a SHA256 integrity check.

* Adds snapshot ACL and fills in some missing comments.

* Require a consistent read for snapshots.

* Make sure snapshot works if ACLs aren't enabled.

* Adds a bit of package documentation.

* Returns an empty response from restore to avoid EOF errors.

* Adds API client support for snapshots.

* Makes internal file names match on-disk file snapshots.

* Adds DC and token coverage for snapshot API test.

* Adds missing documentation.

* Adds a unit test for the snapshot client endpoint.

* Moves the connection pool out of the client for easier testing.

* Fixes an incidental issue in the prepared query unit test.

I realized I had two servers in bootstrap mode so this wasn't a good setup.

* Adds a half close to the TCP stream and fixes panic on error.

* Adds client and endpoint tests for snapshots.

* Moves the pool back into the snapshot RPC client.

* Adds a TLS test and fixes half-closes for TLS connections.

* Tweaks some comments.

* Adds a low-level snapshot test.

This is independent of Consul so we can pull this out into a library
later if we want to.

* Cleans up snapshot and archive and completes archive tests.

* Sends a clear error for snapshot operations in dev mode.

Snapshots require the Raft snapshots to be readable, which isn't supported
in dev mode. Send a clear error instead of a deep-down Raft one.

* Adds docs for the snapshot endpoint.

* Adds a stale mode and index feedback for snapshot saves.

This gives folks a way to extract data even if the cluster has no
leader.

* Changes the internal format of a snapshot from zip to tgz.

* Pulls in Raft fix to cancel inflight before a restore.

* Pulls in new Raft restore interface.

* Adds metadata to snapshot saves and a verify function.

* Adds basic save and restore snapshot CLI commands.

* Gets rid of tarball extensions and adds restore message.

* Fixes an incidental bad link in the KV docs.

* Adds documentation for the snapshot CLI commands.

* Scuttle any request body when a snapshot is saved.

* Fixes archive unit test error message check.

* Allows for nil output writers in snapshot RPC handlers.

* Renames hash list Decode to DecodeAndVerify.

* Closes the client connection for snapshot ops.

* Lowers timeout for restore ops.

* Updates Raft vendor to get new Restore signature and integrates with Consul.

* Bounces the leader's internal state when we do a restore.
2016-10-25 19:20:24 -07:00
Adam Wolfe Gordon fa08665ad2 vendor: Remove go-reap
go-reap is no longer used since we no longer reap child processes.
2016-10-04 09:41:29 -06:00
James Phillips a32990f402
Updates vendor info for memberlist. 2016-08-12 11:43:26 -07:00
James Phillips 359587f70e
Removes support for muxado and protocol version 1. 2016-08-09 18:10:04 -07:00
James Phillips 307a2cd94b
Updates metadata for golang.org/x/sys/unix, keeps SHA the same. 2016-08-09 17:36:48 -07:00
James Phillips 56092d4946
Updates ryanuber/columnize. 2016-08-09 17:35:03 -07:00
James Phillips ce206323bb
Updates mitchellh/copystructure, mitchellh/mapstructure, and mitchellh/reflectwalk. 2016-08-09 17:34:07 -07:00
James Phillips 33ea18fb21
Updates mattn/go-isatty and mitchellh/cli. 2016-08-09 17:26:11 -07:00
James Phillips 6a208e0797
Updates hashicorp/yamux. 2016-08-09 17:24:41 -07:00
James Phillips 1f46758761
Updates hashicorp/scada-client. 2016-08-09 17:24:40 -07:00
James Phillips 6ca99530fa
Updates hashicorp/raft-boltdb. 2016-08-09 17:24:40 -07:00
James Phillips cd97d34344
Updates hashicorp/net-rpc-msgpackrpc. 2016-08-09 17:24:40 -07:00
James Phillips 7caa29363d
Updates hashicorp/memberlist. 2016-08-09 17:24:40 -07:00
James Phillips 4412a7e9fa
Updates hashicorp/logutils. 2016-08-09 17:24:40 -07:00
James Phillips eceb58fff5
Updates hashicorp/go-uuid. 2016-08-09 17:24:40 -07:00
James Phillips 2e931733d0
Updates hashicorp/go-syslog. 2016-08-09 17:24:40 -07:00
James Phillips 4515a1d90b
Updates hashicorp/go-retryablehttp. 2016-08-09 17:24:39 -07:00
James Phillips e53f348a9c
Updates hashicorp/go-reap. 2016-08-09 17:24:39 -07:00
James Phillips d1d5c14c83
Updates hashicorp/go-cleanhttp. 2016-08-09 17:24:39 -07:00
James Phillips 38185955ea
Upates hashicorp/go-checkpoint. 2016-08-09 17:24:39 -07:00
James Phillips bfb6abec90
Updates hashicorp/errwrap and hashicorp/go-multierror. 2016-08-09 17:24:39 -07:00
James Phillips f431598fb6
Updates hashicorp/go-immutable-radix and hashicorp/go-memdb. 2016-08-09 17:24:39 -07:00
James Phillips 99ab3390c2
Updates hashicorp/hcl and hashicorp/hil.
This required a small mod to core Consul code to cope with an interface
change.
2016-08-09 17:24:13 -07:00
James Phillips 8d03a2c948
Removes some unused vendored dependencies. 2016-08-09 16:50:34 -07:00
James Phillips 5f54e902de
Updates fsouza/go-dockerclient.
9b6c972004...a53ba79627
2016-08-09 16:50:04 -07:00
James Phillips 23633f7241
Updates elazarl/go-bindata-assetfs. 2016-08-09 16:36:07 -07:00
James Phillips 0ed936e5e6
Updates circonus-labs/circonus-gometrics and circonus-labs/circonusllhist. 2016-08-09 16:34:48 -07:00
James Phillips e522f5a642
Updates boltdb/bolt. 2016-08-09 16:33:05 -07:00
James Phillips a695c89193
Updates bgentry/speakeasy. 2016-08-09 16:31:32 -07:00
James Phillips fd178c9027
Updates armon/go-radix. 2016-08-09 16:28:34 -07:00
James Phillips 550af4b895
Updates armon/circbuf. 2016-08-09 16:27:51 -07:00
James Phillips 59313b13dc
Updates DataDog/datadog-go. 2016-08-09 16:27:20 -07:00
James Phillips 43dab05630
Updates armon/go-metrics. 2016-08-09 16:27:17 -07:00
James Phillips 93f58eb466
Updates miekg/dns.
75e6e86cc6...db96a2b759
2016-08-09 16:27:11 -07:00
James Phillips f1b47817f2
Updates hashicorp/golang-lru. 2016-08-09 16:26:59 -07:00
James Phillips 7f2346bb0f
Vendors first stage branch of the v2 Raft library. 2016-08-08 19:19:17 -07:00
James Phillips 954c32e6ee
Updates Serf to pick up intent queue fix.
This fixes #1062 by storing intents per-node instead of in a small, fixed-
size circular buffer.
2016-08-08 18:58:44 -07:00
James Phillips 196e3b4b3e
Switches over to govendor. 2016-08-08 18:53:35 -07:00
Jeff Mitchell e061d89fe9 Use upstream high-level SCADA provider 2016-06-01 18:25:39 -04:00