Commit Graph

7036 Commits

Author SHA1 Message Date
James Phillips 80ddc085c9
Updates the change log. 2017-10-31 15:32:22 -07:00
Frank Schröder 3cb1cd3723 config: add -config-format option (#3626)
* config: refactor ReadPath(s) methods without side-effects

Return the sources instead of modifying the state.

* config: clean data dir before every test

* config: add tests for config-file and config-dir

* config: add -config-format option

Starting with Consul 1.0 all config files must have a '.json' or '.hcl'
extension to make it unambigous how the data should be parsed. Some
automation tools generate temporary files by appending a random string
to the generated file which obfuscates the extension and prevents the
file type detection.

This patch adds a -config-format option which can be used to override
the auto-detection behavior by forcing all config files or all files
within a config directory independent of their extension to be
interpreted as of this format.

Fixes #3620
2017-10-31 17:30:01 -05:00
James Phillips b8622f2970
Updates the change log. 2017-10-31 15:07:47 -07:00
Frank Schröder 56561523cf vendor: update go-discover (#3634)
* vendor: update go-discover

Pull in providers:

 * Aliyun (Alibaba Cloud)
 * Digital Ocean
 * OpenStack (os)
 * Scaleway

* doc: use ... instead of xxx

* doc: strip trailing whitespace

* doc: add docs for aliyun, digitalocean, os and scaleway

* agent: fix test
2017-10-31 17:03:54 -05:00
James Phillips 7432fd6d50
Updates the change log. 2017-10-31 13:21:25 -07:00
James Phillips c6e0366c02
Relaxes Autopilot promotion logic. (#3623)
* Relaxes Autopilot promotion logic.

When we defaulted the Raft protocol version to 3 in #3477 we made
the numPeers() routine more strict to only count voters (this is
more conservative and more correct). This had the side effect of
breaking rolling updates because it's at odds with the Autopilot
non-voter promotion logic.

That logic used to wait to only promote to maintain an odd quorum
of servers. During a rolling update (add one new server, wait, and
then kill an old server) the dead server cleanup would still count
the old server as a peer, which is conservative and the right thing
to do, and no longer count the non-voter. This would wait to promote,
so you could get into a stalemate. It is safer to promote early than
remove early, so by promoting as soon as possible we have chosen
that as the solution here.

Fixes #3611

* Gets rid of unnecessary extra not-a-voter check.
2017-10-31 15:16:56 -05:00
Alex Dadgar a1ce48d3b3
Merge pull request #3632 from hashicorp/b-rate-scale
Integer division rounding to zero for rate scaling
2017-10-31 09:39:15 -07:00
Frank Schroeder 82a52d3b50
docker: fix failing test 2017-10-31 09:26:34 +01:00
Frank Schroeder ed1b1b54cd
docker: render errors with %v since they can be nil 2017-10-31 09:19:20 +01:00
Alex Dadgar 4f6e39341c
Update cluster.go 2017-10-30 16:51:28 -07:00
Alex Dadgar e73efda495 Integer division rounding to zero for rate scaling
This fixes an issue in which integer division was scaling down to zero.
2017-10-30 16:46:11 -07:00
Kyle Havlovitz fb464a8c0d
Fix a panic in snapshot inspect command 2017-10-30 14:51:08 -07:00
Frank Schroeder b6ca9d25ca
Update CHANGELOG.md 2017-10-26 19:59:57 +02:00
Frank Schroeder b96d4f5af4
Update CHANGELOG.md 2017-10-26 19:58:38 +02:00
Frank Schröder 993799496b Merge pull request #3621 from hashicorp/issue-3576-docker-check-flaps
Docker check flaps with "connection reset by peer"
2017-10-26 19:53:57 +02:00
Frank Schroeder 712447026f
docker: add comment about "connection reset by peer" error 2017-10-26 12:14:19 +02:00
Frank Schroeder 7d05e55734
docker: stop previous check on replace 2017-10-26 12:03:07 +02:00
Frank Schroeder bf98779d84
docker: close idle connections on stop 2017-10-26 12:02:39 +02:00
Frank Schroeder 0a9d2a367e
docker: do not alloc a tty since this is not interactive 2017-10-26 11:56:54 +02:00
Frank Schroeder b1a5a6b64d
docker: make sure to log the error when we fall through 2017-10-26 11:56:36 +02:00
Frank Schroeder b907c4611d
docker: ignore "connection reset by peer"
The Docker agent closes the connection during read after we have
read the body. This causes a "connection reset by peer" even though
the command was successful.

We ignore that error here since we got the correct status code
and a response body.
2017-10-26 11:56:08 +02:00
James Phillips 17213f6e8f Merge pull request #3618 from hashicorp/b-lazy-freeport
Initialize freeport lazily to avoid runtime issues
2017-10-25 15:34:43 -07:00
Alex Dadgar b5f8a16ea3 Initialize freeport lazily to avoid runtime issues
This PR makes freeport initialize lazily rather than using an init
method.
2017-10-25 15:14:39 -07:00
James Phillips a73ed8c79a
Adds retry to API metrics test (flaky test). 2017-10-25 10:46:02 -07:00
Frank Schröder 2db8db3da8 Merge pull request #3612 from hashicorp/decouple-checks-from-agent
Decouple the code that executes checks from the agent
2017-10-25 19:36:47 +02:00
Frank Schroeder 2719194b6d
fix go vet issue 2017-10-25 19:30:35 +02:00
Frank Schroeder 1eb3d0e0d4
replace custom unique id with a UUID 2017-10-25 19:30:35 +02:00
Frank Schroeder 1dab004335
Decouple the code that executes checks from the agent 2017-10-25 11:18:07 +02:00
James Phillips a026be3812 Merge pull request #3610 from hashicorp/fix-skipped-tests
Fix skipped tests
2017-10-24 14:01:36 -07:00
Frank Schroeder a57e5acbf2
agent: fix TestRetryJoin 2017-10-24 20:35:37 +02:00
Frank Schroeder f398fe83b7
agent: fix TestRetryJoinFail 2017-10-24 20:35:37 +02:00
Frank Schroeder 8defdddf31
agent: fix TestRetryJoinWanFail 2017-10-24 20:35:36 +02:00
Frank Schroeder 4bb5cf425b
watch: make sure invoke channels timeout evenutally 2017-10-24 20:35:36 +02:00
Frank Schroeder c059270394
watch: run tests in parallel 2017-10-24 20:35:36 +02:00
Frank Schroeder cee28aee30
watch: convert TestEventWatch to use channels 2017-10-24 20:35:36 +02:00
Frank Schroeder be1d91966a
watch: convert TestKeyPrefixWatch to use channels 2017-10-24 20:35:36 +02:00
Frank Schroeder f24b06fe97
watch: convert TestKeyWatch_With_PrefixDelete to use channels 2017-10-24 20:35:36 +02:00
Frank Schroeder 8c1dcffdff
watch: convert TestKeyWatch to use channels 2017-10-24 20:35:36 +02:00
Frank Schroeder 899d11f1c9
watch: convert TestChecksWatch_Service to use channels 2017-10-24 20:35:35 +02:00
Frank Schroeder 4677ca436a
watch: convert TestChecksWatch_State to use channels 2017-10-24 20:35:35 +02:00
Frank Schroeder cc51b39eed
watch: convert TestServicesWatch to use channels 2017-10-24 20:35:35 +02:00
Frank Schroeder 7a470d377d
watch: convert TestServiceWatch to use channels 2017-10-24 20:35:35 +02:00
Frank Schroeder 813660507a
watch: convert TestNodesWatch to use channels 2017-10-24 20:35:35 +02:00
Frank Schroeder 8e5662ddd0
watch: use test agent instead of external Consul instance 2017-10-24 11:59:44 +02:00
James Phillips cf0336228b Update CHANGELOG.md 2017-10-23 22:54:37 -07:00
James Phillips d82cfc3b81 Update CHANGELOG.md 2017-10-23 22:53:29 -07:00
Alex Dadgar 98863b9694 Merge pull request #3609 from hashicorp/f-freeport-testing
Make freeport testing friendly
2017-10-23 16:34:27 -07:00
Alex Dadgar 791738a3a7 format vendor 2017-10-23 16:31:44 -07:00
Alex Dadgar af09d86892 Make freeport testing friendly
This PR allows the caller to decide if they would like to have the
calling test fail, have the caller panic on error, or handle the errors
themselves.
2017-10-23 16:28:02 -07:00
James Phillips d8bb6074e4 Update CHANGELOG.md 2017-10-23 08:58:49 -07:00