70 Commits

Author SHA1 Message Date
Frank Schroeder
b56ffc93cb
test: run consul tests in parallel 2017-05-31 00:29:26 +02:00
Frank Schroeder
eddb1af603 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
Kyle Havlovitz
390f41d8d5
Add advanced autopilot features 2017-03-22 15:25:16 -07:00
James Phillips
0c93ff1d13
Keeps the old state store state if a restore fails. 2017-01-25 19:42:34 -08:00
James Phillips
7da2f513dc
Cuts KVS endpoints over to new fine-grained watch plumbing. 2017-01-25 09:58:22 -08:00
James Phillips
68e90d0f24
Adds a facility to notify when restores occur. 2017-01-25 09:58:22 -08:00
James Phillips
1d39ddbd4b
Adds fine-grained watches to session endpoints. 2017-01-25 09:58:22 -08:00
James Phillips
8b7977ccb3
Adds fine-grained watches to prepared query endpoints. 2017-01-25 09:58:22 -08:00
James Phillips
3675e5ceba
Adds fine-grained watches to coordinate endpoints. 2017-01-25 09:58:22 -08:00
James Phillips
ec90404df0
Adds fine-grained watch support to ACL endpoints. 2017-01-25 09:58:22 -08:00
James Phillips
dcb55c766b
Adds fine-grained watches to health endpoints. 2017-01-25 09:58:22 -08:00
James Phillips
b7b42d718a
Adds fine-grained watches to catalog endpoints. 2017-01-25 09:58:22 -08:00
Sean Chittenden
e9a2f5b40c
Chase casting types.CheckID to a string into the state_store.
It turns out the indexer can only use strings as arguments when
creating a query.  Cast `types.CheckID` to a `string` before calling
into `memdb`.

Ideally the indexer would be smart enough to do this at compile-time,
but I need to look into how to do this without reflection and the
runtime package.  For the time being statically cast `types.CheckID`
to a `string` at the call sites.
2016-06-07 16:59:02 -04:00
James Phillips
960b9d6fb6 Switches to "KV" instead of "KV" for the KV operations. 2016-05-11 10:58:27 -07:00
James Phillips
38d0f6676f Refactors TxnRequest/TxnResponse into a form that will allow non-KV ops.
This isn't needed/used yet, but it's a good hook to get in there so we
can add more atomic operations in the future. The Go API hides this detail
so that feels like a KV-specific API. The implications on the REST API are
pretty minimal.
2016-05-11 01:39:10 -07:00
James Phillips
33462ebea9 Adds an FSM persist and restore test for tagged addresses. 2016-02-07 11:36:39 -08:00
Sean Chittenden
8deec17f73 Use panic instead of returning a sentinel UUID values in unit tests 2016-02-01 16:42:04 -08:00
Sean Chittenden
7af6a94edb Factor out duplicate functions into a lib package
Consolidate code duplication and tests into a single lib package.  Most of these functions were from various **/util.go functions that couldn't be imported due to cyclic imports.  The consul/lib package is intended to be a terminal node in an import DAG and a place to stash various consul-only helper functions.  Pulled in hashicorp/go-uuid instead of consolidating UUID access.
2016-01-29 16:57:45 -08:00
James Phillips
8e1bea0192 Completes FSM support for prepared queries. 2015-11-15 17:06:00 -08:00
James Phillips
ecd3a1d1d2 Completes rebase of network coordinates to new memdb. 2015-10-23 15:23:01 -07:00
James Phillips
89c7203f31 Adds coordinate sorting support to catalog queries for nodes and service nodes. 2015-10-23 15:23:01 -07:00
James Phillips
e094f5a61d Adds snapshot save and restore of coordinates. 2015-10-23 15:23:01 -07:00
James Phillips
2cee9f7e2f Takes the node name out of the coordinate get call. 2015-10-23 15:23:01 -07:00
James Phillips
d12aa2ffab Moves batching down into the state store and changes it to fail-fast.
* A batch of updates is done all in a single transaction.
* We no longer need to get an update to kick things, there's a periodic flush.
* If incoming updates overwhelm the configured flush rate they will be dumped with an error.
2015-10-23 15:23:01 -07:00
James Phillips
86b112fe31 Does a clean up pass on the Consul side. 2015-10-23 15:23:01 -07:00
Derek Chiang
54a2815d9c Address comments 2015-10-23 15:23:01 -07:00
Derek Chiang
f657caf1dd Add more tests 2015-10-23 15:23:01 -07:00
James Phillips
3782fc53cb Makes the iterator naming more consistent. 2015-10-19 15:51:11 -07:00
James Phillips
ffe531c55f Converts sessions and ACLs over to iterators. 2015-10-19 14:56:22 -07:00
James Phillips
b6f9aee847 Fixes remaining non-KV index calclulations and adds a general getWatchTables thing. 2015-10-15 14:59:09 -07:00
James Phillips
181c216f53 Fixes index management for KVS. 2015-10-15 14:59:09 -07:00
James Phillips
51600fab08 Gets rid of the transitional "New" suffix on state store and RPC. 2015-10-15 14:59:09 -07:00
James Phillips
6ba70be33c Nukes old state store's connection to FSM and RPC. 2015-10-15 14:59:09 -07:00
James Phillips
b82d49240b Integrates new state store into session endpoint; returns table index always. 2015-10-15 14:59:09 -07:00
James Phillips
de00a2f81b Cuts FSM unit tests over to new state store. 2015-10-15 14:59:09 -07:00
James Phillips
009fd7d9f5 Integrates new state store for ACLs. 2015-10-15 14:59:09 -07:00
James Phillips
d57431e300 Gets new structs changes to compile, adds some corner case handling and extra unit tests. 2015-10-15 14:59:09 -07:00
Shawn Cook
ab91590bcb Update tests - NodeService init needs bool 2015-08-20 09:09:26 -07:00
Armon Dadgar
2783f2bfec consul: fixing test using wrong FSM 2015-07-06 14:33:58 -06:00
Armon Dadgar
35744c7210 consul: Adding flag to support future incompatible commands. Future self will thank me. 2015-05-05 19:44:21 -07:00
Emil Hessman
87dca96152 consul: clean up TempDirs in FSM tests 2015-01-26 08:34:23 +01:00
Armon Dadgar
4572e7c8ec consul: Testing KVSDeleteCAS in FSM 2015-01-08 17:26:12 -08:00
Armon Dadgar
23b9c96169 consul: Fixing merge conflict 2015-01-08 10:42:19 -08:00
Armon Dadgar
55ac84c463 consul: Test FSM Reap operations 2015-01-05 14:43:56 -08:00
Armon Dadgar
c22f172d84 consul: Test FSM restore of tombstones 2015-01-05 14:43:56 -08:00
Armon Dadgar
10604a6fa8 consul: Thread Tombstone GC through 2015-01-05 14:43:55 -08:00
Daniel Malon
051ac8eb0b advertise specific address for a service
Enable setting a specific address in a service definition for advertise. If no specific address is given it will fallback to the node address and reassemble the old behaviour.
2015-01-02 21:10:05 +00:00
Armon Dadgar
8a1969cc8c consul: Fixing key list index calculation 2014-11-12 17:55:45 -08:00
Armon Dadgar
c8ac05b39e consul: Fixing FSM path tests 2014-10-15 15:03:58 -07:00
Armon Dadgar
c832ea8aa3 consul: Fix non-deterministic ACL IDs 2014-10-09 12:23:32 -07:00