Commit Graph

5789 Commits

Author SHA1 Message Date
Frank Schroeder f439fc111d
test: simplify joining clusters 2017-05-05 17:07:04 +02:00
Frank Schroeder 0a7898f039
test: simplify tests that check for peers 2017-05-05 17:07:04 +02:00
Frank Schroeder 5c6be1cc7a
test: Fix badly formatted retry.Run tests 2017-05-05 17:07:03 +02:00
Frank Schroeder 16a7b52026
test: Drop WaitForResult from testutil and testrpc 2017-05-05 17:07:03 +02:00
Frank Schroeder 17f6ecdd12
test: convert remaining WaitForResult tests 2017-05-05 17:07:03 +02:00
James Phillips 7007c89870
retry: Removes the description parameter. 2017-05-05 17:07:03 +02:00
James Phillips ffdfe2c201
test: Tweaks ACL replication tests to converge faster w/less spam. 2017-05-05 17:07:03 +02:00
James Phillips b9fb20d0cf
test: Turns off ACLs for catalog and health WAN translation tests.
Since this was doing registration to a foreign DC, it needs extra time
for the route to the ACL datacenter to be set up. ACLs aren't part of
this test, so by disabling them we make this more reliable and converge
faster than if we had added a retry.
2017-05-05 17:07:03 +02:00
James Phillips c77663fe65
test: Moves a variable closer to where it's used. 2017-05-05 17:07:03 +02:00
James Phillips 2e512d6e6d
test: Turns down server health interval for faster convergence.
This fixes the autopilot tests.
2017-05-05 17:07:02 +02:00
Frank Schroeder 9435cadeee
test: Refactor WaitForResult tests with retry
Refactor tests that use testutil.WaitForResult to use retry.

Since this requires refactoring the test functions in general this patch
also shows the use of the github.com/pascaldekloe/goe/verify library
which provides a good mechanism for comparing nested data structures.
Instead of just converting the tests from testutil.WaitForResult to
retry the tests that performing a nested comparison of data structures
are converted to the verify library at the same time.
2017-05-05 17:07:02 +02:00
Frank Schroeder 9f369c93c7
retry: add retry package for retriable tests
The current retry framework in testutil/testprc.WaitForResult uses
a func() (bool, error) callback until it succeeds or times out.
It captures the last error and returns it.

    if err := testutil.WaitForResult(t, func() (bool, error) {
	if err := foo(); err != nil {
	    return false, err
	}
	...
	return true, nil
    }); err != nil {
	t.Fatal(err)
    }

This makes the test functions more complex than they need to be since
both the boolean and the error indicate a success or a failure.

The retry.Run framework uses a an approach similar to t.Run()
from the testing framework.

    retry.Run(t, func(r *retry.R) {
	if err := foo(); err != nil {
	    r.Fatal(err)
	}
    })

The behavior of the Run function is configurable so that different
timeouts can be used for different tests.
2017-05-05 17:07:02 +02:00
Frank Schroeder 927335c045
Fix imports on website 2017-05-05 17:07:02 +02:00
Frank Schroeder b1e97baacb
Fix imports 2017-05-05 17:07:00 +02:00
Rob Genova 3ecaa4e499 Eliminated 'consul' from all paths; misc. edits; wrap text at 80 characters 2017-05-05 05:24:04 +00:00
Rob Genova 270391b4b3 Add Consul Enterprise section to Docs 2017-05-04 22:30:11 +00:00
James Phillips 4f9b82d51b Update CHANGELOG.md 2017-05-04 14:37:49 -07:00
James Phillips 7c1c3e28f2 Merge pull request #3007 from hashicorp/config-json
Adds support for peers.json recover with Raft protocol version 3.
2017-05-04 14:31:21 -07:00
James Phillips d567a9b53d
Adds support for new-style peers.json recovery for newer Raft protocol versions. 2017-05-04 14:15:59 -07:00
James Phillips e17e514249
Updates vendored Raft library.
This pulls in https://github.com/hashicorp/raft/pull/207 to get
support for the new-style peers.json recovery file.
2017-05-04 13:27:33 -07:00
James Phillips 5e68e980ec Merge pull request #3006 from hashicorp/issue-2980-redux
Adds timeout and waits for feedback when asking the leader loop to reassert.
2017-05-04 12:02:52 -07:00
James Phillips 9c3abd33c3
Adds timeout and waits for feedback when asking the leader loop to reassert.
This adds on to the fix in #3004 for issue #2980.
2017-05-04 11:52:22 -07:00
James Phillips 1be6e3cf80 Update CHANGELOG.md 2017-05-04 10:36:08 -07:00
James Phillips 48017f1bd5 Merge pull request #3004 from hashicorp/issue-2980
Fixes panic in leader loop on step down w/o step up
2017-05-04 10:34:38 -07:00
Frank Schroeder cff494e47d
Do not block on reassertLeader during shutdown 2017-05-04 16:48:54 +02:00
Frank Schroeder cea98ae5f4
Straighten control flow in leader.go 2017-05-04 16:17:02 +02:00
James Phillips f3c1f516b4
Kick the leader loop on the proper thread after a snapshot restore, and
only if leadership is already established.
2017-05-04 16:17:01 +02:00
James Phillips 953347a6fe
Runs revoke leadership actions only if we've established leadership. 2017-05-04 16:17:01 +02:00
Frank Schroeder cbb963b2eb
Add make target for linux binary 2017-05-04 13:31:56 +02:00
Frank Schroeder 7f745951f4
Update CHANGELOG.md 2017-05-04 01:50:59 +02:00
Frank Schroeder f894a4cb7d Use bind address as source for outgoing connections (#2822)
This patch configures consul to use the bind address as the
source address for outgoing connections.

Fixes #2822
2017-05-04 01:41:47 +02:00
Frank Schroeder c772cecaab Do not modify config after creation II
Move code for finding the advertise address via a
template into consulConfig() so that the config
object is not modified after creation.
2017-05-04 01:41:47 +02:00
Frank Schroeder 6b96c9ff91 Do not modify config after creation
Make sure the RPCAdvertise address is always set
so that the configuration does not have to be modified
after creation.
2017-05-04 01:41:47 +02:00
Frank Schroeder 8213222931 Move GCE discovery code to command/agent/config_gce.go 2017-05-04 01:41:47 +02:00
Frank Schroeder 39fae5eac2 Move AWS discovery code to command/agent/config_aws.go 2017-05-04 01:41:47 +02:00
Frank Schroeder 3ea54c48a8 Move verifyUniqueListeners to command/agent/config.go 2017-05-04 01:41:47 +02:00
Frank Schroeder a0b98948d8 Cleanup agent config 2017-05-04 01:41:47 +02:00
Frank Schroeder 8aa969c966 Cleanup consul/config 2017-05-04 01:41:47 +02:00
Kostis Kapelonis a55e6c08b4 Added Spring Consul SDK for Spring applications 2017-05-03 09:22:41 +02:00
James Phillips 9658c2e831 Merge pull request #2996 from cryptomeme/patch-1
Itty bitty typo in consul watch help
2017-05-02 16:25:39 -07:00
Damon Buckwalter e9d6f5b3d0 Itty bitty typo 2017-05-02 16:08:07 -07:00
James Phillips 33ddd5a4bd Merge pull request #2995 from hashicorp/revert-2517-feature/ui-remove-acl-id-from-list
Revert "UI: remove ACL ID from the left list"
2017-05-02 14:29:09 -07:00
James Phillips 0e3d93a0bd Revert "UI: remove ACL ID from the left list" 2017-05-02 14:28:56 -07:00
Seth Vargo 2f8f0b2320 Merge pull request #2517 from bhuisgen/feature/ui-remove-acl-id-from-list
UI: remove ACL ID from the left list
2017-05-02 13:12:57 -07:00
James Phillips a3e1e8e7e5
Updates static assets to pick up #2712. 2017-05-02 10:52:06 -07:00
James Phillips c73203d335 Update CHANGELOG.md 2017-05-02 10:47:36 -07:00
James Phillips 94a1817605 Merge pull request #2712 from hebeworks/add-json-validation-to-ui
Add JSON validation to UI
2017-05-02 10:46:45 -07:00
Jack 2489355975 Add JSON validation to update view
JSON validation has now been added to the update view following the same format
as create. Since 'valueDecoded' does not have the ability to check if the value
is base64 before decoding then this must be checked first; if it is base64 then
use the decoded one, if not just get the value.

Change incorrect trailing span close to label.
2017-05-02 17:20:36 +09:00
Jack cb73d83f1e Add JSON validation to UI
JSON validation added to UI. This has been implemented through the use of a flag
to enable/disable the functionality with a watcher on the value to set the
success/error class on the textarea itself.

No hard validation added to the field.
2017-05-02 17:20:35 +09:00
Seth Vargo b162410b36 Merge pull request #2976 from jk563/master
Rearranged into alphabetical order
2017-05-01 14:55:35 -07:00