Commit Graph

65 Commits

Author SHA1 Message Date
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
James Phillips 7ce7d157da
Fixes up some broken unit tests. 2017-03-24 17:35:07 -07:00
James Phillips 8940d1c3fe
Keeps the service and check tokens around for deregistration.
We fixed a few related issues while we were in here. We now only let
services register checks with a matching token, and we also close out
service and check delete operations if the catalog deregister claims
it doesn't know about the ID of the service or check being deleted.
2017-03-24 17:15:20 -07:00
Seth Vargo 0170a28ec9
Use new APIs 2017-03-23 18:48:13 -04:00
James Phillips 6ca0173907
Adds catalog support for node IDs. 2017-01-18 14:26:42 -08:00
Kyle Havlovitz e44bcb9716
Add tests for node metadata functionality 2017-01-05 17:21:56 -08:00
Kyle Havlovitz b1760b223e Improve logging when deregistering a nonexistent service (#2492)
Log a warning instead of a success message when attempting to deregister a nonexistent service. In Consul 0.8 this can be changed to giving an error outright, but for now we can keep the idempotent delete behavior.
2016-11-09 16:56:54 -05:00
Kyle Havlovitz dce6702268 More flaky unit test fixes (#2449)
* More flaky unit test fixes
* Raise some test timeouts that were too low
2016-10-31 09:59:20 -07:00
Kyle Havlovitz e2d9114b34 Agent anti-entropy test fixes 2016-10-25 17:48:11 -07:00
James Phillips c780149b5d
Calls remove on checks and services in the local test. 2016-09-22 11:41:17 -07:00
James Phillips 4a3d7db24f
Adds ability to deregister a service based on critical check state longer than a timeout. 2016-08-16 01:00:26 -07:00
James Phillips 244174d2c0 Uses the HealthCheck Clone() method in local_test.go. 2016-04-11 00:20:24 -07:00
James Phillips cfe0651208 Syncs a check's output with the catalog when output rate limiting isn't in effect. 2016-04-10 21:20:39 -07:00
James Phillips 524aaae9b7 Increases wait to account for random stagger. 2016-02-07 13:56:45 -08:00
James Phillips 4be2ab1a75 Moves tagged wan address to be managed by anti-entropy, not serf. 2016-02-07 13:12:42 -08:00
James Phillips b59599742d Adds a test to make sure the local sync doesn't clobber tagged addresses. 2016-02-07 11:26:19 -08:00
James Phillips ecd3a1d1d2 Completes rebase of network coordinates to new memdb. 2015-10-23 15:23:01 -07:00
James Phillips e21b450f69 Runs go fmt after latest rebase. 2015-10-23 15:23:01 -07:00
James Phillips ad65d953f6 Scales coordinate sends to hit a fixed aggregate rate across the cluster. 2015-10-23 15:23:01 -07:00
James Phillips 5f754c4a87 Does some small cleanups based on PR feedback.
* Holds coordinate updates in map and gets rid of the update channel.
* Cleans up config variables a bit.
2015-10-23 15:23:01 -07:00
James Phillips 7e6d52109b Hardens Consul from bad coordinates from other nodes. 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 92567841d6 Removes one more WAN leftover. 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 f144d17b1c Address comments 2015-10-23 15:23:01 -07:00
Derek Chiang ab9262c656 Add a test case 2015-10-23 15:23:01 -07:00
James Phillips 0c90bdc61a Knocks out the Raft indexes before doing compare. 2015-10-15 14:59:09 -07:00
James Phillips 0b05dbeb21 Merge pull request #1235 from wuub/master
fix conflict between handleReload and antiEntropy critical sections
2015-09-17 07:28:39 -07:00
Wojciech Bederski c4537ed26f panic when unbalanced localState.Resume() is detected 2015-09-17 11:32:08 +02:00
Wojciech Bederski 24bc17eaa1 failing test showing that nested Pause()/Resume() release too early
see: #1173 / https://github.com/hashicorp/consul/issues/1173
2015-09-11 17:52:57 +02:00
Shawn Cook 66fd8fb2a0 Rename EnableTagOverride and update formatting 2015-09-11 08:35:29 -07:00
Shawn Cook 35f276f25d Add test cases TestAgentAntiEntropy_EnableTagDrift 2015-09-10 14:08:16 -07:00
Ryan Uber f5f7e401d5 agent: fix failing test 2015-06-11 15:13:10 -07:00
Ryan Uber 739d1fdf03 Merge pull request #891 from hashicorp/f-token
ACL tokens for service/check registration
2015-05-05 22:17:31 -07:00
Ryan Uber 2b62f2f172 agent: use an additional parameter for passing tokens 2015-05-04 17:48:05 -07:00
Ryan Uber 35f5a65fb7 agent: more tests 2015-04-28 13:06:02 -07:00
Ryan Uber 663a86f9b9 agent: backwards compat for persisted services from pre-0.5.1 2015-04-28 12:18:41 -07:00
Ryan Uber 442933650e agent: safer read methods for tokens 2015-04-28 11:53:53 -07:00
artushin 8decf5d394 adding check_update_stagger 2015-04-23 16:27:42 -05:00
Ryan Uber f417279761 agent: test anti-entropy sync 2015-04-08 12:36:53 -07:00
Ryan Uber 58eba95b98 agent: test service/check deletion with empty ID 2015-01-27 21:47:59 -08:00
Ryan Uber a4039aaa4d agent: simplify anti-entropy of services with multiple checks, add tests 2015-01-20 21:48:46 -08:00
Ryan Uber 5bf1abf7ef agent: fix local_test.go 2015-01-09 16:44:12 -08:00
Ryan Uber c2188440b2 agent: wrap deferred anti-entropy sync test in WaitForResult 2015-01-09 16:42:44 -08:00
Armon Dadgar 9f4955151a agent: Testing anti-entropy with service address 2015-01-08 12:02:04 -08:00
Veres Lajos 3b1068387a typofixes - https://github.com/vlajos/misspell_fixer 2014-12-04 23:25:06 +00:00
Armon Dadgar 5887242db2 agent: Handle service ACLs when doing anti-entropy 2014-12-01 11:43:01 -08:00
Armon Dadgar 4f1fa3a4ce Merge pull request #401 from hashicorp/f-healthcheck
Default services to "critical" state instead of "unknown"
2014-10-15 16:50:38 -07:00
Armon Dadgar e720a09aa4 Merge pull request #400 from hashicorp/f-service-filter
agent: Register "consul" service in agent layer
2014-10-15 16:48:57 -07:00
Ryan Uber aa6ffc90f0 agent: remove special case of consul service, adjust tests 2014-10-15 14:52:00 -07:00