Commit Graph

1859 Commits

Author SHA1 Message Date
Preetha 251cdb9c24
Some tweaks to the documentation for a_record_limit 2018-03-08 11:23:07 -06:00
Pierre Souchay 57310a6446 Updated documentation as requested by @preetapan 2018-03-08 18:02:40 +01:00
Jeff Escalante 760b4ff72f update to latest middleman-hashicorp
this includes minor text fixes for the universal nav
2018-03-06 16:37:58 -05:00
Jeff Escalante f9a41e290d First instance of 'Consul' on homepage -> 'HashiCorp Consul' 2018-03-06 16:37:47 -05:00
Sergei Ryabkov 82d195b695
Highlighting the dead link
I am proposing to remove a dead link (https://atlas.hashicorp.com/help/consul/alternatives). If the page has moved and the new location is known, it would be of course better to update the link.
2018-03-02 18:22:19 -05:00
Paul Banks 257ad520f2
Merge pull request #3928 from hashicorp/service-token-docs
Notes on ACL token storage and permissions
2018-03-02 16:28:56 +00:00
Paul Banks 9a47449c6d
Merge pull request #3899 from pierresouchay/fix_blocking_queries_index
Services Indexes modified per service instead of using a global Index
2018-03-02 16:24:43 +00:00
Paul Banks c57451a414
Notes on ACL token storage and permissions 2018-03-02 16:22:12 +00:00
Paul Banks e833b535a6
Notes on ACL token storage and permissions 2018-03-02 16:20:11 +00:00
Brian Shumate 6d92c28c5c Clarify encrypt key for WAN joined DCs 2018-03-02 10:41:09 -05:00
Pierre Souchay 7b81e2c3ad Better information and advices for upgrade to 1.0.7+ 2018-03-02 09:08:00 +01:00
Pierre Souchay 360dc1dd8d Simplified error handling for maxIndexForService
* added unit tests to ensure service index is properly garbage collected
* added Upgrade from Version 1.0.6 to higher section in documentation
2018-03-01 14:09:36 +01:00
Jack Pearkes 10f3eb623a website: override automatic linking of list items for softlayer dc
This avoids a conflict with #datacenter later on the page. We're mixing
histroic manually specified anchors with generated anchors (via
redcarpet / middleman-hashicorp) so we have to manually override the
automatic generation here.

I was tempted to rewrite the old manual anchors to use the automatic
generation, but there is no way to maintain backwards compatibility,
so will leave that for a time when it is appropriate for us to break
links (or redirect them, etc).

Fixes #3916
2018-02-27 10:53:12 -08:00
Kyle Havlovitz 5956e778db
Add a link to the leader election guide in the lock API docs 2018-02-22 15:57:46 -08:00
Paul Banks a216d136fe
Fix a couple of minor typos found in docs. 2018-02-13 16:21:12 +00:00
Roger Berlind bad4f2f404
Updated Stale Reads section of DNS Caching Guide
I updated the content based on discussion with James Phillips in #team-connect on 2/8/2018.
2018-02-12 11:26:10 -05:00
Tomáš Bedřich e4792dbbee Update check script exit code explanation (#3882)
Change misleading formulation which might imply, that any non-zero code is enough to mark check as failing.
(https://www.consul.io/docs/agent/checks.html#check-scripts)
2018-02-11 08:30:40 -06:00
Pierre Souchay 6022c7a209 Added ServiceMeta documentation in website source 2018-02-11 14:12:41 +01:00
Kyle Havlovitz c3e94970a0
Add gRPC fields to client api and agent check endpoint docs 2018-02-09 16:02:27 -08:00
Preetha Appan 707c5c7204
Updates download version to 1.0.6 2018-02-09 12:21:18 -06:00
Kyle Havlovitz f80cebaef3
Bump download version to 1.0.5 2018-02-07 12:50:12 -08:00
James Phillips e5d76d6af4
Rolls back to 1.0.3 release for downloads. 2018-02-06 16:56:15 -08:00
Preetha Appan 93970e4c20
Update version for downloads 2018-02-06 15:48:59 -06:00
Kyle Havlovitz f6ecaa4a1c
Add enterprise default config section 2018-02-05 13:33:59 -08:00
James Phillips e748c63fff
Merge pull request #3855 from hashicorp/pr-3782-slackpad
Adds support for gRPC health checks.
2018-02-02 17:57:27 -08:00
James Phillips 49772f93bb
Adds documentation for gRPC health checks. 2018-02-02 17:53:49 -08:00
Preetha 6d969d372b
Clarification around locking (#3853) 2018-02-01 14:08:06 -06:00
Yoann Fouquet 8d01a61cb5 Adjust link to Java HTTP API
OrbitzWorldwide/consul-client has moved to rickfast/consul-client.
2018-01-26 17:31:18 +01:00
James Phillips eb76306316
Merge pull request #3833 from szemek/curl-binary
Documentation KV Create/upload key, upload binary data or file with line breaks via curl
2018-01-25 13:15:59 -08:00
James Phillips ab4ad0dcaf
Bumps to latest middleman-hashicorp version. 2018-01-24 09:32:45 -08:00
James Phillips 1072f6a9de
Bumps website Consul version to 1.0.3. 2018-01-24 07:20:00 -08:00
Przemysław Dąbek 53af1f528f
Update kv.html.md 2018-01-24 11:55:17 +01:00
Jim Kalafut cedc7e6119
Fix broken link to SWIM paper 2018-01-21 17:41:58 -08:00
James Phillips d93eb3659c
Updates configuration docs for Azure VMSS support. 2018-01-19 16:37:22 -08:00
James Phillips 410e96108a
Update external.html.md 2018-01-12 13:23:16 -08:00
James Phillips 9509aa6c4b
Adds the NodeID field back to the /v1/agent/self Config block.
Fixes #3778
2018-01-10 15:17:54 -08:00
James Phillips 6c3cce19fa
Merge pull request #3787 from kopaka/patch-2
Corrected word order sequence
2018-01-08 18:10:48 -08:00
James Phillips cfdc0f5064
Updates website Ruby gems to get newer nokogiri. 2018-01-08 18:08:42 -08:00
Scott Pynn 0715ae968d
Corrected word order sequence
Also removed a couple of extraneous spaces.
2018-01-08 12:02:10 -05:00
James Cunningham 8dfe140501 fix dead telemetry prefix filter link 2018-01-05 15:19:33 -07:00
James Phillips 10ff52c21c
Merge pull request #3765 from diptanu/f-agent-telemetry
Added telemetry around Catalog APIs
2018-01-04 18:56:26 -08:00
Chad Whitacre 7dbe5654c7 Fix some small doc errors 2018-01-04 16:44:07 -05:00
James Phillips 96b47875ad
Merge pull request #3770 from akrymets/patch-1
Update checks.html.md
2018-01-03 18:32:53 -08:00
James Phillips 584a136906
Update checks.html.md 2018-01-03 18:32:42 -08:00
James Phillips 10ac6a9f98
Merge pull request #3775 from bagerard/fix_doc
fix in documentation
2018-01-03 13:42:39 -08:00
RS Krishna 88a73bd3e7 add missing Port description in register service doc 2017-12-31 22:10:35 +05:30
Bastien Gérard 967a1de1ed fix in documentation 2017-12-31 09:48:16 +01:00
Andrii Krymets 5131201736
Update checks.html.md
1. Replace deprecated "script" option with "args" in check definition examples
(Not sure in correctness of arguments splitting)
2017-12-27 17:23:29 +02:00
Diptanu Choudhury 3858317ac9 Updated docs 2017-12-21 20:37:13 -08:00
Diptanu Choudhury 7f28391cbf Added docs 2017-12-21 16:58:39 -08:00
James Phillips ec423f1459
Update community.html.erb 2017-12-19 20:57:42 -08:00
James Phillips 7ed8c82bef
Bumps website version to 1.0.2. 2017-12-15 07:31:58 -08:00
James Phillips e0dd7cc152
Merge pull request #3740 from yfouquet/issue_3709
Update documentation for "serf_lan_bind" and "serf_wan_bind"
2017-12-14 17:49:38 -08:00
James Phillips 49836801ac
Merge pull request #3749 from tjcelaya/rpc-warning-datacenter-guide
Clarify RPC listen address usage in Basic WAN guide
2017-12-14 17:46:09 -08:00
Tomas Celaya 36ea244ced Include a warning about the interaction between `translate_wan_addrs` and `bind_addr` in the Basic WAN guide. 2017-12-14 13:12:04 -08:00
Yoann Fouquet 715dd744ff Update documentation for "serf_lan_bind" and "serf_wan_bind"
These was spotted in issue #3709.
These two configuration elements were renamed "serf_lan" and "serf_wan" in commit 12216583a1
Update documentation to fit the new code.
Note that flags "-serf-lan-bind" and "-serf-wan-bind" were not renamed.
2017-12-12 13:55:19 +01:00
Yoann Fouquet 16cc432c7a Adjust documentation for service tags of checks
Add some missing ServiceTags.
Replace null ServiceTags by empty list (ServiceTags cannot be null).
2017-12-12 13:39:37 +01:00
youngjl1 137d73fd9d
Name correction in documentation 2017-12-10 10:26:02 -05:00
Ivan Smirnov db1623c44f
Fix syntax error.
Running consul 1.0.0, 'consul operator raft' requires 'list-peers' rather than '-list-peers'
2017-11-20 20:17:20 -08:00
James Phillips 9f8c9cf95c
Bumps website version to 1.0.1. 2017-11-20 14:19:46 -08:00
James Phillips b4d19abb7c
Adds a version note about rolling updates. 2017-11-20 12:01:23 -08:00
Amit Saha 0f53ae9a82
Update documentation for `tag` filter 2017-11-17 14:20:30 +11:00
James Phillips 93f68555d0
Adds enable_agent_tls_for_checks configuration option which allows (#3661)
HTTP health checks for services requiring 2-way TLS to be checked
using the agent's credentials.
2017-11-07 18:22:09 -08:00
James Phillips d85dfffcae
Update atlas.html.md 2017-11-02 14:16:47 -07:00
Kyle Havlovitz d3dd2b1402
Move check definition to a sub-struct 2017-11-01 14:54:46 -07:00
Kyle Havlovitz dbab3cd5f6
Merge branch 'master' into esm-changes 2017-11-01 11:37:48 -07:00
Kyle Havlovitz c4375d5a47
Merge pull request #3622 from hashicorp/coordinate-node-endpoint
agent: add /v1/coordianate/node/:node endpoint
2017-11-01 11:35:50 -07:00
James Phillips c488b870b6
Update coordinates.html.md 2017-10-31 21:23:51 -07:00
Kyle Havlovitz b0536a96cc
Fill out the tests around coordinate/node functionality 2017-10-31 15:36:44 -07:00
Frank Schröder 874e350b2f config: add -config-format option (#3626)
* config: refactor ReadPath(s) methods without side-effects

Return the sources instead of modifying the state.

* config: clean data dir before every test

* config: add tests for config-file and config-dir

* config: add -config-format option

Starting with Consul 1.0 all config files must have a '.json' or '.hcl'
extension to make it unambigous how the data should be parsed. Some
automation tools generate temporary files by appending a random string
to the generated file which obfuscates the extension and prevents the
file type detection.

This patch adds a -config-format option which can be used to override
the auto-detection behavior by forcing all config files or all files
within a config directory independent of their extension to be
interpreted as of this format.

Fixes #3620
2017-10-31 17:30:01 -05:00
Frank Schröder a052255f86 vendor: update go-discover (#3634)
* vendor: update go-discover

Pull in providers:

 * Aliyun (Alibaba Cloud)
 * Digital Ocean
 * OpenStack (os)
 * Scaleway

* doc: use ... instead of xxx

* doc: strip trailing whitespace

* doc: add docs for aliyun, digitalocean, os and scaleway

* agent: fix test
2017-10-31 17:03:54 -05:00
Kyle Havlovitz a8c808aee5
Add docs for the coordinate update endpoint 2017-10-26 20:17:46 -07:00
Frank Schroeder ca9aac746f
agent: add /v1/coordianate/node/:node endpoint
This patch adds a /v1/coordinate/node/:node endpoint to get the network
coordinates for a single node in the network.

Since Consul Enterprise supports network segments it is still possible
to receive mutiple entries for a single node - one per segment.
2017-10-26 14:24:42 +02:00
James Phillips a11c277f75
Changes "ip" to "IP". 2017-10-23 12:34:43 +02:00
Frank Schroeder 81917ee675
Merge pull request #3600 from hashicorp/support-go-sockaddr-for-dns-recursors
DNS recursors can be added through go-sockaddr templates. Entries
are deduplicated while the order is maintained.

Originally proposed by @taylorchu

See #2932
2017-10-23 10:45:36 +02:00
Frank Schroeder 0ca94055c4
Revert "doc: update docs for dns recursor go-sockaddr templates"
This reverts commit 6d4a57aedc.
2017-10-23 10:08:35 +02:00
Frank Schroeder 42563dc73f
Revert "doc: address review comment"
This reverts commit 6ba9690e81.
2017-10-23 10:08:35 +02:00
Frank Schroeder 703be5a219
Revert "Changes "ip" to "IP"."
This reverts commit dca5dcb68c.
2017-10-23 10:08:35 +02:00
James Phillips dca5dcb68c Changes "ip" to "IP". 2017-10-23 08:01:25 +02:00
Frank Schroeder 6ba9690e81 doc: address review comment 2017-10-23 08:01:25 +02:00
Frank Schroeder 6d4a57aedc doc: update docs for dns recursor go-sockaddr templates 2017-10-23 08:01:25 +02:00
James Phillips 3ab8b50133
Tweaks watch docs. 2017-10-21 20:09:37 -07:00
preetapan bed69cefb2 Update watches.html.md 2017-10-21 20:59:47 -05:00
Preetha Appan 28a3901f10 Small grammar correction 2017-10-21 20:55:15 -05:00
Preetha Appan cdb5f8c3c9 Improve HTTP handler documentation 2017-10-21 20:51:37 -05:00
Hadar Greinsmark 7e1a860978 Implement HTTP Watch handler (#3413)
Implement HTTP Watch handler
2017-10-21 20:39:09 -05:00
Frank Schroeder 8ad8331f7d
doc: address review comment 2017-10-20 20:06:33 +02:00
Frank Schroeder 2122f16a69
doc: update docs for dns recursor go-sockaddr templates 2017-10-20 15:51:49 +02:00
Johan Brandhorst 4ebdff30ef 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 ecee15b466
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 18ccd3a80b Documentation update for KMS support 2017-10-19 11:39:14 -05:00
Preetha Appan 89b98d2fe2 Update autopilot documentation to mention correct Consul version that defaults raft protocol to 3. 2017-10-19 11:31:29 -05:00
Jay 4d95a56b43 s/acesss/access (#3593)
Spell "access" correctly
2017-10-18 17:24:56 -07:00
James Phillips 53f67c3993 Fixes API client for ScriptArgs and updates documentation. (#3589)
* Updates the API client to support the current `ScriptArgs` parameter
for checks.

* Updates docs for checks to explain the `ScriptArgs` parameter issue.

* Adds mappings for "args" and "script-args" to give th API parity
with config.

* Adds checks on return codes.

* Removes debug logging that shows empty when args are used.
2017-10-18 11:28:39 -07:00
Vladislav Mitov 3b280ead55 Update check.html.md 2017-10-18 13:43:32 +02:00
James Phillips 282b88466b
Adds a pointer to the /v1/txn API from the KV read docs.
Closes #3558
2017-10-17 17:07:45 -07:00
Christopher "Chief" Najewicz 0b710b4a7a 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 e25be707f5
Bumps website version to 1.0.0. 2017-10-16 09:40:44 -07:00
James Phillips d5b945ccee
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 204e6bac18
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 036efc663d Update sentinel.html.markdown.erb 2017-10-13 12:15:08 -07:00
csawyerYumaed 0f79922795 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 4ab59af09e
Clarify the docs around script check timeout behavior 2017-10-11 14:55:55 -07:00
Kyle Havlovitz 106b8b0b33 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 94f58199b1 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 759ef8a1d4 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 d3cebace7c
Updates documentation to s/script/args/ in API docs. 2017-10-10 16:37:08 -07:00
James Phillips bb12368eac 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 d8a1ec70f8 Update compatibility.html.md 2017-10-09 14:18:37 -07:00
James Phillips 486e1a277e Update compatibility.html.md 2017-10-09 14:18:23 -07:00
Radek Simko 0075421b1a 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
James Phillips 5f5e7529df Update raft.html.md 2017-10-06 14:38:21 -07:00
Preetha Appan 194b09a86b Update documentation with subcommand example 2017-10-06 15:23:43 -05:00
Preetha Appan 84ee8b8aff Autocomplete support 2017-10-06 15:05:45 -05:00
Kyle Havlovitz adf29675f3 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 766d1259d8
Move http request metric to the agent section 2017-10-04 17:36:10 -07:00
Kyle Havlovitz a3e9ac5840
Add a test for legacy metrics with a whitelist filter 2017-10-04 17:27:57 -07:00
Kyle Havlovitz 198ed6076d 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 c728564994
Update metric names and add a legacy config flag 2017-10-04 16:43:27 -07:00
Frank Schröder ce887a0c45 Provide stable config for agent/self (#3532)
* config: provide stable config for /v1/agent/self (#3530)

This patch adds a stable subset of the previous Config struct to the
agent/self response. The actual runtime configuration is moved into
DebugConfig and will be documented to change.

Fixes #3530

* config: fix tests

* doc: update api documentation for /v1/agent/self
2017-10-04 10:43:17 -07:00
Frank Schroeder 2191511e9f doc: drop last references to -retry-join-* options 2017-10-04 19:12:28 +02:00
Frank Schroeder 012ec7876e doc: document go-discover format change 2017-10-04 19:12:28 +02:00
Preetha Appan 41ec69f71a Update ACL guide to describe the new list policy for Keys 2017-10-04 06:19:20 -05:00
Kyle Havlovitz 93bf819c36
Update snapshot agent docs 2017-09-29 12:28:04 -07:00
Frank Schroeder b0b84604fc update docs 2017-09-29 20:26:43 +02:00
Preetha Appan 9b3481265a Fix grammar in containers guide. 2017-09-29 10:37:04 -05:00
Preetha Appan 2c684ebb51 Update containers guide to mention that Consul now handles nodes changing IP addresses. 2017-09-29 10:20:33 -05:00
James Phillips 1181ab0d11 Clarifies server requirement for bootstrap-expect.
Fixes #3510.
2017-09-28 22:02:37 -07:00
Preetha Appan 54bb478372 Update sentinel documentation to remove features that are coming in a future release 2017-09-28 21:00:00 -05:00
Patrick Sodré fa67334361
Update docs on RFC1464 vs RFC1035 options 2017-09-28 12:32:46 +02:00
Patrick Sodré 8e14b527e8
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 38b2d76d39 Update options.html.md 2017-09-27 15:55:46 -07:00
James Phillips 5fa5f6ef01 Update options.html.md 2017-09-27 15:40:00 -07:00
James Phillips 7deed7162f 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 26dfd4cf16 Fix mispelled words 2017-09-27 11:20:01 -07:00
James Phillips a8f228c2ae Adds a "required" note for the port in the network segments configuration. 2017-09-26 17:57:34 -07:00
Frank Schröder e84c2b2edd 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
Frank Schröder 1e461110e6 agent: consolidate handling of 405 Method Not Allowed (#3405)
* agent: consolidate http method not allowed checks

This patch uses the error handling of the http handlers to handle HTTP
method not allowed errors across all available endpoints. It also adds a
test for testing whether the endpoints respond with the correct status
code.

* agent: do not panic on metrics tests

* agent: drop other tests for MethodNotAllowed

* agent: align /agent/join with reality

/agent/join uses PUT instead of GET as documented.

* agent: align /agent/check/{fail,warn,pass} with reality

/agent/check/{fail,warn,pass} uses PUT instead of GET as documented.

* fix some tests

* Drop more tests for method not allowed

* Align TestAgent_RegisterService_InvalidAddress with reality

* Changes API client join to use PUT instead of GET.

* Fixes agent endpoint verbs and removes obsolete tests.

* Updates the change log.
2017-09-25 23:11:19 -07:00
James Phillips 45646ac3f4 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 12216583a1 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 58c0a3f16d
Update docs for addr_type option for AWS Cloud auto-join (#3471)
Fixes #3471
2017-09-25 09:54:58 +02:00
Frank Schroeder 511dc3e95a
Fix Azure cloud auto-join docs (#3466)
Fixes #3466
2017-09-25 02:44:04 +02:00
James Phillips 0ebae85bb9 Merge pull request #3490 from ruslansennov/javadoc-fix
minor doc fix
2017-09-21 19:38:59 -05:00
Ruslan Sennov 18d2556e3c
minor doc fix 2017-09-21 22:28:49 +03:00
James Phillips 3a78fd0030 Merge pull request #3485 from mstewa34/master
Fix docs/guides/segements sidebar selection.
2017-09-20 09:38:56 -05:00
Frank Schroeder f264bd9294
Fix health endpoint docs (#3483)
Fixes #3483
2017-09-20 09:05:23 +02:00
Michael Stewart 30106fc421 Fix docs/guides/segements sidebar selection. 2017-09-19 16:45:39 -05:00
Preetha Appan 7ca8b3ad8b
Adds documentation for Sentinel integration in Consul Enterprise. 2017-09-19 09:02:53 -05:00
Frank Schroeder 552681b2a5
Update example 2017-09-11 13:01:56 +02:00
Mitsunori Komatsu 2282f412d7 Fix wrong field name: Meta -> NodeMeta 2017-09-11 19:14:47 +09:00