Commit Graph

94 Commits

Author SHA1 Message Date
Ryan Uber c01277725a agent: beginning socket user/group/mode support as discussed in #612 2015-01-20 13:44:27 -08:00
Ryan Uber 49127722ec 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 f026b8781e 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 263614d596 agent: error if binding to existing socket file 2015-01-16 12:39:15 -08:00
Ryan Uber 61d2f71d14 agent: only ignore errors on IsNotExist() 2015-01-16 09:14:52 -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
Jeff Mitchell 400eadd671 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
Ryan Uber 33bd157a61 agent: separate service and check loading/unloading concerns 2015-01-07 22:01:20 -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
Ali Abbas ecac719bb8 fix Sprintf formatting 2014-11-25 20:06:33 +01:00
Ryan Uber fe119a1bd2 agent: prefer config over persisted services/checks (#497) 2014-11-24 19:40:53 -08:00
Ryan Uber a675b5faae agent: fix gossip encryption detection 2014-11-19 16:37:40 -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 d02afd42fb agent: -encrypt appends to keyring if one exists 2014-11-19 16:36:01 -08:00
Ryan Uber 295f876923 command/agent: fix up gossip encryption indicator 2014-11-19 16:35:37 -08:00
Ryan Uber c59107f08e command: remove -init argument from keyring, auto-persist keyrings when using agent -encrypt 2014-11-19 16:35:13 -08:00
Ryan Uber a9f3cbd7f0 command: various cleanup 2014-11-19 16:31:06 -08:00
Ryan Uber 6609cb680b command: use separate key files for LAN/WAN 2014-11-19 16:31:06 -08:00
Ryan Uber a36ab53f25 agent: move keyring initialization out of agent, add -init option to keys command 2014-11-19 16:31:06 -08:00
Ryan Uber 3e64ed70df agent: clean up keyring file implementation 2014-11-19 16:31:06 -08:00
Ryan Uber 2e92e19760 agent: refactor keyring loader 2014-11-19 16:31:06 -08:00
Ryan Uber 61e3647ac1 command: warn when passing -encrypt when keyring already exists 2014-11-19 16:30:21 -08:00
Ryan Uber 208b5ae58f command: create serf dir if it doesn't exist, document -disable-keyring arg 2014-11-19 16:30:21 -08:00
Ryan Uber 8a4ed84711 consul: first pass at keyring integration 2014-11-19 16:30:20 -08:00
Armon Dadgar dd41c69389 Merge pull request #478 from amalaviy/https
Added HTTPS support via a new HTTPS Port configuration option
2014-11-19 11:17:10 -08:00
Atin Malaviya 2bd0e8c745 consul.Config() helper to generate the tlsutil.Config{} struct, 30 second keepalive, use keepalive for HTTP and HTTPS 2014-11-18 17:56:48 -05:00
Atin Malaviya 46178dbb37 Change names to StartJoinWan, RetryJoinWan etc 2014-11-17 17:14:59 -05:00
Atin Malaviya 59a68ecc26 Added HTTPS support via a new HTTPS Port configuration option similar to the HTTP Port. 2014-11-17 14:29:35 -05:00
Atin Malaviya df8d099f49 Add start-wan-join, retry-wan-join and related configuration options and commandline options 2014-11-14 10:56:39 -05:00
foostan 4d8f1c2133 Add multiple recursor definition support 2014-11-01 04:26:26 +09:00
Ryan Uber 5324e71cec agent: Filter messages logged to syslog. Fixes #272 2014-10-13 22:38:12 -07:00
Armon Dadgar 2c1add1c67 Merge pull request #396 from ryanuber/f-retry-join
agent: Retry failed joins on agent start
2014-10-13 10:46:10 -07:00
Ryan Uber b78e063ea7 command: formatting 2014-10-12 12:45:40 -07:00
Ryan Uber 1ec68be726 command/agent: add help for retry join 2014-10-12 12:35:25 -07:00
Ryan Uber 0266592205 agent: first pass at join retry 2014-10-12 10:50:15 -07:00
Anton Lindström 7f8f3c8edc Remove redundant assignment 2014-09-29 14:22:31 +02:00
Armon Dadgar 2067cc32dd agent: Fixing issue with multiple watches. Fixes #337 2014-09-15 10:56:04 -07:00
Armon Dadgar a1591d21d7 agent: Support for checkpoint 2014-09-02 14:23:43 -07:00
Armon Dadgar 55c695493b agent: Address overrides. Fixes #301 and #253 2014-09-02 12:47:40 -07:00
Armon Dadgar 47e30adf13 agent: statsd support. Fixes #247 2014-09-02 11:26:17 -07:00
Armon Dadgar 168ddedcee agent: Support encrypt CLI flag. Fixes #245. 2014-08-22 15:08:15 -07:00
Armon Dadgar f82a38ab12 agent: First pass at agent-based watches 2014-08-21 13:09:13 -07:00
Armon Dadgar 358b473e01 Updating documentation for new bootstrap method 2014-07-01 15:02:26 -07:00
Armon Dadgar 80b86c9ee9 Rename Expect to BootstrapExpect. Fixes #223. 2014-06-19 17:08:55 -07:00
Robert Xu a2fea2ce55 Utilise new raft.SetPeers() method, move expect logic to leader.go.
This way, we don't use EnableSingleMode, nor cause chaos adding peers.

Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-18 12:03:30 -04:00
Robert Xu 31c392813c Add expect bootstrap '-expect=n' mode.
This allows for us to automatically bootstrap a cluster of nodes after
'n' number of server nodes join. All servers must have the same 'n' set, or
they will fail to join the cluster; all servers will not join the peer set
until they hit 'n' server nodes.

If the raft commit index is not empty, '-expect=n' does nothing because it
thinks you've already bootstrapped.

Signed-off-by: Robert Xu <robxu9@gmail.com>
2014-06-16 17:40:33 -04:00
Armon Dadgar 4f77db2d47 agent: Watch reload channel for trigger 2014-06-11 10:53:28 -07:00
Armon Dadgar 1021f48ad2 agent: Set custom syslog facility. Fixes #170. 2014-06-11 10:28:55 -07:00