Commit Graph

47 Commits

Author SHA1 Message Date
James Phillips 28f8aa5559
Removes remoteConsuls in favor of the new router.
This has the next wave of RTT integration with the router and also
factors some common RTT-related helpers out to lib. While we were
in here we also got rid of the coordinate disable config so we don't
need to deal with the complexity in the router (there was never a
user-visible way to disable coordinates).
2017-03-16 16:42:19 -07:00
Kyle Havlovitz 953baed324
Convert agent command to use base.Command 2017-02-24 18:11:05 -08:00
Kyle Havlovitz b25f4c7d35
Add tests for node metadata functionality 2017-01-05 17:21:56 -08:00
James Phillips 51d1742025
Fixes a race in the monitor endpoint test that would cause panics. 2016-12-14 18:13:30 -08:00
James Phillips b7ebe0b384
Adds complete ACL coverage for non-utility agent endpoints.
This is a checkpoint - we need to complete some unit tests for agent/acl.go.
2016-12-14 14:53:40 -08:00
James Phillips 48603b4764
Adds complete ACL support for agent utility endpoints. 2016-12-14 11:12:55 -08:00
James Phillips dd82c8529d
Adds a unit test to make sure the status endpoint doesn't ever show anything
with "token" in the name.
2016-12-14 07:07:41 -08:00
Kyle Havlovitz 3649c18ef0 Fix race issue in monitor endpoint test 2016-12-01 13:40:00 -05:00
Kyle Havlovitz dd05afb32e Add reload/leave http endpoints (#2516) 2016-11-30 13:29:42 -05:00
Seth Vargo 1c55429a38
Add an API method for determining the best status
Given a list of HealthChecks, this determines the "best" status for the
collective group. This is useful for nodes and services, which may have
multiple checks associated with them.
2016-11-29 18:41:46 -05:00
Kyle Havlovitz ccab51b07c Add logWriter to agent Create() method 2016-11-28 18:36:26 -05:00
Kyle Havlovitz d91854f3b0 Add monitor http endpoint 2016-11-28 18:36:26 -05:00
Kyle Havlovitz 61311cff80 Test fixes (#2434)
* Test fixes in health_endpoint_test.go, agent_endpoint_test.go and rtt_test.go
* Don't reuse the same agent config in TestAgent_ReconnectConfigSettings
2016-10-25 13:46:54 -07:00
Sean Chittenden 7482a9207d
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 65f9017c63 Update Check API to use constants
Use constants where appropriate to advocate their use.  Also add a deprecation notice re: `updateTTL`.
2016-04-23 16:01:59 -07:00
James Phillips bd4f2ee6b7 Adds a new PUT-based TTL check update endpoint. 2016-03-02 17:54:01 -08:00
James Phillips 3f11bfaea4 Adds coordinate of agent to self endpoint. 2015-10-23 15:23:01 -07:00
Ryan Uber 948bd57d6a agent: testing node/service maintenance using tokens 2015-09-10 12:08:08 -07:00
Armon Dadgar f797130228 Fixing merge conflict 2015-05-11 16:48:10 -07:00
Ryan Uber 3c577a0069 agent: use an additional parameter for passing tokens 2015-05-04 17:48:05 -07:00
Ryan Uber 2496a70452 agent: more tests 2015-04-28 13:06:02 -07:00
Ryan Mills 370853d7ff Allow specifying a status field in the agent/service/register and agent/check/register endpoints.
This status must be one of the valid check statuses: 'passing', 'warning', 'critical', 'unknown'.
If the status field is not present or the empty string, the default of 'critical' is used.
2015-04-12 02:00:31 +00:00
Ryan Uber 5cd8800b60 agent: fix test 2015-01-21 14:12:18 -08:00
Ryan Uber 718cd94b50 agent: prevent duplicate error messages for maintenance api 2015-01-21 13:28:26 -08:00
Ryan Uber d65f4035b9 agent: support passing ?reason= for custom notes field values on maintenance checks 2015-01-21 12:21:57 -08:00
Ryan Uber 684474af1d agent: support adding multiple checks during service registration from the API 2015-01-20 21:48:45 -08:00
Ryan Uber 27de0adf3b agent: support multiple checks per service 2015-01-20 21:48:42 -08:00
Ryan Uber f29ea9f637 agent: maintenance logging + unique service check IDs 2015-01-16 15:38:13 -08:00
Ryan Uber 6d284052fc agent: test node maintenance mode 2015-01-16 15:38:13 -08:00
Ryan Uber 8ea9eb87ea agent: node maintenance mode works 2015-01-16 15:38:13 -08:00
Ryan Uber 3b815cd0aa agent: maintenance mode api's are idempotent 2015-01-16 15:37:52 -08:00
Ryan Uber 9ceb0f19d8 agent: test http endpoints for maintenance mode 2015-01-16 15:37:51 -08:00
Ryan Uber fe119a1bd2 agent: prefer config over persisted services/checks (#497) 2014-11-24 19:40:53 -08:00
Ryan Uber 3d712feba4 agent: fix failing test 2014-10-15 15:03:43 -07:00
William Tisäter ead134c890 Return both member and config in `/v1/agent/self` 2014-05-28 00:09:28 +02:00
William Tisäter a028c3ae93 Add `/v1/agent/self` and return local agent config 2014-05-27 01:15:33 +02:00
Armon Dadgar 9470f9a5a2 gofmt 2014-05-20 16:25:29 -07:00
William Tisäter f3354b028e Fix race condition in `TestHTTPAgentJoin_WAN` 2014-05-09 02:30:05 +02:00
William Tisäter e77c3180d8 Remove all sleeps from `agent_endpoint_test.go` 2014-05-07 22:50:18 +02:00
Armon Dadgar 738310bff0 agent: Simplifying configs 2014-04-11 15:46:55 -07:00
Armon Dadgar fd6a87748f agent: Support multiple tags per service registration 2014-04-03 12:12:23 -07:00
Armon Dadgar 9edd9ce82a agent: Fixing test with new struct 2014-02-04 18:32:17 -08:00
Armon Dadgar dbc2822f2c agent: test the register/deregister service endpoint 2014-01-30 15:56:03 -08:00
Armon Dadgar 82b551bd80 agent: Adding tests for agent check endpoints 2014-01-30 15:51:15 -08:00
Armon Dadgar 1ebb6db8c1 Seperate localState from Agent 2014-01-21 11:52:25 -08:00
Armon Dadgar a6b4f65813 Adding tests for checks and services endpoints 2014-01-20 15:06:44 -10:00
Armon Dadgar 020a84bada Adding tests for the agent HTTP endpoints 2014-01-06 13:21:48 -08:00