Commit Graph

199 Commits

Author SHA1 Message Date
Pivotal DX129 fe61650ef0 Merge remote-tracking branch 'upstream/master' 2016-09-01 10:15:32 -04:00
James Phillips 55ef6c54a6
Changes default for `leave_on_terminate` based on server or client mode. 2016-08-31 23:39:11 -07:00
James Phillips ed7356dd5c
Changes default DNS allow_stale to true. 2016-08-30 13:55:19 -07:00
Pivotal DX129 f9b6cd636e Fixed code formatting 2016-08-29 17:29:23 -04:00
Pierre Delagrave d9bd41fc4d Renamed dns config parameter internal_client_timeout for recursor_timeout 2016-08-26 15:22:04 -04:00
Pierre Delagrave 3fe117c24d Merge remote-tracking branch 'pierre/master' 2016-08-26 15:12:38 -04:00
James Phillips d64d53a0de Merge pull request #2303 from hashicorp/f-tunes
Adds performance tuning capability for Raft, detuned defaults, and supplemental docs.
2016-08-25 15:45:49 -07:00
James Phillips 17b70c7efd
Adds a max raft multiplier and tweaks documentation. 2016-08-25 15:36:05 -07:00
James Phillips 2822334bce
Stops scaling the commit timeout. 2016-08-25 15:05:40 -07:00
James Phillips 53c73f0ee5
Redacts the Circonus API token from stats JSON. 2016-08-24 23:27:25 -07:00
James Phillips 57db4bcce6
Adds performance tuning capability for Raft, detuned defaults, and supplemental docs. 2016-08-24 21:58:37 -07:00
Pierre Delagrave c8c4b9d344 Added a configurable timeout to the client making DNS queries to downstream name servers 2016-08-23 16:59:38 -04:00
James Phillips 4a3d7db24f
Adds ability to deregister a service based on critical check state longer than a timeout. 2016-08-16 01:00:26 -07:00
James Phillips bcb0f71759
Finishes up DNS compression by adding opt-out, tests, and documentation. Fixes trim routine. 2016-08-11 16:27:08 -07:00
James Phillips 18b817b575
Hides the acl_replication_token from JSON output, like in /v1/agent/self. 2016-08-03 21:24:09 -07:00
James Phillips d336bdd7b0
Adds basic ACL replication plumbing. 2016-08-03 21:24:04 -07:00
James Phillips 129db848c7 Tweaks the docs a bit. 2016-07-19 15:54:52 -07:00
James Phillips 500ea080d2 Removes top-level key support for Circonus configs.
This was a feature to help migrate to the new telemetry sub-structure,
but since this is all new we don't need it.
2016-07-19 15:46:57 -07:00
matt maier f4525d2582 fix: typo coupled, default token app to "consul", switch submit_interval/SubmitInterval to submission_interval/SubmissionInterval 2016-07-18 15:46:11 -04:00
matt maier fb76256c26 Add Circonus support for Telemetry metrics 2016-07-18 09:34:43 -04:00
Justin Lambert 9ece75fc78 allow automatically discovering aws ec2 consul servers 2016-05-11 19:41:41 -06:00
James Phillips cf00c11221 Sets an anti-footgun floor for the configurable reap time. 2016-04-20 13:49:51 -07:00
James Phillips eedeba682b Makes reap time configurable for LAN and WAN. 2016-04-11 00:38:25 -07:00
Alex Myasoedov 49cc50b0d3 #1878 Set default bind address to 127.0.0.1 in development mode 2016-04-07 21:25:33 +03:00
Sean Chittenden 5994c9efbf skip_leave_on_int's default changes based on agent mode
`skip_leave_on_int`'s behavior now changes based on whether or not the agent is acting as a client or server.

Fixes: 1687
2016-03-31 17:45:14 -07:00
Sean Chittenden 19721f5c3d Editorialize the comment re: UDPAnswerLimit
Prodded by: slackpad & fusiondog
2016-03-30 01:15:40 -07:00
Sean Chittenden 9fb64ab114 Allow adjusting the number of DNS records in a response...
Based on work done by @fusiondog in #1583, extend the concept to use an integer instead of a boolean.

Fixes: #1583 && #1481
2016-03-29 19:23:56 -07:00
Patrick Feliciano 74623c372a Adding singleton option to DNS for getaddrinfo bug. 2016-03-29 19:23:07 -07:00
Sean Chittenden a92cda7bcd Fix whitespace alignment in a comment 2016-03-23 16:00:39 -07:00
Chris Cooper fe0e3aaaa0 fixes issue #1661 and adds supporting test 2016-02-09 10:35:39 -05:00
James Phillips c60a526fde Sets up config for more address tags down the road, renames struct members. 2016-02-07 10:37:34 -08:00
Evan Gilman 496cf5ae73 Implement `translate_wan_addrs` config option
This knob tells consul whether it should prefer the WAN address (if set)
when making service lookups in remote datacenters. This enables
reachability for remote services which are behind a NAT.
2016-02-06 23:01:45 -08:00
James Phillips d60be51f01 Merge pull request #1284 from nbrownus/telemetry
Option to disable hostnames from telemetry
2016-02-06 22:00:14 -08:00
Sean Chittenden 7af6a94edb Factor out duplicate functions into a lib package
Consolidate code duplication and tests into a single lib package.  Most of these functions were from various **/util.go functions that couldn't be imported due to cyclic imports.  The consul/lib package is intended to be a terminal node in an import DAG and a place to stash various consul-only helper functions.  Pulled in hashicorp/go-uuid instead of consolidating UUID access.
2016-01-29 16:57:45 -08:00
Nate Brown 43a4f3fe02 Option to disable hostnames from telemetry 2016-01-29 13:44:48 -08:00
Ryan Uber 9002bfa37d agent: enable ui for dev mode 2015-12-26 20:39:42 -05:00
Ryan Uber afafae53fd consul: dev mode works 2015-12-26 20:19:36 -05:00
Ryan Uber 3cf6a173a5 agent: static UI is configurable 2015-12-24 22:21:34 -05:00
James Phillips d61661a98f Adds a Bool helper function. 2015-12-22 10:43:32 -08:00
James Phillips 0b1c346990 Changes sense of option to "reap" and uses nil for "not set". 2015-12-22 10:28:10 -08:00
James Phillips 2b257c922e Adds child process reaping when Consul is running as PID 1. 2015-12-21 21:47:35 -08:00
James Phillips 95c708f65e Adds Docker checks support to client API.
Also changed `DockerContainerId` to `DockerContainerID`, and updated the agent
API docs to reflect their support for Docker checks.
2015-11-18 07:40:02 -08:00
talwai bc12c5e711 Add DogStatsd configuration 2015-11-11 14:30:36 -05:00
Diptanu Choudhury 71ede8addb Implemented Docker health checks 2015-10-26 10:23:57 -07:00
James Phillips 660da92152 Makes the default protocol 2 and lets 3 interoperate with 2. 2015-10-23 15:23:01 -07:00
James Phillips ce0e9759f8 Fixes config merge fn for disabling coordinates and adds it to JSON. 2015-10-23 15:23:01 -07:00
James Phillips 89c7203f31 Adds coordinate sorting support to catalog queries for nodes and service nodes. 2015-10-23 15:23:01 -07:00
James Phillips d734697820 Turns down the coordinate sync rate a bit more. 2015-10-23 15:23:01 -07:00
James Phillips ad65d953f6 Scales coordinate sends to hit a fixed aggregate rate across the cluster. 2015-10-23 15:23:01 -07:00
James Phillips d12aa2ffab Moves batching down into the state store and changes it to fail-fast.
* A batch of updates is done all in a single transaction.
* We no longer need to get an update to kick things, there's a periodic flush.
* If incoming updates overwhelm the configured flush rate they will be dumped with an error.
2015-10-23 15:23:01 -07:00
James Phillips b9d5fb0f90 Flips the sense of the coordinate enable option. 2015-10-23 15:23:01 -07:00
James Phillips 86b112fe31 Does a clean up pass on the Consul side. 2015-10-23 15:23:01 -07:00
James Phillips 01d2452ea3 Merges config changes after rebase. 2015-10-23 15:23:01 -07:00
Derek Chiang a338e5efe8 Fix a comment 2015-10-23 15:23:01 -07:00
Derek Chiang 98d87b5dd5 Complete logic for sending coordinates 2015-10-23 15:23:01 -07:00
Dale Wijnand 5a28ebcaa3 Fix a bunch of typos. 2015-09-15 13:22:08 +01:00
Ryan Uber 1cc2429364 agent: atlas_endpoint is configurable 2015-08-27 11:08:01 -07:00
Hans Hasselberg 267e0caf81 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
Armon Dadgar 59d5992355 agent: Adding new VerifyHostname config 2015-05-11 15:13:58 -07:00
Armon Dadgar a86f31517b Merge pull request #816 from pepov/master
Support different advertise address for WAN gossip
2015-05-04 15:40:25 -07:00
Ryan Uber 72524e911d agent: allow configuring the stats prefix 2015-05-03 16:46:20 -07:00
pepov bac3ae9494 Add configuration option to specify a separate address for advertising on the wan 2015-03-28 16:08:19 +01:00
Michael Fraenkel 8c26836783 Support SesionTTLMin configuration
- Allow setting SessionTTLMin
- Validate on the Server
2015-03-27 05:13:57 -07:00
Armon Dadgar 62c3d49d64 agent: Do not expose AtlasToken or AtlasACLToken 2015-02-18 15:15:02 -08:00
Armon Dadgar 8d184a241f agent: Rename AtlasCluster to AtlasInfrastructure 2015-02-18 15:12:15 -08:00
Armon Dadgar 85a47ba584 agent: Adding atlas_join configuration 2015-02-18 15:12:14 -08:00
Armon Dadgar b4929c090a agent: Adding new Atlas configs 2015-02-18 15:12:14 -08:00
arnaud briche 7f91782478 - add proper parsing of CheckType.Timeout from string 2015-02-02 15:29:42 +07: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 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 21dd95d9af agent: beginning socket user/group/mode support as discussed in #612 2015-01-20 13:44:27 -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 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
Evan Broder ee6d59d4dd Add "only_passing" option to DNS config
This excludes nodes from DNS results if their healthchecks are in any
non-passing state, not just if they're critical.
2015-01-10 13:17:11 +01:00
Ryan Uber db3c502dcc Merge pull request #576 from hashicorp/f-verify-config
agent: reject config with invalid options
2015-01-05 14:51:28 -08:00
Ryan Uber 42ace3a6b5 agent: use mapstructure's Metadata.Unused to detect extraneous config 2015-01-05 14:41:19 -08:00
Ryan Uber b8740b62da agent: reject config with invalid options 2015-01-05 12:30:03 -08:00
Emil Hessman cb764c35e5 add ability to specify response headers on the HTTP API
Add an config object that allows adding HTTP header response fields to every
HTTP API response.

Each specified header is added to every response from all HTTP API endpoints.
Each individual endpoint may overwrite the specified header, which makes sure
that Consul headers such as 'X-Consul-Index' is enforced by the API.
2014-12-28 19:17:08 +01:00
Ryan Uber 81d4e5cfd4 agent: fixup all check definitions from json config 2014-11-30 18:27:37 -08:00
Armon Dadgar 6be29e17c2 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 f1f8c88228 Moved TLS Config stuff to tlsutil package 2014-11-18 11:03:36 -05:00
Atin Malaviya 0904c651a8 Change names to StartJoinWan, RetryJoinWan etc 2014-11-17 17:14:59 -05:00
Atin Malaviya f4fd8453ed 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 5b41170f47 Add start-wan-join, retry-wan-join and related configuration options and commandline options 2014-11-14 10:56:39 -05:00
Armon Dadgar cd936793ad Support old recursor config for backwards compatibility 2014-11-03 11:28:21 -08:00
foostan 35b006d884 Add multiple recursor definition support 2014-11-01 04:26:26 +09:00
Ryan Uber 28f31a8dd8 agent: add support for multiple checks and config mixing 2014-10-26 13:11:25 -07:00
Alexander Simmerl 461c1e18a5 Add multiple service definition support
This change-set adds another key to the configuration decoding called
`services`, which is expected to be a list of service definitions. It
follows the established convention of only allowing one of the keys:
`service`, `check`, `services`. For every entry in the list it calls
the corresponding decode method and appends it to the Servics of the
resulting Config.

While a similar result could be achieved with changing the Services
member of the Config struct to have named mapstruct tag it lacks the
proper time conversions provided by DecodeServiceDefinition.
2014-10-23 22:50:40 -04:00
Armon Dadgar bee5fe280c 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 6d75fc8fb2 agent: merge RetryInterval in config merger 2014-10-12 10:54:53 -07:00
Ryan Uber 7c91c08457 agent: first pass at join retry 2014-10-12 10:50:15 -07:00
Alex Wheeler 6cac440a8d Adding support for enabling the DNS truncate flag for UDP queries. 2014-09-30 15:15:36 -04:00
Armon Dadgar a8b66666f5 agent: Fixing config merge issue 2014-09-02 14:49:31 -07:00
Armon Dadgar d04880cc60 agent: Support for checkpoint 2014-09-02 14:23:43 -07:00
Armon Dadgar e86c5b2627 agent: Address overrides. Fixes #301 and #253 2014-09-02 12:47:40 -07:00