Ryan Uber
03fea4b091
consul: test baked-in distance sort
2016-06-21 12:54:18 -07:00
Ryan Uber
4c1afb1bc6
consul: use the Near field instead of PreferLocal
2016-06-21 12:39:40 -07:00
James Phillips
09cfda47ed
Merge pull request #2127 from hashicorp/b-remote-consuls-locking
...
Ensure locking of `Server`'s `remoteConsuls`.
2016-06-21 10:00:04 -07:00
James Phillips
aa1bb5a012
Merge pull request #2131 from hashicorp/b-misc-microoptimizations
...
Misc micro optimizations
2016-06-21 09:59:01 -07:00
Sean Chittenden
3c197bad30
Ensure locking of Server
's remoteConsuls
.
2016-06-20 22:59:49 -07:00
Sean Chittenden
b3df5d3a87
Misc comment improvements
2016-06-20 15:29:38 -07:00
Sean Chittenden
65edc0a374
Initialize a non-empty number of Consul Datacenters. No functional change.
2016-06-20 15:26:59 -07:00
Sean Chittenden
223f605b1e
Prefer rand.Int31n() over rand.Int31().
2016-06-20 15:26:27 -07:00
Sean Chittenden
c3e54b79fd
Fix deadlock in Consul RTT.
...
- consul/rtt.go:388: s.getDatacentersByDistance(). Acquires RLock()
- consul/rtt.go:341: sortDatacentersByDistance() RLock still held.
- consul/rtt.go:282: getDatacenterDistance() RLock still held.
- consul/rtt.go:268: getNodesForDatacenter(). Attempts to reacquire RLock(), hangs indefinitely.
2016-06-20 14:59:54 -07:00
Ryan Uber
100a46727f
consul: test raw PreferLocal functionality
2016-06-20 14:53:13 -07:00
Ryan Uber
3797e6544c
consul: support PreferLocal in PQ's
2016-06-20 14:24:40 -07: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
Sean Chittenden
63adcbd5ef
Revert "Move structs.CheckID
to a new top-level package, types
."
...
This reverts commit 2bbd52e3b44ff1b60939a8400264d534662d6d51.
2016-06-07 16:59:02 -04:00
Sean Chittenden
cbb945e76a
Move structs.CheckID
to a new top-level package, types
.
...
Per discussion w/ @slackpad, move this type to its own top-level package
2016-06-07 16:59:02 -04:00
Sean Chittenden
f5ab25163e
Move structs.CheckID
to a new top-level package, types
.
...
Per discussion w/ @slackpad, move this type to its own top-level package
2016-06-07 16:59:02 -04:00
Sean Chittenden
ddbe64a8c8
Float a type balloon. Some strings are square pegs in round holes.
...
This experiment was brought about because of variable naming
confusion where name and checkIDs were interchanged. Gave CheckID
an Qualified Type Name and chased downstream changes.
2016-06-07 16:59:02 -04:00
James Phillips
0f5aabcbbd
Merge pull request #2028 from hashicorp/f-atomic-kv
...
Adds support for atomic transactions spanning multiple KV entries.
2016-05-15 13:46:05 -07:00
Sean Chittenden
02b5b53c92
Remove unused peers variable from setupRaft().
2016-05-15 06:40:46 -07:00
James Phillips
778b975e7a
Adds a get-tree verb to KV transaction operations.
2016-05-13 16:57:39 -07:00
James Phillips
4bbaf1cd15
Switches GETs to a filtering model for ACLs.
2016-05-13 15:58:55 -07:00
James Phillips
fbfb90a694
Removes null results for deletes, and preps for more than one result from an operation.
2016-05-13 01:47:55 -07:00
James Phillips
a37bf9de56
Adds a read-only optimized path for transactions.
2016-05-13 00:34:05 -07:00
James Phillips
9443c6ba71
Adds a comment for the txnKVS() function.
2016-05-12 16:11:26 -07:00
James Phillips
04d99cd702
Makes get fail a transaction if the key doesn't exist.
2016-05-11 14:18:31 -07:00
James Phillips
4882a9fe43
De-nests the KV output structure (removes DirEnt member).
2016-05-11 13:48:03 -07: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
69f58ad04a
Moves txn code into a new endpoint, not specific to KV.
2016-05-10 21:58:02 -07:00
James Phillips
23545f97fe
Fixes some go vet findings in a unit test.
2016-05-10 20:01:52 -07:00
Sean Chittenden
fd63a81706
Remove stray type definition
...
Noticed while working on Nomad Client's server selection code.
2016-05-10 18:56:28 -07:00
James Phillips
fcb0c20867
Adds internal endpoint read ACL support and full unit tests.
2016-05-10 11:23:47 -07:00
James Phillips
2f51926852
Adds an empty get test case.
2016-05-09 22:18:26 -07:00
James Phillips
e491245062
Performs basic plumbing of KVS transactions through all the layers.
2016-05-09 22:15:49 -07:00
James Phillips
b7ae973642
Adds state store support for atomic KVS ops.
2016-05-05 15:46:59 -07:00
James Phillips
6c2aeb25ab
Splits existing KVS operations into *Txn helpers for later reuse.
2016-05-04 14:20:11 -07:00
James Phillips
9edca28203
Moves KVS-related state store code out into its own set of files.
2016-05-02 16:21:04 -07:00
Sean Chittenden
6cf21fbbe9
Add the list of Raft peers to Consul's Stats
...
```
% consul info
[snip]
raft:
[snip]
raft_peers = 127.0.0.1:8300
[snip]
```
Poached from: Nomad Project
2016-04-28 15:08:48 -07:00
James Phillips
8c8b146f77
Merge pull request #1884 from mtchavez/1541-data-dir-perms
...
command: Data directory permission error message
2016-04-12 22:06:49 -07:00
James Phillips
0e5aa5d808
Merge pull request #1895 from shoenig/fixtypo
...
doc: fix trivial typo s/NewFSMPath/NewFSM/
2016-04-12 21:53:24 -07:00
James Phillips
ed86e5cc72
Adds a clone method to HealthCheck and uses that in local.go.
2016-04-11 00:05:39 -07:00
Chavez
473908f636
Add description to rpc test client pool member failure message
2016-04-01 19:17:38 -07:00
Seth Hoenig
c3637e6ed7
doc: fix trivial typo s/NewFSMPath/NewFSM/
2016-03-29 20:52:17 -05:00
Sean Chittenden
7cdc056ca5
Rename server_details package to agent
2016-03-29 17:39:19 -07:00
Sean Chittenden
80f9f54bb3
Add a quick package doc for the servers package
2016-03-29 16:22:53 -07:00
Sean Chittenden
5501feecbe
Rename serverConfig to serverList
...
serverList is a vastly more accurate name. Chase accordingly. No functional change other than types and APIs.
2016-03-29 16:17:16 -07:00
Sean Chittenden
6185f931d8
Gratuitous rename 1/2
...
Reduce cognative load and perform an overdue rename. No functional change.
Rename the `server_manager` package to `servers`. Rename the `ServerManager` package to `Manager`. In `client`, rename `serverMgr` to `servers`.
2016-03-29 16:12:00 -07:00
Sean Chittenden
3666c87d2f
Remove two unused constants
2016-03-29 11:11:41 -07:00
Sean Chittenden
299d058d54
Remove useless comment residual from decomposing functions
2016-03-29 10:53:00 -07:00
Sean Chittenden
ec25ad84a6
EDYSLEXICMOMENT
2016-03-29 10:50:10 -07:00
Sean Chittenden
b684b15d94
Refactor out recocileServerList anon function
...
Add testing to reconcileServerList and test various server sizes.
Test that a percentage of nodes fail their Ping (50% in testing atm)
2016-03-29 02:45:38 -07:00