Commit Graph

1161 Commits

Author SHA1 Message Date
Preetha Appan 2c2e032eec Improve HTTP handler documentation 2017-10-21 20:51:37 -05:00
Hadar Greinsmark 0c5f5e2821 Implement HTTP Watch handler (#3413)
Implement HTTP Watch handler
2017-10-21 20:39:09 -05:00
Johan Brandhorst 3e0fd5ec2d Fixed indentation in Script + Interval
Remove newlines which were causing the text to not be rendered under the intended bullet point.
2017-10-20 14:02:31 +02:00
James Phillips 60af465b4e
Updates documentation for consul validate.
This makes it clear that you need to pass the full configuration,
and that the command won't work with config fragments.

Closes #3591
2017-10-19 18:59:05 -07:00
Preetha Appan 5af8492172 Documentation update for KMS support 2017-10-19 11:39:14 -05:00
Preetha Appan 6f286dd9b8 Update autopilot documentation to mention correct Consul version that defaults raft protocol to 3. 2017-10-19 11:31:29 -05:00
Jay dc903a4fb0 s/acesss/access (#3593)
Spell "access" correctly
2017-10-18 17:24:56 -07:00
Christopher "Chief" Najewicz bcbf2b0ed5 Update docs for retry_join cloud discovery to include snippet around (#3577)
using HTTP_PROXY, HTTPS_PROXY and NO_PROXY env vars when needed
2017-10-17 16:05:44 -07:00
James Phillips 6f31af82d6
Adds a note about the Raft protocol not being the same as the Consul protocol. 2017-10-13 16:54:48 -07:00
James Phillips eb916860ca
Adds a 1.0 section to the upgrade guide and cleans up the change log. 2017-10-13 16:46:36 -07:00
James Phillips cb41ae2428 Update sentinel.html.markdown.erb 2017-10-13 12:15:08 -07:00
csawyerYumaed f97ec6dc3b Update dns forwarding documentation (#3574)
Add details about setting up macOS to point to consul for services without the headache of dnsmasq, bind, etc.
2017-10-12 14:25:57 -07:00
Kyle Havlovitz d2b9ab2b4f
Clarify the docs around script check timeout behavior 2017-10-11 14:55:55 -07:00
Kyle Havlovitz eea2bd2753 Kill check processes after the timeout is reached (#3567)
* Kill check processes after the timeout is reached

Kill the subprocess spawned by a script check once the timeout is reached. Previously Consul just marked the check critical and left the subprocess around.

Fixes #3565.

* Set err to non-nil when timeout occurs

* Fix check timeout test

* Kill entire process subtree on check timeout

* Add a docs note about windows subprocess termination
2017-10-11 11:57:39 -07:00
Frank Schröder 9b2e3c2091 agent: add option to discard health output (#3562)
* agent: add option to discard health output

In high volatile environments consul will have checks with "noisy"
output which changes every time even though the status does not change.
Since the output is stored in the raft log every health check update
unblocks a blocking call on health checks since the raft index has
changed even though the status of the health checks may not have changed
at all. By discarding the output of the health checks the users can
choose a different tradeoff. Less visibility on why a check failed in
exchange for a reduced change rate on the raft log.

* agent: discard output also when adding a check

* agent: add test for discard check output

* agent: update docs

* go vet

* Adds discard_check_output to reloadable config table.

* Updates the change log.
2017-10-10 17:04:52 -07:00
Frank Schröder fa22ad4573 config: add generic method to translate between CamelCase and snake_case (#3557)
* doc: document discrepancy between id and CheckID

* doc: document enable_tag_override change

* config: add TranslateKeys helper

TranslateKeys makes it easier to map between different representations
of internal structures. It allows to recursively map alias keys to
canonical keys in structured maps.

* config: use TranslateKeys for config file

This also adds support for 'enabletagoverride' and removes
the need for a separate CheckID alias field.

* config: remove dead code

* agent: use TranslateKeys for FixupCheckType

* agent: translate enable_tag_override during service registration

* doc: add '.hcl' as valid extension

* config: map ScriptArgs to args

* config: add comment for TranslateKeys
2017-10-10 16:40:59 -07:00
James Phillips d1ad538345 Makes RPC handling more robust when rolling servers. (#3561)
* Adds client-side retry for no leader errors.

This paves over the case where the client was connected to the leader
when it loses leadership.

* Adds a configurable server RPC drain time and a fail-fast path for RPCs.

When a server leaves it gets removed from the Raft configuration, so it will
never know who the new leader server ends up being. Without this we'd be
doomed to wait out the RPC hold timeout and then fail. This makes things fail
a little quicker while a sever is draining, and since we added a client retry
AND since the server doing this has already shut down and left the Serf LAN,
clients should retry against some other server.

* Makes the RPC hold timeout configurable.

* Reorders struct members.

* Sets the RPC hold timeout default for test servers.

* Bumps the leave drain time up to 5 seconds.

* Robustifies retries with a simpler client-side RPC hold.

* Reverts untended delete.
2017-10-10 15:19:50 -07:00
James Phillips 25d32c8b7e Update compatibility.html.md 2017-10-09 14:18:37 -07:00
James Phillips 2695760055 Update compatibility.html.md 2017-10-09 14:18:23 -07:00
Radek Simko 03decc2a95 docs: agent/options gcp's project_name is optional
Per https://github.com/hashicorp/go-discover/blob/master/provider/gce/gce_discover.go#L53-L61
2017-10-08 13:08:50 +02:00
Preetha Appan e3e781e264 Update documentation with subcommand example 2017-10-06 15:23:43 -05:00
Preetha Appan 5d5e245417 Autocomplete support 2017-10-06 15:05:45 -05:00
Kyle Havlovitz dde743700f Merge pull request #3535 from hashicorp/metric-docs
Update metric names and add a legacy config flag
2017-10-04 17:39:16 -07:00
Kyle Havlovitz bd0c0cecc0
Move http request metric to the agent section 2017-10-04 17:36:10 -07:00
Kyle Havlovitz d5fec6b7ac
Add a test for legacy metrics with a whitelist filter 2017-10-04 17:27:57 -07:00
Kyle Havlovitz be04bfed34 Clean up subprocess handling and make shell use optional (#3509)
* Clean up handling of subprocesses and make using a shell optional

* Update docs for subprocess changes

* Fix tests for new subprocess behavior

* More cleanup of subprocesses

* Minor adjustments and cleanup for subprocess logic

* Makes the watch handler reload test use the new path.

* Adds check tests for new args path, and updates existing tests to use new path.

* Adds support for script args in Docker checks.

* Fixes the sanitize unit test.

* Adds panic for unknown watch type, and reverts back to Run().

* Adds shell option back to consul lock command.

* Adds shell option back to consul exec command.

* Adds shell back into consul watch command.

* Refactors signal forwarding and makes Windows-friendly.

* Adds a clarifying comment.

* Changes error wording to a warning.

* Scopes signals to interrupt and kill.

This avoids us trying to send SIGCHILD to the dead process.

* Adds an error for shell=false for consul exec.

* Adds notes about the deprecated script and handler fields.

* De-nests an if statement.
2017-10-04 16:48:00 -07:00
Kyle Havlovitz 0063516e5e
Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
Frank Schroeder 0f664d098f doc: drop last references to -retry-join-* options 2017-10-04 19:12:28 +02:00
Frank Schroeder 67570e1bc3 doc: document go-discover format change 2017-10-04 19:12:28 +02:00
Preetha Appan a855b69b54 Update ACL guide to describe the new list policy for Keys 2017-10-04 06:19:20 -05:00
Kyle Havlovitz 7c7927ff3d
Update snapshot agent docs 2017-09-29 12:28:04 -07:00
Frank Schroeder 544788d708 update docs 2017-09-29 20:26:43 +02:00
Preetha Appan dd2cb9f619 Fix grammar in containers guide. 2017-09-29 10:37:04 -05:00
Preetha Appan 429fc86479 Update containers guide to mention that Consul now handles nodes changing IP addresses. 2017-09-29 10:20:33 -05:00
James Phillips fcdd69a7cb Clarifies server requirement for bootstrap-expect.
Fixes #3510.
2017-09-28 22:02:37 -07:00
Preetha Appan acc32ccd2c Update sentinel documentation to remove features that are coming in a future release 2017-09-28 21:00:00 -05:00
Patrick Sodré 92546f9231
Update docs on RFC1464 vs RFC1035 options 2017-09-28 12:32:46 +02:00
Patrick Sodré 464611bae6
Update docs to include support for TXT records
- Add explanation to the difference between RFC1035
    and RFC1464 queries.
2017-09-28 12:32:42 +02:00
James Phillips 107832c762 Update options.html.md 2017-09-27 15:55:46 -07:00
James Phillips da912aedeb Update options.html.md 2017-09-27 15:40:00 -07:00
James Phillips 2e7da8ecd7 Cleans up some docs for the 1.0 release. (#3508)
* Cleans up information about file extensions, now that they are required.

* Removes references to deprecated configuration options.

* Adds docs for multiple bind address support.
2017-09-27 15:30:30 -07:00
Alex Dadgar ccccba75be Fix mispelled words 2017-09-27 11:20:01 -07:00
James Phillips 55fb1fcfac Adds a "required" note for the port in the network segments configuration. 2017-09-26 17:57:34 -07:00
Frank Schröder 707f8e329a Metrics service prefix (#3498)
* metrics: replace statsite_prefix with service_prefix

The metrics prefix isn't statsite specific and is in fact used
for all metrics providers. Since we are deprecating fields
anyway we should fix this one as well.

Fixes #3293

* Updates docs and sorts telemetry section.

* Renames to "metrics_prefix" to disambiguate with Consul services.

* Updates the change log.
2017-09-26 17:49:55 -07:00
James Phillips fcaa889116 Bumps default Raft protocol to version 3. (#3477)
* Changes default Raft protocol to 3.

* Changes numPeers() to report only voters.

This should have been there before, but it's more obvious that this
is incorrect now that we default the Raft protocol to 3, which puts
new servers in a read-only state while Autopilot waits for them to
become healthy.

* Fixes TestLeader_RollRaftServer.

* Fixes TestOperator_RaftRemovePeerByAddress.

* Fixes TestServer_*.

Relaxed the check for a given number of voter peers and instead do
a thorough check that all servers see each other in their Raft
configurations.

* Fixes TestACL_*.

These now just check for Raft replication to be set up, and don't
care about the number of voter peers.

* Fixes TestOperator_Raft_ListPeers.

* Fixes TestAutopilot_CleanupDeadServerPeriodic.

* Fixes TestCatalog_ListNodes_ConsistentRead_Fail.

* Fixes TestLeader_ChangeServerID and adjusts the conn pool to throw away
sockets when it sees io.EOF.

* Changes version to 1.0.0 in the options doc.

* Makes metrics test more deterministic with autopilot metrics possible.
2017-09-25 15:27:04 -07:00
Frank Schröder 69a088ca85 New config parser, HCL support, multiple bind addrs (#3480)
* new config parser for agent

This patch implements a new config parser for the consul agent which
makes the following changes to the previous implementation:

 * add HCL support
 * all configuration fragments in tests and for default config are
   expressed as HCL fragments
 * HCL fragments can be provided on the command line so that they
   can eventually replace the command line flags.
 * HCL/JSON fragments are parsed into a temporary Config structure
   which can be merged using reflection (all values are pointers).
   The existing merge logic of overwrite for values and append
   for slices has been preserved.
 * A single builder process generates a typed runtime configuration
   for the agent.

The new implementation is more strict and fails in the builder process
if no valid runtime configuration can be generated. Therefore,
additional validations in other parts of the code should be removed.

The builder also pre-computes all required network addresses so that no
address/port magic should be required where the configuration is used
and should therefore be removed.

* Upgrade github.com/hashicorp/hcl to support int64

* improve error messages

* fix directory permission test

* Fix rtt test

* Fix ForceLeave test

* Skip performance test for now until we know what to do

* Update github.com/hashicorp/memberlist to update log prefix

* Make memberlist use the default logger

* improve config error handling

* do not fail on non-existing data-dir

* experiment with non-uniform timeouts to get a handle on stalled leader elections

* Run tests for packages separately to eliminate the spurious port conflicts

* refactor private address detection and unify approach for ipv4 and ipv6.

Fixes #2825

* do not allow unix sockets for DNS

* improve bind and advertise addr error handling

* go through builder using test coverage

* minimal update to the docs

* more coverage tests fixed

* more tests

* fix makefile

* cleanup

* fix port conflicts with external port server 'porter'

* stop test server on error

* do not run api test that change global ENV concurrently with the other tests

* Run remaining api tests concurrently

* no need for retry with the port number service

* monkey patch race condition in go-sockaddr until we understand why that fails

* monkey patch hcl decoder race condidtion until we understand why that fails

* monkey patch spurious errors in strings.EqualFold from here

* add test for hcl decoder race condition. Run with go test -parallel 128

* Increase timeout again

* cleanup

* don't log port allocations by default

* use base command arg parsing to format help output properly

* handle -dc deprecation case in Build

* switch autopilot.max_trailing_logs to int

* remove duplicate test case

* remove unused methods

* remove comments about flag/config value inconsistencies

* switch got and want around since the error message was misleading.

* Removes a stray debug log.

* Removes a stray newline in imports.

* Fixes TestACL_Version8.

* Runs go fmt.

* Adds a default case for unknown address types.

* Reoders and reformats some imports.

* Adds some comments and fixes typos.

* Reorders imports.

* add unix socket support for dns later

* drop all deprecated flags and arguments

* fix wrong field name

* remove stray node-id file

* drop unnecessary patch section in test

* drop duplicate test

* add test for LeaveOnTerm and SkipLeaveOnInt in client mode

* drop "bla" and add clarifying comment for the test

* split up tests to support enterprise/non-enterprise tests

* drop raft multiplier and derive values during build phase

* sanitize runtime config reflectively and add test

* detect invalid config fields

* fix tests with invalid config fields

* use different values for wan sanitiziation test

* drop recursor in favor of recursors

* allow dns_config.udp_answer_limit to be zero

* make sure tests run on machines with multiple ips

* Fix failing tests in a few more places by providing a bind address in the test

* Gets rid of skipped TestAgent_CheckPerformanceSettings and adds case for builder.

* Add porter to server_test.go to make tests there less flaky

* go fmt
2017-09-25 11:40:42 -07:00
Frank Schroeder 78ce956385
Update docs for addr_type option for AWS Cloud auto-join (#3471)
Fixes #3471
2017-09-25 09:54:58 +02:00
Frank Schroeder bcfe1190d4
Fix Azure cloud auto-join docs (#3466)
Fixes #3466
2017-09-25 02:44:04 +02:00
Michael Stewart 1040dbb2d4 Fix docs/guides/segements sidebar selection. 2017-09-19 16:45:39 -05:00
Preetha Appan df742843a4
Adds documentation for Sentinel integration in Consul Enterprise. 2017-09-19 09:02:53 -05:00