Commit Graph

80 Commits

Author SHA1 Message Date
James Phillips bc6efbae18 Sets an anti-footgun floor for the configurable reap time. 2016-04-20 13:49:51 -07:00
James Phillips 32389a9822 Makes reap time configurable for LAN and WAN. 2016-04-11 00:38:25 -07:00
James Phillips 79bd1fd4bb Sets up config for more address tags down the road, renames struct members. 2016-02-07 10:37:34 -08:00
Evan Gilman a8fd9542dc Add tests for consul WAN translation 2016-02-06 23:01:45 -08:00
James Phillips c1305a08ea Makes the version upshift code look at the correct version field. 2015-10-27 14:44:34 -07:00
James Phillips aea2194ce3 Makes the default protocol 2 and lets 3 interoperate with 2. 2015-10-23 15:23:01 -07:00
James Phillips 59b710894d Adds tests for HTTP interface. Removes a stray mark. 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
Ryan Uber 8eea77d58f agent: testing scada client creation in command 2015-08-25 20:22:22 -07:00
Ryan Uber f424f94d45 agent: vet fixes 2015-07-14 11:42:51 -07:00
Ryan Uber 715f69cce8 Merge pull request #1004 from i0rek/advertise_addrs
Add advertise_addrs.
2015-06-23 12:32:07 -07:00
Hans Hasselberg 4598087df3 Implement advertise_addrs for SerfLan, SerfWan and RPC.
Fixes #550.
This will make it possible to configure the advertised adresses for
SerfLan, SerfWan and RPC. It will enable multiple consul clients on a
single host which is very useful in a container environment.

This option might override advertise_addr and advertise_addr_wan
depending on the configuration.

It will be configureable with advertise_addrs. Example:

{
  "advertise_addrs": {
    "serf_lan": "10.0.120.91:4424",
    "serf_wan": "201.20.10.61:4423",
    "rpc": "10.20.10.61:4424"
  }
}
2015-06-23 21:23:45 +02:00
Ryan Uber e4f937f71d agent: use persist/load/purge convention for function names 2015-06-08 09:35:10 -07:00
Ryan Uber 08a12ffd5b agent: test check state restoration from AddCheck 2015-06-05 17:33:34 -07:00
Ryan Uber bd448d27fe agent: check state is purged if expired 2015-06-05 16:59:41 -07:00
Ryan Uber 7d8993e0f0 agent: purge check state when checks are deregistered 2015-06-05 16:57:14 -07:00
Ryan Uber 8c9facbff0 agent: testing state persistence, recovery, and expiration 2015-06-05 16:45:05 -07:00
Ryan Uber 3ce3c663ad Fix tests after merge 2015-05-11 18:53:09 -07:00
Armon Dadgar f797130228 Fixing merge conflict 2015-05-11 16:48:10 -07:00
Ryan Uber d0a28482ff agent: use service ID field to determine associated health checks during deregister 2015-05-07 15:30:01 -07:00
Ryan Uber e7b00723f4 agent: restore check status when re-registering (updating) services 2015-05-06 12:28:42 -07:00
Ryan Uber ed067fd03c agent: allow persisted services to be updated on disk 2015-05-05 22:36:45 -07:00
Ryan Uber 3c577a0069 agent: use an additional parameter for passing tokens 2015-05-04 17:48:05 -07:00
Ryan Uber 67e9a04f48 agent: restore tokens for services and checks in config 2015-04-28 12:44:46 -07:00
Ryan Uber 802b4793df agent: backwards compat for persisted services from pre-0.5.1 2015-04-28 12:18:41 -07:00
Ryan Uber f069db21e3 agent: safer read methods for tokens 2015-04-28 11:53:53 -07:00
Ryan Uber 54b5f17629 agent: test coverage loading service/check tokens from persisted files 2015-04-27 22:46:01 -07:00
Ryan Uber 23eab5ebcc agent: fix deadlock reading tokens from state 2015-04-27 22:26:03 -07:00
Ryan Uber 75d182296f agent: add service/check token methods to reduce invasiveness 2015-04-27 22:01:01 -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 66d89ab4df agent: warn and purge checks which cannot be restored from agent state 2015-03-11 16:13:31 -07:00
Armon Dadgar 60f69224ea agent: Snapshot and restore health state on reload. Fixes #693 2015-02-17 12:00:04 -08:00
foostan 99659e9014 Add tests to remove service/check without an ID 2015-01-27 18:10:56 +09:00
Ryan Uber 8c1c230ce3 agent: use const for default maintenance reason strings 2015-01-21 14:53:52 -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 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 7d4801db29 agent: test agent service maintenance mode 2015-01-16 15:37:51 -08:00
Ryan Uber 705801ccca agent: fixing up tests 2015-01-16 09:58:37 -08:00
Ryan Uber ad19c0afc2 agent: beginning refactor 2015-01-16 00:45:03 -08:00
Jeff Mitchell f88536f192 Remove unnecessary ClientListenerAddr function. Rework config test functions to be cleaner. Start of runtime tests.
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Ryan Uber 86bcef81b5 agent: test service and check unloading 2015-01-07 22:32:14 -08:00
Ryan Uber dea0070a39 agent: persist service/check data using hashed service/check IDs (fixes #573) 2015-01-07 19:11:21 -08:00
Chavez 7c1aad7b1d agent: agent test fixes 2014-12-05 10:36:44 -08:00
Ryan Uber 9e52588cec agent: persist CheckType with health checks 2014-11-29 12:54:37 -08:00
Ryan Uber 4f14ba6326 agent: allow config reload to modify checks/services persistence
This change consolidates loading services and checks from both config
and persisted state into methods on the agent. As part of this, we
introduce optional persistence when calling RemoveCheck/RemoveService.

Fixes a bug where config reloads would kill persisted services/checks.
Also fixes an edge case:

1. A service or check is registered via the HTTP API
2. A new service or check definition with the same ID is added to config
3. Config is reloaded

The desired behavior (which this implements) is:

1. All services and checks deregistered in memory
2. All services and checks in config are registered first
3. All persisted checks are restored using the same logic as the agent
   start sequence, which prioritizes config over persisted, and removes
   any persistence files if new config counterparts are present.
2014-11-26 12:46:42 -08:00
Ryan Uber fe119a1bd2 agent: prefer config over persisted services/checks (#497) 2014-11-24 19:40:53 -08:00
Ryan Uber ce0d27caba agent: default restored checks to critical status 2014-11-24 01:15:18 -08:00