Commit Graph

135 Commits

Author SHA1 Message Date
James Phillips db9a72dde1
Merge branch 'master' into f-deregister-critical 2016-08-16 12:53:21 -07:00
James Phillips 817d7e93e4
Adds an "lan" tagged address so we have a way to get them all.
If we didn't have this, then there would be no way to know the LAN
address if address translation was turned on.
2016-08-16 10:49:03 -07:00
James Phillips b4f981c837
Adds ability to deregister a service based on critical check state longer than a timeout. 2016-08-16 01:00:26 -07:00
Sean Chittenden 8baf0d7a95
Use stable, monotonically increasing port numbers for tests 2016-06-20 14:33:46 -07:00
Sean Chittenden 0857e93d0b
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 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
Ryan Uber e3c2075a9d agent: first pass at local service and check persistence 2014-11-24 01:10:27 -08:00
Ryan Uber 4cd89a9113 Rebase against upstream 2014-11-19 16:45:49 -08:00
Ryan Uber c9118b53bf agent: fix loading keyring on agent start 2014-11-19 16:37:40 -08:00
Ryan Uber 196cbd27b2 agent: ignore -encrypt if provided when keyring exists 2014-11-19 16:37:40 -08:00
Ryan Uber f24ac482e3 agent: fix test cases 2014-11-19 16:36:18 -08:00
Ryan Uber d02afd42fb agent: -encrypt appends to keyring if one exists 2014-11-19 16:36:01 -08:00
Ryan Uber 355fc89f7f command: test generated keyring file content and conflicting args for agent 2014-11-19 16:32:06 -08:00
Ryan Uber f9fd1f3f05 agent: test loading keyring files for client and server 2014-11-19 16:31:40 -08:00
Armon Dadgar de35a8e38f agent: Fixing port collision in tests 2014-11-19 11:51:25 -08:00
Ryan Uber 398179dcad agent: pass notes field through for checks inside of service definitions. Fixes #449 2014-11-06 18:25:21 -08:00
Ryan Uber 6b119b98f0 agent: add test for consul service sync state 2014-10-17 14:43:52 -07:00
Armon Dadgar a1d2f9a3da Merge pull request #401 from hashicorp/f-healthcheck
Default services to "critical" state instead of "unknown"
2014-10-15 16:50:38 -07:00
Ryan Uber ec63686416 consul: kill remaining use of HealthUnknown 2014-10-15 10:14:46 -07:00
Ryan Uber ece81c11ac agent: re-use ConsulServiceID from consul package 2014-10-14 15:44:11 -07:00
Ryan Uber 5e66e2ae1e agent: auto-register the consul service on server nodes 2014-10-14 15:35:00 -07:00
Armon Dadgar 78b09c5764 agent: Fixing ACL tests with token param 2014-08-19 14:28:49 -07:00
Armon Dadgar bac1527281 agent: Fixing the ACL tests 2014-08-18 15:46:23 -07:00
William Tisäter 2c13f8a03e Re-configure `LeaderLeaseTimeout` to pass validation 2014-05-30 20:57:39 +02:00
Armon Dadgar 2845d24cfa Store check output in dedicated field. Fixes #59. 2014-04-21 16:20:22 -07:00
Armon Dadgar b1bfd97438 agent: Adding minimum check interval. Fixes #64. 2014-04-21 14:42:42 -07: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 d051d9cb23 agent: Adding methods to register services and checks 2014-01-30 13:39:02 -08:00
Armon Dadgar ae45656f59 Testing anti-entropy of services 2014-01-20 14:22:59 -10:00
Armon Dadgar 020a84bada Adding tests for the agent HTTP endpoints 2014-01-06 13:21:48 -08:00
Armon Dadgar d292e08bb2 Adding basic DNS framework 2014-01-02 13:12:05 -08:00
Armon Dadgar 8727220296 Pulling in the RPC framework from serf 2013-12-30 14:42:41 -08:00
Armon Dadgar 3d908d9edf Enable bootstrap mode for the tests 2013-12-24 16:53:30 -08:00
Armon Dadgar 851c4c8ed1 More HTTP endpoints 2013-12-23 16:20:51 -08:00
Armon Dadgar 06e11e4b08 Adding more agent tests 2013-12-23 13:52:10 -08:00