mirror of https://github.com/status-im/consul.git
Adds a 1.0 section to the upgrade guide and cleans up the change log.
This commit is contained in:
parent
036efc663d
commit
204e6bac18
34
CHANGELOG.md
34
CHANGELOG.md
|
@ -48,9 +48,11 @@ BREAKING CHANGES:
|
|||
| (service definitions) `tlsskipverify` | [`tls_skip_verify`](https://www.consul.io/docs/agent/services.html) |
|
||||
| (service definitions) `deregistercriticalserviceafter` | [`deregister_critical_service_after`](https://www.consul.io/docs/agent/services.html) |
|
||||
|
||||
</details>
|
||||
|
||||
* **`statsite_prefix` Renamed to `metrics_prefix`:** Since the `statsite_prefix` configuration option applied to all telemetry providers, `statsite_prefix` was renamed to [`metrics_prefix`](https://www.consul.io/docs/agent/options.html#telemetry-metrics_prefix). Configuration files will need to be updated when upgrading to this version of Consul. [[GH-3498](https://github.com/hashicorp/consul/issues/3498)]
|
||||
* **`advertise_addrs` Removed:** This configuration option was removed since it was redundant with `advertise_addr` and `advertise_addr_wan` in combination with `ports` and also wrongly stated that you could configure both host and port. [[GH-3516](https://github.com/hashicorp/consul/issues/3516)]
|
||||
* **Escaping Behavior Changed for go-discover Configs:** The format for [`-retry-join`](https://www.consul.io/docs/agent/options.html#retry-join) and [`-retry-join-wan`](https://www.consul.io/docs/agent/options.html#retry-join-wan) values that use [go-discover](https://github.com/hashicorp/go-discover) Cloud Auto-Joining has changed. Values in `key=val` sequences must no longer be URL encoded and can be provided as literals as long as they do not contain spaces, backslashes `\` or double quotes `"`. If values contain these characters then use double quotes as in `"some key"="some value"`. Special characters within a double quoted string can be escaped with a backslash `\`. [[GH-3417](https://github.com/hashicorp/consul/issues/3417)]
|
||||
* **Escaping Behavior Changed for go-discover Configs:** The format for [`-retry-join`](https://www.consul.io/docs/agent/options.html#retry-join) and [`-retry-join-wan`](https://www.consul.io/docs/agent/options.html#retry-join-wan) values that use [go-discover](https://github.com/hashicorp/go-discover) cloud auto joining has changed. Values in `key=val` sequences must no longer be URL encoded and can be provided as literals as long as they do not contain spaces, backslashes `\` or double quotes `"`. If values contain these characters then use double quotes as in `"some key"="some value"`. Special characters within a double quoted string can be escaped with a backslash `\`. [[GH-3417](https://github.com/hashicorp/consul/issues/3417)]
|
||||
* **HTTP Verbs are Enforced in Many HTTP APIs:** Many endpoints in the HTTP API that previously took any HTTP verb now check for specific HTTP verbs and enforce them. This may break clients relying on the old behavior. [[GH-3405](https://github.com/hashicorp/consul/issues/3405)]
|
||||
|
||||
<details><summary>Detailed List of Updated Endpoints and Required HTTP Verbs</summary>
|
||||
|
@ -104,25 +106,27 @@ BREAKING CHANGES:
|
|||
* **Config Section of Agent Self Endpoint has Changed:** The /v1/agent/self endpoint's `Config` section has often been in flux as it was directly returning one of Consul's internal data structures. This configuration structure has been moved under `DebugConfig`, and is documents as for debugging use and subject to change, and a small set of elements of `Config` have been maintained and documented. See [Read Configuration](https://www.consul.io/api/agent.html#read-configuration) endpoint documentation for details. [[GH-3532](https://github.com/hashicorp/consul/issues/3532)]
|
||||
* **Deprecated `configtest` Command Removed:** The `configtest` command was deprecated and has been superseded by the `validate` command.
|
||||
* **Undocumented Flags in `validate` Command Removed:** The `validate` command supported the `-config-file` and `-config-dir` command line flags but did not document them. This support has been removed since the flags are not required.
|
||||
* **Metric Names Updated:** Fixed an issue where some of the internal Consul metric names began with `consul.consul.` instead of `consul.`. To help with transitioning dashboards and other metric consumers, the field `enable_deprecated_names` has been added to the telemetry section of the config, which will enable metrics with the old naming scheme to be sent alongside the new ones. [[GH-3535](https://github.com/hashicorp/consul/issues/3535)]
|
||||
* **Metric Names Updated:** Metric names no longer start with `consul.consul`. To help with transitioning dashboards and other metric consumers, the field `enable_deprecated_names` has been added to the telemetry section of the config, which will enable metrics with the old naming scheme to be sent alongside the new ones. [[GH-3535](https://github.com/hashicorp/consul/issues/3535)]
|
||||
|
||||
<details><summary>Detailed List of Affected Metrics by Prefix</summary>
|
||||
|
||||
| Prefix |
|
||||
| ------ |
|
||||
| consul.acl |
|
||||
| consul.autopilot |
|
||||
| consul.catalog |
|
||||
| consul.fsm |
|
||||
| consul.health |
|
||||
| consul.http |
|
||||
| consul.kvs |
|
||||
| consul.leader |
|
||||
| consul.prepared-query |
|
||||
| consul.rpc |
|
||||
| consul.session |
|
||||
| consul.session_ttl |
|
||||
| consul.txn |
|
||||
| consul.consul.acl |
|
||||
| consul.consul.autopilot |
|
||||
| consul.consul.catalog |
|
||||
| consul.consul.fsm |
|
||||
| consul.consul.health |
|
||||
| consul.consul.http |
|
||||
| consul.consul.kvs |
|
||||
| consul.consul.leader |
|
||||
| consul.consul.prepared-query |
|
||||
| consul.consul.rpc |
|
||||
| consul.consul.session |
|
||||
| consul.consul.session_ttl |
|
||||
| consul.consul.txn |
|
||||
|
||||
</details>
|
||||
|
||||
* **Checks Validated On Agent Startup:** Consul agents now validate health check definitions in their configuration and will fail at startup if any checks are invalid. In previous versions of Consul, invalid health checks would get skipped. [[GH-3559](https://github.com/hashicorp/consul/issues/3559)]
|
||||
|
||||
|
|
|
@ -14,6 +14,167 @@ details provided for their upgrades as a result of new features or changed
|
|||
behavior. This page is used to document those details separately from the
|
||||
standard upgrade flow.
|
||||
|
||||
## Consul 1.0
|
||||
|
||||
Consul 1.0 has several important breaking changes that are documented here. Please be sure to read over all the details here before upgrading.
|
||||
|
||||
#### Raft Protocol Now Defaults to 3
|
||||
|
||||
The [`-raft-protocol`](/docs/agent/options.html#_raft_protocol) default has been changed from 2 to 3, enabling all [Autopilot](/docs/guides/autopilot.html) features by default.
|
||||
|
||||
Raft protocol version 3 requires Consul running 0.8.0 or newer on all servers in order to work, so if you are upgrading with older servers in a cluster then you will need to set this back to 2 in order to upgrade. See [Raft Protocol Version Compatibility](/docs/upgrade-specific.html#raft-protocol-version-compatibility) for more details. Also the format of `peers.json` used for outage recovery is different when running with the lastest Raft protocol. See [Manual Recovery Using peers.json](/docs/guides/outage.html#manual-recovery-using-peers-json) for a description of the required format.
|
||||
|
||||
The easiest way to upgrade servers is to have each server leave the cluster, upgrade its Consul version, and then add it back. Make sure the new server joins successfully and that the cluster is stable before rolling the upgrade forward to the next server. It's also possible to stand up a new set of servers, and then slowly stand down each of the older servers in a similar fashion.
|
||||
|
||||
When using Raft protocol version 3, servers are identified by their [`-node-id`](/docs/agent/options.html#_node_id) instead of their IP address when Consul makes changes to its internal Raft quorum configuration. This means that once a cluster has been upgraded with servers all running Raft protocol version 3, it will no longer allow servers running any older Raft protocol versions to be added. If running a single Consul server, restarting it in-place will result in that server not being able to elect itself as a leader. To avoid this, either set the Raft protocol back to 2, or use [Manual Recovery Using peers.json](/docs/guides/outage.html#manual-recovery-using-peers-json) to map the server to its node ID in the Raft quorum configuration.
|
||||
|
||||
#### Config Files Require an Extension
|
||||
|
||||
As part of supporting the [HCL](https://github.com/hashicorp/hcl#syntax) format for Consul's config files, an `.hcl` or `.json` extension is required for all config files loaded by Consul, even when using the [`-config-file`](/docs/agent/options.html#_config_file) argument to specify a file directly.
|
||||
|
||||
#### Deprecated Options Have Been Removed
|
||||
|
||||
All of Consul's previously deprecated command line flags and config options have been removed, so these will need to be mapped to their equivalents before upgrading. Here's the complete list of removed options and their equivalents:</summary>
|
||||
|
||||
| Removed Option | Equivalent |
|
||||
| -------------- | ---------- |
|
||||
| `-atlas` | None, Atlas is no longer supported. |
|
||||
| `-atlas-token`| None, Atlas is no longer supported. |
|
||||
| `-atlas-join` | None, Atlas is no longer supported. |
|
||||
| `-atlas-endpoint` | None, Atlas is no longer supported. |
|
||||
| `-dc` | [`-datacenter`](/docs/agent/options.html#_datacenter) |
|
||||
| `-retry-join-azure-tag-name` | [`-retry-join`](/docs/agent/options.html#microsoft-azure) |
|
||||
| `-retry-join-azure-tag-value` | [`-retry-join`](/docs/agent/options.html#microsoft-azure) |
|
||||
| `-retry-join-ec2-region` | [`-retry-join`](/docs/agent/options.html#amazon-ec2) |
|
||||
| `-retry-join-ec2-tag-key` | [`-retry-join`](/docs/agent/options.html#amazon-ec2) |
|
||||
| `-retry-join-ec2-tag-value` | [`-retry-join`](/docs/agent/options.html#amazon-ec2) |
|
||||
| `-retry-join-gce-credentials-file` | [`-retry-join`](/docs/agent/options.html#google-compute-engine) |
|
||||
| `-retry-join-gce-project-name` | [`-retry-join`](/docs/agent/options.html#google-compute-engine) |
|
||||
| `-retry-join-gce-tag-name` | [`-retry-join`](/docs/agent/options.html#google-compute-engine) |
|
||||
| `-retry-join-gce-zone-pattern` | [`-retry-join`](/docs/agent/options.html#google-compute-engine) |
|
||||
| `addresses.rpc` | None, the RPC server for CLI commands is no longer supported. |
|
||||
| `advertise_addrs` | [`ports`](/docs/agent/options.html#ports) with [`advertise_addr`](https://www.consul/io/docs/agent/options.html#advertise_addr) and/or [`advertise_addr_wan`](/docs/agent/options.html#advertise_addr_wan) |
|
||||
| `atlas_infrastructure` | None, Atlas is no longer supported. |
|
||||
| `atlas_token` | None, Atlas is no longer supported. |
|
||||
| `atlas_acl_token` | None, Atlas is no longer supported. |
|
||||
| `atlas_join` | None, Atlas is no longer supported. |
|
||||
| `atlas_endpoint` | None, Atlas is no longer supported. |
|
||||
| `dogstatsd_addr` | [`telemetry.dogstatsd_addr`](/docs/agent/options.html#telemetry-dogstatsd_addr) |
|
||||
| `dogstatsd_tags` | [`telemetry.dogstatsd_tags`](/docs/agent/options.html#telemetry-dogstatsd_tags) |
|
||||
| `http_api_response_headers` | [`http_config.response_headers`](/docs/agent/options.html#response_headers) |
|
||||
| `ports.rpc` | None, the RPC server for CLI commands is no longer supported. |
|
||||
| `recursor` | [`recursors`](https://github.com/hashicorp/consul/blob/master/website/source/docs/agent/options.html.md#recursors) |
|
||||
| `retry_join_azure` | [`-retry-join`](/docs/agent/options.html#microsoft-azure) |
|
||||
| `retry_join_ec2` | [`-retry-join`](/docs/agent/options.html#amazon-ec2) |
|
||||
| `retry_join_gce` | [`-retry-join`](/docs/agent/options.html#google-compute-engine) |
|
||||
| `statsd_addr` | [`telemetry.statsd_address`](https://github.com/hashicorp/consul/blob/master/website/source/docs/agent/options.html.md#telemetry-statsd_address) |
|
||||
| `statsite_addr` | [`telemetry.statsite_address`](https://github.com/hashicorp/consul/blob/master/website/source/docs/agent/options.html.md#telemetry-statsite_address) |
|
||||
| `statsite_prefix` | [`telemetry.metrics_prefix`](/docs/agent/options.html#telemetry-metrics_prefix) |
|
||||
| `telemetry.statsite_prefix` | [`telemetry.metrics_prefix`](/docs/agent/options.html#telemetry-metrics_prefix) |
|
||||
| (service definitions) `serviceid` | [`service_id`](/docs/agent/services.html) |
|
||||
| (service definitions) `dockercontainerid` | [`docker_container_id`](/docs/agent/services.html) |
|
||||
| (service definitions) `tlsskipverify` | [`tls_skip_verify`](/docs/agent/services.html) |
|
||||
| (service definitions) `deregistercriticalserviceafter` | [`deregister_critical_service_after`](/docs/agent/services.html) |
|
||||
|
||||
#### `statsite_prefix` Renamed to `metrics_prefix`
|
||||
|
||||
Since the `statsite_prefix` configuration option applied to all telemetry providers, `statsite_prefix` was renamed to [`metrics_prefix`](/docs/agent/options.html#telemetry-metrics_prefix). Configuration files will need to be updated when upgrading to this version of Consul.
|
||||
|
||||
#### `advertise_addrs` Removed
|
||||
|
||||
This configuration option was removed since it was redundant with `advertise_addr` and `advertise_addr_wan` in combination with `ports` and also wrongly stated that you could configure both host and port.
|
||||
|
||||
#### Escaping Behavior Changed for go-discover Configs
|
||||
|
||||
The format for [`-retry-join`](/docs/agent/options.html#retry-join) and [`-retry-join-wan`](/docs/agent/options.html#retry-join-wan) values that use [go-discover](https://github.com/hashicorp/go-discover) cloud auto joining has changed. Values in `key=val` sequences must no longer be URL encoded and can be provided as literals as long as they do not contain spaces, backslashes `\` or double quotes `"`. If values contain these characters then use double quotes as in `"some key"="some value"`. Special characters within a double quoted string can be escaped with a backslash `\`.
|
||||
|
||||
#### HTTP Verbs are Enforced in Many HTTP APIs
|
||||
|
||||
Many endpoints in the HTTP API that previously took any HTTP verb now check for specific HTTP verbs and enforce them. This may break clients relying on the old behavior. Here's the complete list of updated endpoints and required HTTP verbs:
|
||||
|
||||
| Endpoint | Required HTTP Verb |
|
||||
| -------- | ------------------ |
|
||||
| /v1/acl/info | GET |
|
||||
| /v1/acl/list | GET |
|
||||
| /v1/acl/replication | GET |
|
||||
| /v1/agent/check/deregister | PUT |
|
||||
| /v1/agent/check/fail | PUT |
|
||||
| /v1/agent/check/pass | PUT |
|
||||
| /v1/agent/check/register | PUT |
|
||||
| /v1/agent/check/warn | PUT |
|
||||
| /v1/agent/checks | GET |
|
||||
| /v1/agent/force-leave | PUT |
|
||||
| /v1/agent/join | PUT |
|
||||
| /v1/agent/members | GET |
|
||||
| /v1/agent/metrics | GET |
|
||||
| /v1/agent/self | GET |
|
||||
| /v1/agent/service/register | PUT |
|
||||
| /v1/agent/service/deregister | PUT |
|
||||
| /v1/agent/services | GET |
|
||||
| /v1/catalog/datacenters | GET |
|
||||
| /v1/catalog/deregister | PUT |
|
||||
| /v1/catalog/node | GET |
|
||||
| /v1/catalog/nodes | GET |
|
||||
| /v1/catalog/register | PUT |
|
||||
| /v1/catalog/service | GET |
|
||||
| /v1/catalog/services | GET |
|
||||
| /v1/coordinate/datacenters | GET |
|
||||
| /v1/coordinate/nodes | GET |
|
||||
| /v1/health/checks | GET |
|
||||
| /v1/health/node | GET |
|
||||
| /v1/health/service | GET |
|
||||
| /v1/health/state | GET |
|
||||
| /v1/internal/ui/node | GET |
|
||||
| /v1/internal/ui/nodes | GET |
|
||||
| /v1/internal/ui/services | GET |
|
||||
| /v1/session/info | GET |
|
||||
| /v1/session/list | GET |
|
||||
| /v1/session/node | GET |
|
||||
| /v1/status/leader | GET |
|
||||
| /v1/status/peers | GET |
|
||||
| /v1/operator/area/:uuid/members | GET |
|
||||
| /v1/operator/area/:uuid/join | PUT |
|
||||
|
||||
#### Unauthorized KV Requests Return 403
|
||||
|
||||
When ACLs are enabled, reading a key with an unauthorized token returns a 403. This previously returned a 404 response.
|
||||
|
||||
#### Config Section of Agent Self Endpoint has Changed
|
||||
|
||||
The /v1/agent/self endpoint's `Config` section has often been in flux as it was directly returning one of Consul's internal data structures. This configuration structure has been moved under `DebugConfig`, and is documents as for debugging use and subject to change, and a small set of elements of `Config` have been maintained and documented. See [Read Configuration](/api/agent.html#read-configuration) endpoint documentation for details.
|
||||
|
||||
#### Deprecated `configtest` Command Removed
|
||||
|
||||
The `configtest` command was deprecated and has been superseded by the `validate` command.
|
||||
|
||||
#### Undocumented Flags in `validate` Command Removed
|
||||
|
||||
The `validate` command supported the `-config-file` and `-config-dir` command line flags but did not document them. This support has been removed since the flags are not required.
|
||||
|
||||
#### Metric Names Updated
|
||||
|
||||
Metric names no longer start with `consul.consul`. To help with transitioning dashboards and other metric consumers, the field `enable_deprecated_names` has been added to the telemetry section of the config, which will enable metrics with the old naming scheme to be sent alongside the new ones. The following prefixes were affected:
|
||||
|
||||
| Prefix |
|
||||
| ------ |
|
||||
| consul.consul.acl |
|
||||
| consul.consul.autopilot |
|
||||
| consul.consul.catalog |
|
||||
| consul.consul.fsm |
|
||||
| consul.consul.health |
|
||||
| consul.consul.http |
|
||||
| consul.consul.kvs |
|
||||
| consul.consul.leader |
|
||||
| consul.consul.prepared-query |
|
||||
| consul.consul.rpc |
|
||||
| consul.consul.session |
|
||||
| consul.consul.session_ttl |
|
||||
| consul.consul.txn |
|
||||
|
||||
#### Checks Validated On Agent Startup
|
||||
|
||||
Consul agents now validate health check definitions in their configuration and will fail at startup if any checks are invalid. In previous versions of Consul, invalid health checks would get skipped.
|
||||
|
||||
## Consul 0.9.0
|
||||
|
||||
#### Script Checks Are Now Opt-In
|
||||
|
|
Loading…
Reference in New Issue