Commit Graph

8321 Commits

Author SHA1 Message Date
James Phillips d1ad538345 Makes RPC handling more robust when rolling servers. (#3561)
* Adds client-side retry for no leader errors.

This paves over the case where the client was connected to the leader
when it loses leadership.

* Adds a configurable server RPC drain time and a fail-fast path for RPCs.

When a server leaves it gets removed from the Raft configuration, so it will
never know who the new leader server ends up being. Without this we'd be
doomed to wait out the RPC hold timeout and then fail. This makes things fail
a little quicker while a sever is draining, and since we added a client retry
AND since the server doing this has already shut down and left the Serf LAN,
clients should retry against some other server.

* Makes the RPC hold timeout configurable.

* Reorders struct members.

* Sets the RPC hold timeout default for test servers.

* Bumps the leave drain time up to 5 seconds.

* Robustifies retries with a simpler client-side RPC hold.

* Reverts untended delete.
2017-10-10 15:19:50 -07:00
James Phillips 25d32c8b7e Update compatibility.html.md 2017-10-09 14:18:37 -07:00
James Phillips 2695760055 Update compatibility.html.md 2017-10-09 14:18:23 -07:00
Radek Simko 03decc2a95 docs: agent/options gcp's project_name is optional
Per https://github.com/hashicorp/go-discover/blob/master/provider/gce/gce_discover.go#L53-L61
2017-10-08 13:08:50 +02:00
Preetha Appan 25e64b5362 Fix unit test after dns library upgrade to account for correct data length 2017-10-06 17:40:17 -05:00
James Phillips 03abd7157b Update raft.html.md 2017-10-06 14:38:21 -07:00
James Phillips dff7aab526
Updates the change log. 2017-10-06 14:17:21 -07:00
Preetha Appan e677d309f9 Updating CHANGELOG.md 2017-10-06 16:10:35 -05:00
preetapan e47b0a052e Merge pull request #3412 from hashicorp/jbs-autocomplete
Autocomplete support via @brianshumate
2017-10-06 15:46:26 -05:00
Preetha Appan e3e781e264 Update documentation with subcommand example 2017-10-06 15:23:43 -05:00
Preetha Appan 5d5e245417 Autocomplete support 2017-10-06 15:05:45 -05:00
preetapan cb313a264c Merge pull request #3548 from hashicorp/go_retryablehttp_update
Update go-retryablehttp
2017-10-06 13:44:26 -05:00
Preetha Appan 10b7ab252f Update go-retryablehttp 2017-10-06 13:42:11 -05:00
James Phillips 906bd41a5c
Updates the change log. 2017-10-06 11:36:03 -07:00
preetapan 84b0af3150 Vendor update miekg/dns to pick up bugfixes and features (#3547) 2017-10-06 11:34:41 -07:00
James Phillips 35a27ac7ef
Adds a basic Linux Vagrant setup, stolen from Nomad. 2017-10-06 08:10:12 -07:00
James Phillips 533ec86a40
Updates the change log. 2017-10-06 07:57:22 -07:00
James Phillips a1db119d02 Fixes handling of stop channel and failed barrier attempts. (#3546)
* Fixes handling of stop channel and failed barrier attempts.

There were two issues here. First, we needed to not exit when there
was a timeout trying to write the barrier, because Raft might not
step down, so we'd be left as the leader but having run all the step
down actions.

Second, we didn't close over the stopCh correctly, so it was possible
to nil that out and have the leaderLoop never exit. We close over it
properly AND sequence the nil-ing of it AFTER the leaderLoop exits for
good measure, so the code is more robust.

Fixes #3545

* Cleans up based on code review feedback.

* Tweaks comments.

* Renames variables and removes comments.
2017-10-06 07:54:49 -07:00
James Phillips 406bad36bd
Updates the change log. 2017-10-05 09:30:56 -07:00
Frank Schroeder db016a0c8d
command: show full help text on usage 2017-10-05 18:17:54 +02:00
Frank Schroeder c467efe4b9
Update CHANGELOG.md 2017-10-05 18:14:26 +02:00
Frank Schroeder 2320836d7f command: do not merge flags in-place 2017-10-05 18:08:35 +02:00
Frank Schroeder 56ebd5b30f command: simplify duplicate code 2017-10-05 18:08:35 +02:00
Frank Schroeder 3028d52158 command: drop hidden flags from base command 2017-10-05 18:08:35 +02:00
Frank Schroeder 13266a2e65 command: drop unused hidden flags for 'validate' 2017-10-05 18:08:35 +02:00
Frank Schroeder 7182829f15
command: drop legacy 'operator raft' tests 2017-10-05 17:56:16 +02:00
Frank Schroeder a4be9e2e67 command: simplify 'operator raft'
The cli library can handle subcommands. Therefore, most of the code is
no longer necessary.
2017-10-05 17:40:57 +02:00
Frank Schroeder cac55a1e80 command: don't show confusing error on usage output 2017-10-05 17:29:45 +02:00
Frank Schroeder 4e866ced39 command: backport patch for mitchellh/cli help flag handling (#3536)
This patch backports a fix which will show the correct usage screen for
command line flags.

This is considered a temporary fix until the code has been refactored.
Newer versions of the cli library require that the flag set is populated
when Help() is called or that it is populated within Help() itself.

Fixes #3536
2017-10-05 17:29:45 +02:00
Frank Schroeder 7bab8d3eb7 command: drop deprecated 'configtest' command
'configtest' has been replaced with 'validate'
2017-10-05 17:22:34 +02:00
Victor Boivie 77f7008363 Minor typo (boostrap) 2017-10-05 16:28:48 +02:00
James Phillips c8fe9924d5
Release v1.0.0-beta2 2017-10-04 23:07:24 -07:00
James Phillips 5ba517b187
Puts the tree in 1.0.0-beta2 release mode. 2017-10-04 23:00:06 -07:00
James Phillips ca89deb178
Updates the change log. 2017-10-04 22:59:22 -07:00
James Phillips 26b4c0a9ab Updates Go version to 1.9.1. (#3537) 2017-10-04 22:58:13 -07:00
James Phillips 97b580f593
Adds script warning and fixes Docker args recognition. 2017-10-04 21:41:27 -07:00
James Phillips b61ec82b2f Update CHANGELOG.md 2017-10-04 19:48:34 -07:00
James Phillips 03f6cdeefe
Updates the change log. 2017-10-04 19:47:44 -07:00
Kyle Havlovitz d464f3aff5 Update CHANGELOG.md 2017-10-04 17:48:30 -07:00
Kyle Havlovitz dde743700f Merge pull request #3535 from hashicorp/metric-docs
Update metric names and add a legacy config flag
2017-10-04 17:39:16 -07:00
Kyle Havlovitz bd0c0cecc0
Move http request metric to the agent section 2017-10-04 17:36:10 -07:00
Kyle Havlovitz d5fec6b7ac
Add a test for legacy metrics with a whitelist filter 2017-10-04 17:27:57 -07:00
James Phillips c5a7d2871e Update CHANGELOG.md 2017-10-04 16:51:49 -07:00
James Phillips 459cc7bc6c Update CHANGELOG.md 2017-10-04 16:51:11 -07:00
Kyle Havlovitz be04bfed34 Clean up subprocess handling and make shell use optional (#3509)
* Clean up handling of subprocesses and make using a shell optional

* Update docs for subprocess changes

* Fix tests for new subprocess behavior

* More cleanup of subprocesses

* Minor adjustments and cleanup for subprocess logic

* Makes the watch handler reload test use the new path.

* Adds check tests for new args path, and updates existing tests to use new path.

* Adds support for script args in Docker checks.

* Fixes the sanitize unit test.

* Adds panic for unknown watch type, and reverts back to Run().

* Adds shell option back to consul lock command.

* Adds shell option back to consul exec command.

* Adds shell back into consul watch command.

* Refactors signal forwarding and makes Windows-friendly.

* Adds a clarifying comment.

* Changes error wording to a warning.

* Scopes signals to interrupt and kill.

This avoids us trying to send SIGCHILD to the dead process.

* Adds an error for shell=false for consul exec.

* Adds notes about the deprecated script and handler fields.

* De-nests an if statement.
2017-10-04 16:48:00 -07:00
Kyle Havlovitz 0063516e5e
Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
Frank Schroeder 23b057f46b build: add changelogfmt target to format [GH-xxxx] references to links 2017-10-04 21:14:16 +02:00
Frank Schröder 7b2ef00d03 Make GH-xxxx issue numbers clickable. (#3533) 2017-10-04 11:57:03 -07:00
Frank Schroeder 248f6f97ed
Revert "Test using issue numbers in CHANGELOG"
This reverts commit 3d069781ff2a63bb020d93f7089874c317449057.
2017-10-04 20:32:58 +02:00
Frank Schröder f7b8c357f7 Test using issue numbers in CHANGELOG 2017-10-04 20:29:14 +02:00