Commit Graph

104 Commits

Author SHA1 Message Date
Armon Dadgar b319c41bd9 agent: Snapshot and restore health state on reload. Fixes #693 2015-02-17 12:00:04 -08:00
Ryan Uber 103e9e7fc1 agent: clarify the valid characters for dns 2015-02-09 09:59:27 -08:00
Ryan Uber 722b255816 agent: warn on service tags with invalid chars 2015-02-09 09:30:06 -08:00
Ryan Uber 5e801c905d agent: Warn on dns-incompatible characters during service registration. Fixes #683. 2015-02-09 09:23:17 -08:00
arnaud briche e87afe341b - add Timeout field to CheckType and CheckHTTP to make http request timeout configurable by the client 2015-01-29 13:37:48 +07:00
foostan 401bc71cb2 Validate ServiceID/CheckID when deregistering. 2015-01-27 01:06:57 +09:00
Armon Dadgar e1a5d537d4 Merge pull request #625 from hashicorp/f-maintcmd
New "maint" command
2015-01-22 11:56:49 -08:00
Ryan Uber 44f3c20e50 command/maint: clean up 2015-01-22 11:14:28 -08:00
Ryan Uber 09fd2a7e94 command/maint: display active maintenance when no args are passed 2015-01-22 10:26:17 -08:00
Armon Dadgar cf04d6ae31 Merge pull request #622 from hashicorp/f-sockets
Unix domain sockets
2015-01-21 16:30:03 -08:00
Ryan Uber 124e7bfa7e agent: use const for default maintenance reason strings 2015-01-21 14:53:52 -08:00
Ryan Uber f00b5b542e agent: support passing ?reason= for custom notes field values on maintenance checks 2015-01-21 12:21:57 -08:00
Ryan Uber b6a0f2baae agent: fix maintenance check ID 2015-01-21 11:03:42 -08:00
Ryan Uber 674be58e55 agent: support multiple checks per service 2015-01-20 21:48:42 -08:00
Ryan Uber 21dd95d9af agent: beginning socket user/group/mode support as discussed in #612 2015-01-20 13:44:27 -08:00
Ryan Uber ba2d0fa7e3 agent: maintenance logging + unique service check IDs 2015-01-16 15:38:13 -08:00
Ryan Uber 7748c62d09 agent: node maintenance mode works 2015-01-16 15:38:13 -08:00
Ryan Uber 9ee1e6e858 agent: maintenance mode api's are idempotent 2015-01-16 15:37:52 -08:00
Ryan Uber 8819d71f99 agent: maintenance mode is persistent 2015-01-16 15:37:52 -08:00
Ryan Uber 3fbb2be6c0 agent: test agent service maintenance mode 2015-01-16 15:37:51 -08:00
Ryan Uber 2973cd9131 agent: first pass at service maintenance mode 2015-01-16 15:37:51 -08:00
Ryan Uber f01bb5cf3b agent: error if binding to existing socket file 2015-01-16 12:39:15 -08:00
Nicholas Capo 98eb935392 command/agent: HTTP Check: Create httpClient in Start()
For long (>10s) interval checks the http timeout is 10s, otherwise thetimeout is the interval. This means that a check *should* return
before the next check begins.
2015-01-13 00:01:15 +00:00
Nicholas Capo 50853265dd command/agent: Stop HTTP checks when the check is removed 2015-01-12 22:34:39 +00:00
Nicholas Capo fb5ba8d97d command/agent: Add simple HTTP check type
These checks make an `HTTP GET` request every Interval to the specified URL.
The status of the service depends on the HTTP Response Code.
`200` is passing, `503` is warning and anything else is failing.
2015-01-09 16:43:24 -06:00
Ryan Uber a24f6e3d4d agent: test service and check unloading 2015-01-07 22:32:14 -08:00
Ryan Uber 51fe9f32ff agent: consolidate service loading code, better logging 2015-01-07 22:01:43 -08:00
Ryan Uber cfde9313de agent: separate service and check loading/unloading concerns 2015-01-07 22:01:20 -08:00
Ryan Uber 0b9f2b0954 agent: persist service/check data using hashed service/check IDs (fixes #573) 2015-01-07 19:11:21 -08:00
Veres Lajos 3b1068387a typofixes - https://github.com/vlajos/misspell_fixer 2014-12-04 23:25:06 +00:00
Ryan Uber dd4fadfc9e agent: persist CheckType with health checks 2014-11-29 12:54:37 -08:00
Ryan Uber b7587cac42 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 9f9087badb agent: prefer config over persisted services/checks (#497) 2014-11-24 19:40:53 -08:00
Ryan Uber 2ebe85414f agent: pass error through when writing state files 2014-11-24 01:58:39 -08:00
Ryan Uber 79ba25b94d agent: default restored checks to critical status 2014-11-24 01:15:18 -08:00
Ryan Uber 46a5272a8a agent: first pass at local service and check persistence 2014-11-24 01:10:27 -08:00
Ryan Uber 8a652c6ffa agent: fix loading keyring on agent start 2014-11-19 16:37:40 -08:00
Ryan Uber 7a74f559b9 command: remove -init argument from keyring, auto-persist keyrings when using agent -encrypt 2014-11-19 16:35:13 -08:00
Ryan Uber 431b366d4f agent: split keyring functionality out of agent.go 2014-11-19 16:32:32 -08:00
Ryan Uber 2220ccdac2 command: various cleanup 2014-11-19 16:31:06 -08:00
Ryan Uber 353b67826a command: use separate key files for LAN/WAN 2014-11-19 16:31:06 -08:00
Ryan Uber 530f3ba747 command/keys: refactor, restrict key operations to server nodes 2014-11-19 16:31:06 -08:00
Ryan Uber 8a40f3888c agent: move keyring initialization out of agent, add -init option to keys command 2014-11-19 16:31:06 -08:00
Ryan Uber 0952535e33 agent: fix keyring loading when config is passed off 2014-11-19 16:31:06 -08:00
Ryan Uber b6037ef323 agent: clean up keyring file implementation 2014-11-19 16:31:06 -08:00
Ryan Uber fcb0961436 agent: refactor keyring loader 2014-11-19 16:31:06 -08:00
Ryan Uber 46ce9e936f command/keys: remove key command implemented 2014-11-19 16:30:22 -08:00
Ryan Uber 1ac6b10aed command/keys: use key command implemented 2014-11-19 16:30:22 -08:00
Ryan Uber 7b6f3d6dcc agent: install key command implemented 2014-11-19 16:30:22 -08:00
Ryan Uber 67b179ccc9 command: basic rpc works for keys command 2014-11-19 16:30:21 -08:00