Commit Graph

520 Commits

Author SHA1 Message Date
Ryan Uber b69b780408 agent: error from KVS endpoint if incompatible flags are passed. Fixes #432 2015-01-23 12:48:39 -08:00
Ryan Uber 67190e6f68 agent: more lenient dns response test 2015-01-22 15:31:12 -08: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 5aa69827f8 agent: fix test 2015-01-21 14:12:18 -08:00
Ryan Uber 61d17e65f5 agent: prevent duplicate error messages for maintenance api 2015-01-21 13:28:26 -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 d9a3e673b0 agent: change node maintenance endpoint 2015-01-21 10:57:44 -08:00
Ryan Uber 9c69dc05fb agent: use strconv.ParseBool for parsing maintenance enable flag 2015-01-21 09:53:31 -08:00
Ryan Uber 46d5dcfc17 agent: comments for new anti-entropy functionality 2015-01-20 21:48:46 -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 0c31e5851c agent: only send service with check sync if it is out of sync 2015-01-20 21:48:46 -08:00
Ryan Uber 949ddefbc8 agent: refactor syncChecks 2015-01-20 21:48:46 -08:00
Ryan Uber 2a7211cd5d agent: support adding multiple checks during service registration from the API 2015-01-20 21:48:45 -08:00
Ryan Uber 674be58e55 agent: support multiple checks per service 2015-01-20 21:48:42 -08:00
Ryan Uber c958824bb6 agent: use squash mapstructure tag to properly decode embedded structs 2015-01-20 21:10:58 -08:00
Ryan Uber b1dae530d4 agent: use interface for file permissions 2015-01-20 18:53:18 -08:00
Ryan Uber 782b0ddd88 agent: test permissions are set on rpc socket 2015-01-20 16:57:00 -08:00
Ryan Uber 99d4e7831e agent: fix tests 2015-01-20 16:50:21 -08:00
Ryan Uber a6c877c7ee agent: re-add support for user name in socket perms 2015-01-20 16:21:23 -08:00
Ryan Uber 145c56b47d agent: test Unix domain socket permission settings 2015-01-20 14:32:15 -08:00
Ryan Uber 450d05575d agent: adjusting tests for new behavior of sockets 2015-01-20 14:13:36 -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 2530e5ff05 agent: test agent rpc unix socket create failure 2015-01-19 09:56:59 -08:00
Ryan Uber ba96535cfc Merge pull request #610 from dave-tucker/bug/609
Don't forget to Shutdown the DNS Server!
2015-01-16 16:46:37 -08:00
Dave Tucker 18b5ab3539 Don't forget to Shutdown the DNS Server!
Fixes #609

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-17 00:30:53 +00:00
Ryan Uber ba2d0fa7e3 agent: maintenance logging + unique service check IDs 2015-01-16 15:38:13 -08:00
Ryan Uber 8cf4e9889e agent: test node maintenance mode 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 35c10a902f agent: test http endpoints for maintenance mode 2015-01-16 15:37:51 -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
Ryan Uber 56c3e488a9 agent: test socket file overwrite 2015-01-16 10:37:13 -08:00
Ryan Uber 4c3ec248a5 agent: fixing up tests 2015-01-16 09:58:37 -08:00
Ryan Uber bf48651c58 agent: only ignore errors on IsNotExist() 2015-01-16 09:14:52 -08:00
Ryan Uber 4675cdf01c agent: beginning refactor 2015-01-16 00:45:03 -08:00
Jeff Mitchell 9fcea08dbb Ensure a socket is created for permissions adjustment tests and fix some
items pointed out in the code review

This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-15 14:33:44 +00:00
Jeff Mitchell 32d2c6b848 Add a Unix socket RPC test. I modified some code in the testing library to not make assumptions about the listening socket; all RPC tests still pass. Still to do: Unix socket HTTP test.
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Jeff Mitchell 0cc009c480 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
Jeff Mitchell 8362e3e9eb Tests for populateUnixSocket. Still need to write tests for the other major function, and basic socket listening tests.
This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Jeff Mitchell 11a3ce0bdd RPC and HTTP interfaces fully generically-sockified so Unix is supported.
Client works for RPC; will honor CONSUL_RPC_ADDR. HTTP works via consul/api;
honors CONSUL_HTTP_ADDR.

The format of a Unix socket in configuration data is:
"unix://[/path/to/socket];[username or uid];[gid];[mode]"

Obviously, the user must have appropriate permissions to create the socket
file in the given path and assign the requested uid/gid. Also note that Go does
not support gid lookups from group name, so gid must be numeric. See
https://codereview.appspot.com/101310044

When connecting from the client, the format is just the first part of the
above line:
"unix://[/path/to/socket]"

This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Armon Dadgar 96c7ce120e command/agent: Minor cleanups 2015-01-13 12:18:18 -08:00
Armon Dadgar 713d30c73e Merge pull request #592 from nicholascapo/check-http
command/agent: Add simple HTTP check type
2015-01-13 12:11:50 -08:00