Commit Graph

826 Commits

Author SHA1 Message Date
Evan Gilman a8fd9542dc Add tests for consul WAN translation 2016-02-06 23:01:45 -08:00
Evan Gilman 28ce1b079f Explicitly set advertise address in agent tests
Otherwise, the tests will fail when run on a machine with multiple
private addresses
2016-02-06 23:01:45 -08:00
Evan Gilman d18dc81749 Consider WAN addresses during Node and SRV record lookup 2016-02-06 23:01:45 -08:00
Evan Gilman 0b741350b9 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
Evan Gilman d123b4dece Rectify value of `AdvertiseAddrWan` when set elsewhere
`AdvertiseAddrs` has been introduced as a configuration option, which
duplicates a few other options, namely `AdvertiseAddrWan`. We need to
use this value elsewhere, so rather than doing a precedence check every
time we need to access it, rectify the value of `AdvertiseAddrWan` to
match
2016-02-06 23:01:45 -08:00
James Phillips 1a828e3927 Store WanAddress during Service/Check sync 2016-02-06 23:01:45 -08:00
James Phillips a599e88507 Merge pull request #1284 from nbrownus/telemetry
Option to disable hostnames from telemetry
2016-02-06 22:00:14 -08:00
James Phillips 7273fb0470 Merge pull request #1654 from ryanslade/invalid-check-message
Updated invalid check error message.
2016-02-05 17:21:29 -08:00
Sean Chittenden 5ac7b893cc Use panic instead of returning a sentinel UUID values in unit tests 2016-02-01 16:42:04 -08:00
Sean Chittenden c470553b6b 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 541a98c9c7 Option to disable hostnames from telemetry 2016-01-29 13:44:48 -08:00
Ryan Slade 37c7a0e006 Updated invalid check error message.
Added some of the newer reasons this error could have occured.
2016-01-28 11:02:00 +02:00
James Phillips 0fcdd37107 Fixes the static asset generator for new pkg path, updates assets. 2016-01-15 10:21:42 -08:00
Seth Vargo dc9131a732 Use HTTPS + www. where appropriate 2016-01-13 17:44:01 -05:00
James Phillips b21ef7330f Merge pull request #1592 from hashicorp/b-reap
Adds support for the reap lock.
2016-01-13 09:37:54 -08:00
James Phillips d22fe5ba62 Adds support for the reap lock. 2016-01-12 21:10:25 -08:00
Matt McCoy f8a6b6db83 Add consul agent help for advertise-wan 2016-01-11 14:27:54 -05:00
James Phillips df361afed5 Merge pull request #1550 from hashicorp/f-devmode
Add a `-dev` mode for easy prototyping
2016-01-05 10:01:41 -08:00
Philippe M. Chiasson e308bc3733 remove address splitting 2016-01-05 11:49:40 -05:00
Philippe M. Chiasson 6f316138d3 Move logged client IP to the end of the log message 2015-12-30 15:39:34 -05:00
Philippe M. Chiasson 8e938d4d38 Merge branch 'master' of http://github.com/hashicorp/consul into issue/1447/http-access-logs 2015-12-30 15:38:30 -05:00
Ryan Uber f37c0facbe agent: enable ui for dev mode 2015-12-26 20:39:42 -05:00
Ryan Uber ce4cf8a542 consul: dev mode works 2015-12-26 20:19:36 -05:00
Ryan Uber b04510f934 agent: update assetfs output 2015-12-24 22:21:34 -05:00
Ryan Uber 52ad989405 agent: static UI is configurable 2015-12-24 22:21:34 -05:00
Ryan Uber 86f76205aa agent: initial web assets 2015-12-24 22:21:34 -05:00
Ryan Uber a262115679 agent: compile web assets into consul binary 2015-12-24 22:21:34 -05:00
Philippe M. Chiasson b8f8861d97 Merge branch 'master' of http://github.com/hashicorp/consul into issue/1447/http-access-logs 2015-12-22 14:55:18 -05:00
James Phillips 4dd7a5fbaa Adds a Bool helper function. 2015-12-22 10:43:32 -08:00
James Phillips d71036c4f0 Moves logger down where it's used for reaping. 2015-12-22 10:29:55 -08:00
James Phillips e1d456a079 Changes sense of option to "reap" and uses nil for "not set". 2015-12-22 10:28:10 -08:00
James Phillips 1e4aa28c9d Adds child process reaping when Consul is running as PID 1. 2015-12-21 21:47:35 -08:00
James Phillips 874d491ade Converts the DNS metric to a gauge which gives us a count and a time. 2015-12-21 18:25:09 -08:00
James Phillips 9e0ac674c3 Adds telemetry on number of DNS queries served, per-agent. 2015-12-21 17:01:28 -08:00
WangFenjin dcecbf4653 Fix typo 2015-12-08 17:45:01 +08:00
James Phillips b87aeec4e1 Removes the GOMAXPROCS warnings which are obsolete for Go 1.5+. 2015-11-25 17:59:16 -08:00
Philippe M. Chiasson 396df9a0c1 Add client ip to http access logs
Fixes #1447
2015-11-24 15:06:33 -05:00
James Phillips 23536f2b97 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
James Phillips 573f48ed3d Breaks up huge HTTP endpoint functions. 2015-11-17 09:16:04 -08:00
James Phillips a364a02da6 Avoids taking the length again when parsing DNS queries. 2015-11-17 08:40:47 -08:00
James Phillips a1e02996e5 Moves conversion of nil slices up to HTTP layer for prepared queries. 2015-11-15 17:06:00 -08:00
James Phillips 267c352c6d Adds a test to make sure a stale retry terminates. 2015-11-15 17:06:00 -08:00
James Phillips e6ccf5b9ed Returns a 404 from a get or execute of a nonexistent query. 2015-11-15 17:06:00 -08:00
James Phillips c9ef552385 Plumbs the service name back and uses agent-specific TTL settings as a fallback. 2015-11-15 17:06:00 -08:00
James Phillips cad6938474 Adds unit tests for prepared queries and DNS, using existing tests for equivalence. 2015-11-15 17:06:00 -08:00
James Phillips f9c91479ef Adds DNS support for prepared queries (needs tests). 2015-11-15 17:06:00 -08:00
James Phillips 38daaea503 Adds a slightly more flexible mock system so we can test DNS. 2015-11-15 17:06:00 -08:00
James Phillips 978fb443a7 Adds a note about obfuscating query name/ID from the logs. 2015-11-15 17:06:00 -08:00
James Phillips 124410b66c Adds an HTTP endpoint for prepared queries. 2015-11-15 17:06:00 -08:00
James Phillips a33e35fcce Moves DNS over to new shuffle and filter functions. 2015-11-15 17:06:00 -08:00