Frank Schroeder
2bf668b658
api: Add ServiceTags to Health state endpoint ( #153 )
...
This patch adds the ServiceTags to the /v1/health/state/<state>
endpoint.
Fixes #153
2017-04-28 15:00:08 -07:00
James Phillips
9ead18dbbb
Gets rid of zero-value initializer.
2017-04-28 08:52:50 -07:00
James Phillips
77b803c12b
Removes panic repro test.
2017-04-27 17:08:06 -07:00
James Phillips
e9606c225a
Embeds the mutex since it covers all fields.
2017-04-27 17:04:49 -07:00
James Phillips
3fa22aa42b
Fixes panic when timer fires as tombstone GC is being stopped.
2017-04-27 16:43:07 -07:00
James Phillips
e3ac9d5c1b
Cleans up some bad unit test failure cases.
2017-04-27 16:41:42 -07:00
James Phillips
8db344248b
Cleans up comments.
2017-04-27 16:41:28 -07:00
Frank Schroeder
9a2063bf6f
test: Speedup session renew tests
2017-04-27 10:34:30 -07:00
Frank Schroeder
8feb9e5423
test: Speedup TestClient_RPC_ConsulServerPing
2017-04-27 10:34:30 -07:00
Kyle Havlovitz
42cf797ad9
Add TLS cipher suite options and CA path support ( #2963 )
...
This patch adds options to configure the available
TLS cipher suites and adds support for a path
for multiple CA certificates.
Fixes #2959
2017-04-27 01:29:39 -07:00
Frank Schroeder
9e2332f6a1
golint: Fix existing comments
...
This needs more work.
2017-04-25 09:26:13 -07:00
Frank Schroeder
9de4555c0c
golint: Untangle if blocks with return in else
2017-04-25 09:26:13 -07:00
Frank Schroeder
f50d6871f9
golint: No stutter
2017-04-25 09:26:13 -07:00
Frank Schroeder
8c7bb7b65a
golint: Rename fields and structs
2017-04-25 09:26:13 -07:00
Frank Schroeder
f4a56d8a44
golint: Replace a += 1 with a++
2017-04-25 09:26:13 -07:00
Frank Schroeder
c7f367af56
golint: Consistent receiver name
...
Ensure the receiver name is consistent
2017-04-25 09:26:13 -07:00
Frank Schroeder
744ecc3234
golint: Use fmt.Errorf(...)
...
Replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
gofmt -w -r 'errors.New(fmt.Sprintf(a, b)) -> fmt.Errorf(a, b)' *.go
2017-04-25 09:26:13 -07:00
Frank Schroeder
ebdb73d8f2
golint: Drop the unused value from range
...
for i, _ := range foo -> for i := range foo
2017-04-25 09:26:13 -07:00
Frank Schröder
5f0a967507
Issue #2905 : Add check-not-exists to TXN endpoint
...
This patch adds support for asserting that a given
key does not exist in the KV store.
Fixes #2905
2017-04-20 17:50:52 -07:00
Frank Schroeder
9f8f258d4d
Remove duplicate constants
...
This patch removes duplicate internal copies of constants in the structs
package which are also defined in the api package. The api.KVOp type
with all its values for the TXN endpoint and the api.HealthXXX constants
are now used throughout the codebase.
This resulted in some circular dependencies in the testutil package
which have been resolved by copying code and constants and moving the
WaitForLeader function into a separate testrpc package.
2017-04-20 09:54:49 -07:00
Frank Schröder
892fa89399
Add datacenter to catalog node API ( #2917 )
...
This patch stores the datacenter of a node in memdb
and exposes it via the API in all places where a Node
structure is returned.
* /catalog/nodes
* /catalog/node/:node
* /catalog/service/:service
* /health/service/:service
* /query/:uuid/execute
2017-04-18 05:02:24 -07:00
James Phillips
002c70c4d4
Adds guard in session ACL check in case session is not found.
...
Fixes #2624 .
2017-04-13 15:03:17 -07:00
James Phillips
6055a7c0bd
Switches to reliable Raft leader notifications.
...
This fixes #2896 by switching to the `notifyCh` instead of the `leaderCh`,
so we get all up/down events from Raft regarding leadership. We also wait
for the old leader loop to shut down before we ever consider starting a
new one, which keeps that single-threaded and fixes the panic in that issue.
2017-04-13 14:17:32 -07:00
Kyle Havlovitz
4584d4f4e7
Add nil check to operator autopilot endpoint
2017-04-13 10:43:07 -07:00
Kyle Havlovitz
31a249a42e
Add formatting to autopilot init messages
2017-04-12 18:39:03 -07:00
Kyle Havlovitz
0924d5a2de
Reorganize version check logic for autopilot
2017-04-12 17:09:57 -07:00
Kyle Havlovitz
22620d5e73
Wait to initialize autopilot until all servers are >= 0.8.0
2017-04-12 16:05:13 -07:00
James Phillips
5b35ee3866
Tweaks error handling case to not panic further down.
2017-04-12 10:02:42 -07:00
Wim
7c8f25c36e
Fix ipv6 join failure
2017-04-06 23:27:39 +02:00
Kyle Havlovitz
4743895f40
Prefix autopilot log messages with 'autopilot'
2017-04-04 17:21:49 -07:00
Kyle Havlovitz
a7fca8d6a7
Use voter count instead of server count for required quorum
2017-04-04 15:42:17 -07:00
James Phillips
76fdd5f392
Moves operator sub-functions into their own files.
2017-03-30 12:35:50 -07:00
Kyle Havlovitz
074b8576a5
Merge pull request #2847 from hashicorp/remove-peer-by-id
...
Add CLI/API endpoints for removing peer by ID
2017-03-30 10:13:56 -07:00
Kyle Havlovitz
a2058d23ef
Add CLI/API endpoints for removing peer by ID
2017-03-30 10:13:32 -07:00
James Phillips
52651469dc
Bans check updates for nodes other than top-level reg. updates.
2017-03-29 16:17:58 -07:00
Kyle Havlovitz
35556a0eaf
Remove stale raft servers differently depending on minRaftVersion
2017-03-29 13:38:40 -07:00
Kyle Havlovitz
18c95b504a
Clean up raft servers without a corresponding serf entry
2017-03-29 12:52:00 -07:00
Kyle Havlovitz
c7c2ebaf24
Use the new raft api function for leaving if applicable
2017-03-27 12:31:38 -07:00
James Phillips
424d70ba5d
Cleans up a stray mark and fixes unit tests.
...
Ended up removing the leader_test.go server address change test as part
of this. The join was failing becase we were using a new node name with
the new logic here, but realized this was hitting some of the memberlist
conflict logic and not working as we expected. We need some additional
work to fully support address changes, so removed the test for now.
2017-03-27 01:28:54 -07:00
James Phillips
97e761f50f
Adds node ID integrity checking for cluster merges.
2017-03-27 00:15:42 -07:00
James Phillips
7340b5b7ad
Adds node ID integrity checking for the catalog.
2017-03-27 00:15:21 -07:00
James Phillips
a22c04f1bf
Gets rid of the Consul service exception under version 8.
...
Fixes #2816 .
2017-03-24 12:12:24 -07:00
James Phillips
56b55b743f
Makes the start/stop test less flaky.
2017-03-23 20:04:23 -07:00
James Phillips
44a73bea7e
Fixes up some new tests for the updated testutil.
2017-03-23 17:55:47 -07:00
Seth Vargo
dc47ebb082
Fix vet issues
2017-03-23 20:29:31 -04:00
Seth Vargo
fe4c8b3a00
Merge pull request #2824 from hashicorp/sethvargo/testutil
...
Reduce coupling with testing.T
2017-03-23 20:29:11 -04:00
Seth Vargo
2efa3bdff8
Use new APIs
2017-03-23 18:48:13 -04:00
James Phillips
582e6c5938
Fixes an issue where servers would delete catalog information set by
...
the node when they were trying to reconcile a member.
2017-03-23 15:01:46 -07:00
James Phillips
16a9f6d671
Modifies server reconcile path to not use the server's token for internal operations.
2017-03-23 13:34:30 -07:00
Kyle Havlovitz
37ea20cb44
Add advanced autopilot features
2017-03-22 15:25:16 -07:00