2015-02-19 19:03:02 +00:00
---
2020-04-07 18:55:19 +00:00
layout: docs
page_title: Upgrading Specific Versions
description: >-
Specific versions of Consul may have additional information about the upgrade
process beyond the standard flow.
2015-02-19 19:03:02 +00:00
---
# Upgrading Specific Versions
2023-01-25 16:52:43 +00:00
The [upgrading page](/consul/docs/upgrading) covers the details of doing a
2019-05-15 15:49:41 +00:00
standard upgrade. However, specific versions of Consul may have more 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.
2015-02-19 19:03:02 +00:00
2023-09-16 04:44:27 +00:00
## Consul 1.17.x
#### Audit Log naming changes (Enterprise)
Prior to Consul 1.17.0, audit logs contained timestamps on both the original log file names as well as rotated log file names.
After Consul 1.17.0, only timestamps will be included in rotated log file names.
2023-10-12 20:33:58 +00:00
#### Service-defaults upstream config (Enterprise)
Prior to Consul v1.17.0, [Kubernetes annotations for upstream services](/consul/docs/k8s/annotations-and-labels#consul-hashicorp-com-connect-service-upstreams)
that did not explicitly specify a namespace or partition incorrectly used service-defaults configurations, such as [default protocol](https://developer.hashicorp.com/consul/docs/connect/config-entries/service-defaults#set-the-default-protocol), from the default partition and namespace instead of the local partition and namespace.
This bug is fixed starting in Consul v1.17.0. Now service-defaults configurations from the local partition and namespace are fetched when not specified in annotations.
If you are using non-default partitions and namespaces with Consul-k8s, we recommend explicitly defining these fields for all upstreams in addition to ensuring that accurate
service-defaults are configured in each partition and namespace before upgrading. Doing so ensures that no unexpected protocol changes occur during the upgrade.
2023-10-23 11:41:24 +00:00
#### ACL tokens with templated policies
[ACL templated policies](/consul/docs/security/acl#templated-policies) were added to 1.17.0 to simplify obtaining the right permissions for ACL tokens. When performing a [rolling upgrade](/consul/tutorials/datacenter-operations/upgrade-federated-environment#server-rolling-upgrade) and a version of Consul prior to 1.17.x is presented with a token created Consul v1.17.x or newer that contains templated policies, the templated policies field is not recognized. As a result, the token might not have the expected permissions on the older version of Consul.
2023-04-11 15:20:33 +00:00
## Consul 1.16.x
2023-10-04 20:10:19 +00:00
### Known issues
2023-09-01 20:30:52 +00:00
Service mesh in Consul versions 1.16.0 and 1.16.1 may have issues when a snapshot restore is performed and the servers are hosting xDS streams.
2023-09-27 19:17:31 +00:00
When this bug triggers, it causes Envoy to incorrectly populate upstream endpoints. To prevent this issue, service mesh users who run agent-less workloads should upgrade Consul to v1.16.2 or later.
2023-09-01 20:30:52 +00:00
2023-10-04 20:10:19 +00:00
#### Vault Enterprise as CA ((#vault-enterprise-as-ca-1-16))
Using Vault as CA with Consul version 1.16.2 will fail to initialize the CA if [`namespace`](/consul/docs/connect/ca/vault#namespace) is set
but [`intermediate_pki_namespace`](/consul/docs/connect/ca/vault#intermediatepkinamespace) or [`root_pki_namespace`](/consul/docs/connect/ca/vault#rootpkinamespace)
are empty. This is a bug which will be fixed in a future version.
To work around this issue, users must explicitly set [`intermediate_pki_namespace`](/consul/docs/connect/ca/vault#intermediatepkinamespace) and
[`root_pki_namespace`](/consul/docs/connect/ca/vault#rootpkinamespace) to the same value as [`namespace`](/consul/docs/connect/ca/vault#namespace).
Set your configuration by calling [set-config](/consul/commands/connect/ca#set-config) then use [get-config](/consul/commands/connect/ca#get-config) to check.
2023-05-24 21:35:55 +00:00
#### API health endpoints return different status code
Consul versions 1.16.0+ now return an error 403 "Permission denied" status
whenever the `/v1/health/connect/` and `/v1/health/ingress/` endpoints are
queried with insufficient ACL `service:read` privileges.
In Consul versions older than 1.16.0, the service health API did not return an explicit error when given a token with invalid permissions. Instead, it returned an empty list with a success status code.
Before upgrading, ensure that all of your applications can handle this new API behavior properly. An update is not required unless you have a custom application that is querying one of these API endpoints directly.
2023-04-11 15:20:33 +00:00
#### Remove deprecated service-defaults peer upstream override behavior
2023-06-01 22:09:21 +00:00
When configuring a service defaults configuration entry, the [`UpstreamConfig.Overrides` configuration](/consul/docs/connect/config-entries/service-defaults#upstreamconfig-overrides)
2023-04-11 16:40:55 +00:00
does not apply to peer upstreams unless the [`Peer`](/consul/docs/connect/config-entries/service-defaults#upstreamconfig-overrides-peer) field is explicitly provided.
This change removes the backward-compatibility behavior introduced in Consul 1.15.x. Refer to the [upgrade instructions for 1.15.x](#service-defaults-overrides-for-upstream-peered-services) for more information.
2023-04-11 15:20:33 +00:00
2022-12-08 19:46:42 +00:00
## Consul 1.15.x
2023-10-04 20:10:19 +00:00
### Service mesh compatibility ((#service-mesh-compatibility-1-15))
2023-03-30 21:23:19 +00:00
2023-04-17 23:41:31 +00:00
Upgrade to **Consul version 1.15.2 or later**.
2023-10-04 20:10:19 +00:00
If using [Vault Enterprise as CA](#vault-enterprise-as-ca-1-15), **avoid Consul version 1.15.6**.
2023-03-30 21:23:19 +00:00
2023-04-17 23:41:31 +00:00
Consul versions 1.15.0 - 1.15.1 contain a race condition that can cause
2023-03-30 21:23:19 +00:00
some service instances to lose their ability to communicate in the mesh after
[72 hours (LeafCertTTL)](/consul/docs/connect/ca/consul#leafcertttl)
due to a problem with leaf certificate rotation.
2023-04-17 23:41:31 +00:00
This bug is fixed in Consul versions 1.15.2 and newer.
2023-03-30 21:23:19 +00:00
2023-10-04 20:10:19 +00:00
#### Vault Enterprise as CA ((#vault-enterprise-as-ca-1-15))
Using Vault as CA with Consul version 1.15.6 will fail to initialize the CA if [`namespace`](/consul/docs/connect/ca/vault#namespace) is set
but [`intermediate_pki_namespace`](/consul/docs/connect/ca/vault#intermediatepkinamespace) or [`root_pki_namespace`](/consul/docs/connect/ca/vault#rootpkinamespace)
are empty. This is a bug which will be fixed in a future version.
To work around this issue, users must explicitly set [`intermediate_pki_namespace`](/consul/docs/connect/ca/vault#intermediatepkinamespace) and
[`root_pki_namespace`](/consul/docs/connect/ca/vault#rootpkinamespace) to the same value as [`namespace`](/consul/docs/connect/ca/vault#namespace).
Set your configuration by calling [set-config](/consul/commands/connect/ca#set-config) then use [get-config](/consul/commands/connect/ca#get-config) to check.
2022-12-08 19:46:42 +00:00
#### Removing configuration options
The `connect.enable_serverless_plugin` configuration option was removed. Lambda integration is now enabled by default.
2023-01-24 16:21:41 +00:00
#### Deprecating authentication via token query parameter
2023-12-11 23:28:04 +00:00
Providing a Consul ACL token in API requests using the `token` query parameter is deprecated and will be removed in a future Consul version.
2023-01-24 16:21:41 +00:00
Instead, you should provide the token through the `X-Consul-Token` header or with the Bearer scheme in the authorization header as described in the [API authentication documentation](/consul/api-docs/api-structure#authentication).
Check whether you are using a `token` query parameter by searching your Consul agent logs for the message:
```shell-session hideClipboard
2023-12-11 23:28:04 +00:00
$ This request used the token query parameter which is deprecated and will be removed in a future Consul version
2023-01-24 16:21:41 +00:00
```
2023-01-27 15:17:07 +00:00
Deprecated authentication using the `token` query parameter:
2023-01-24 16:21:41 +00:00
```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/members?token=<consul token>
```
Recommended authentication method:
```shell-session
$ curl \
--header "X-Consul-Token: <consul token>" \
http://127.0.0.1:8500/v1/agent/members
```
2022-12-19 20:19:37 +00:00
#### Lambda Configuration
Instead of configuring Lambda functions in the `Meta` field of `service-defaults` configuration entries, configure them with the `EnvoyExtensions` field.
Before Consul v1.15:
<CodeBlockConfig filename="lambda-service-defaults.hcl">
```hcl
Kind = "service-defaults"
Name = "<SERVICE_NAME>"
Protocol = "http"
Meta = {
"serverless.consul.hashicorp.com/v1alpha1/lambda/enabled" = "true"
}
```
</CodeBlockConfig>
In Consul v1.15 and higher:
<CodeBlockConfig filename="lambda-service-defaults.hcl">
```hcl
Kind = "service-defaults"
Name = "<SERVICE_NAME>"
Protocol = "http"
EnvoyExtensions = [
{
"Name": "builtin/aws/lambda",
"Arguments": {
"Region": "us-east-2",
"ARN": "<INSERT ARN HERE>",
"PayloadPassthrough": true
}
}
]
```
</CodeBlockConfig>
2023-02-03 22:08:06 +00:00
#### `service-defaults` Overrides for Upstream Peered Services
In Consul 1.14.x, `service-defaults` upstream [`overrides`](/consul/docs/connect/config-entries/service-defaults#overrides) apply to both local and peered services as long as the `name` field matches.
Consul 1.15.0 is backward compatible with 1.14 if the [`peer`](/consul/docs/connect/config-entries/service-defaults#peer) is not set in any override.
We recommend converting any upstream peer service overrides as a 1.15.x post-upgrade step.
Before Consul v1.15:
<CodeBlockConfig>
```hcl
Kind = "service-defaults"
Name = "<SERVICE_NAME>"
Protocol = "http"
UpstreamConfig = {
Overrides = [
{
Name = foo # Applies to local `foo` and any peered service `foo`
}
]
}
```
</CodeBlockConfig>
In Consul v1.15 and higher:
<CodeBlockConfig>
```hcl
Kind = "service-defaults"
Name = "<SERVICE_NAME>"
Protocol = "http"
UpstreamConfig = {
Overrides = [
{
2023-06-01 22:09:21 +00:00
Name = foo # Applies to local service `foo`
2023-02-03 22:08:06 +00:00
},
{
Name = foo # Applies to `foo` imported from peered cluster `bar`
Peer = bar
}
]
}
```
</CodeBlockConfig>
2022-08-23 17:11:56 +00:00
## Consul 1.14.x
### Service Mesh Compatibility
2023-05-05 17:41:40 +00:00
Prior to Consul 1.14, cluster peering and Consul service mesh were disabled by default.
2022-11-09 17:29:55 +00:00
A breaking change was made in Consul 1.14 that:
2023-01-25 16:52:43 +00:00
- [Cluster Peering is enabled by default.](/consul/docs/connect/cluster-peering)
2023-01-06 23:30:10 +00:00
Cluster peering and WAN federation can coexist,
so there is no need to disable cluster peering to upgrade existing WAN federated datacenters.
2023-01-25 16:52:43 +00:00
To disable cluster peering nonetheless, set [`peering.enabled`](/consul/docs/agent/config/config-files#peering_enabled) to `false`.
2023-05-05 17:41:40 +00:00
- [Consul service mesh is enabled by default.](/consul/docs/connect)
2023-01-25 16:52:43 +00:00
To disable, set [`connect.enabled`](/consul/docs/agent/config/config-files#connect_enabled) to `false`.
2022-08-23 17:11:56 +00:00
2023-01-26 17:30:21 +00:00
The changes to Consul service mesh in version 1.14 are incompatible with Nomad 1.4.3 and
earlier. If you operate Consul service mesh using Nomad 1.4.3 or earlier, do not upgrade to
Consul 1.14 until [hashicorp/nomad#15266](https://github.com/hashicorp/nomad/issues/15266) and
[hashicorp/nomad#15360](https://github.com/hashicorp/nomad/issues/15360) have been fixed.
2022-11-16 22:45:58 +00:00
2022-11-18 21:59:57 +00:00
For 1.14.0, there is a known issue with `consul connect envoy`. If the command is configured
to use TLS for contacting the HTTP API, it will also incorrectly enable TLS for gRPC.
Users should not upgrade to 1.14.0 if they are using plaintext gRPC connections in
conjunction with TLS-encrypted HTTP APIs.
2023-10-04 20:10:19 +00:00
#### Vault Enterprise as CA ((#vault-enterprise-as-ca-1-14))
Using Vault as CA with Consul version 1.14.10 will fail to initialize the CA if [`namespace`](/consul/docs/connect/ca/vault#namespace) is set
but [`intermediate_pki_namespace`](/consul/docs/connect/ca/vault#intermediatepkinamespace) or [`root_pki_namespace`](/consul/docs/connect/ca/vault#rootpkinamespace)
are empty. This is a bug which will be fixed in a future version.
To work around this issue, users must explicitly set [`intermediate_pki_namespace`](/consul/docs/connect/ca/vault#intermediatepkinamespace) and
[`root_pki_namespace`](/consul/docs/connect/ca/vault#rootpkinamespace) to the same value as [`namespace`](/consul/docs/connect/ca/vault#namespace).
Set your configuration by calling [set-config](/consul/commands/connect/ca#set-config) then use [get-config](/consul/commands/connect/ca#get-config) to check.
2022-11-18 21:59:57 +00:00
2022-11-10 15:32:31 +00:00
#### Changes to gRPC TLS configuration
2022-08-23 17:11:56 +00:00
2023-01-25 16:52:43 +00:00
**Make configuration changes** if using [`ports.grpc`](/consul/docs/agent/config/config-files#grpc_port) in conjunction with any of the following settings that enables encryption:
1. [`tls.grpc`](/consul/docs/agent/config/config-files#tls_grpc)
1. [`tls.defaults`](/consul/docs/agent/config/config-files#tls_defaults)
1. [`auto_encrypt`](/consul/docs/agent/config/config-files#auto_encrypt)
1. [`auto_config`](/consul/docs/agent/config/config-files#auto_config)
2022-08-23 17:11:56 +00:00
2022-09-14 20:25:39 +00:00
Prior to Consul 1.14, it was possible to encrypt communication between Consul and Envoy over `ports.grpc` using these settings.
2022-08-23 17:11:56 +00:00
2023-01-25 16:52:43 +00:00
Consul 1.14 introduces [`ports.grpc_tls`](/consul/docs/agent/config/config-files#grpc_tls_port), a new configuration
for encrypting communication over gRPC. The existing [`ports.grpc`](/consul/docs/agent/config/config-files#grpc_port) configuration **no longer supports encryption**. As of version 1.14,
[`ports.grpc_tls`](/consul/docs/agent/config/config-files#grpc_tls_port) is the only port that serves encrypted gRPC traffic.
2022-11-11 20:29:22 +00:00
The default value for the gRPC TLS port is 8503 for Consul servers. To disable the gRPC TLS port, use value -1.
2022-08-23 17:11:56 +00:00
2022-11-16 20:10:29 +00:00
If you already use gRPC encryption, change the following fields to ensure compatibility:
2023-01-25 16:52:43 +00:00
+ Change `ports.grpc` to `ports.grpc_tls`. Refer to the [`grpc_tls_port` documentation](/consul/docs/agent/config/config-files#grpc_tls_port) for details.
+ Change `addresses.grpc` to `addresses.grpc_tls`. Refer to the [`grpc_tls` documentation](/consul/docs/agent/config/config-files#grpc_tls) for details.
2022-11-21 15:41:29 +00:00
+ Update `consul connect envoy` command invocations to specify gRPC CA certificates with one of the new configuration options:
2023-01-25 16:52:43 +00:00
[`-grpc-ca-file`](/consul/commands/connect/envoy#grpc-ca-file) or
[`-grpc-ca-path`](/consul/commands/connect/envoy#grpc-ca-path)
2022-11-21 15:41:29 +00:00
(or their corresponding environment variables).
2022-08-23 17:11:56 +00:00
2022-11-10 15:32:31 +00:00
#### Changes to peering
2023-01-25 16:52:43 +00:00
[Cluster peering](/consul/docs/connect/cluster-peering) was released in Consul 1.13 as an experimental feature.
2022-11-10 15:32:31 +00:00
In Consul 1.14, cluster peering has been improved and is now considered stable. All experimental peering
connections created by 1.13 should be
2023-04-20 16:12:11 +00:00
[deleted](/consul/docs/connect/cluster-peering/usage/manage-connections#delete-peering-connections)
2022-11-10 15:32:31 +00:00
prior to upgrading, as they will no longer be compatible with 1.14.
2022-08-11 18:17:17 +00:00
## Consul 1.13.x
2022-08-11 21:40:28 +00:00
### Service Mesh Compatibility
2022-08-18 16:26:46 +00:00
Before upgrading existing Consul deployments using service mesh to Consul 1.13.x,
review the following guidances relevant to your deployment:
- [All service mesh deployments](#all-service-mesh-deployments)
- [Service mesh deployments using auto-encrypt or auto-config](#service-mesh-deployments-using-auto-encrypt-or-auto-config)
- [Service mesh deployments without the HTTPS port enabled on Consul agents](#service-mesh-deployments-without-the-https-port-enabled-on-consul-agents)
2022-10-05 18:53:29 +00:00
- [All service mesh deployments using the Vault CA provider](#modify-vault-policy-for-vault-ca-provider)
2022-08-18 16:26:46 +00:00
#### All service mesh deployments
Upgrade to **Consul version 1.13.1 or later**.
2022-08-11 21:43:27 +00:00
2022-10-18 15:38:16 +00:00
Consul 1.13.0 contains a bug that prevents Consul server agents from restoring
2022-08-11 21:43:27 +00:00
saved state on startup if the state
1. was generated before Consul 1.13 (such as during an upgrade), and
2023-05-05 17:41:40 +00:00
2. contained any service mesh proxy registrations.
2022-08-11 21:43:27 +00:00
2022-08-11 21:40:28 +00:00
This bug is fixed in Consul versions 1.13.1 and newer.
2022-06-29 16:46:37 +00:00
2022-08-18 16:26:46 +00:00
#### Service mesh deployments using auto-encrypt or auto-config
2022-10-21 21:15:22 +00:00
Upgrade to **Consul version 1.13.2 or later** if using
2023-01-25 16:52:43 +00:00
[auto-encrypt](/consul/docs/agent/config/config-files#auto_encrypt) or
[auto-config](/consul/docs/agent/config/config-files#auto_config).
2022-08-18 16:26:46 +00:00
2022-10-21 21:15:29 +00:00
In Consul 1.13.0 - 1.13.1, auto-encrypt and auto-config both cause Consul
2022-08-18 16:26:46 +00:00
to require TLS for gRPC communication with Envoy proxies.
In environments where Envoy proxies are not already configured
2022-10-22 00:12:13 +00:00
to use TLS for gRPC, upgrading to Consul 1.13.0 - 1.13.1 will cause
2022-08-18 16:26:46 +00:00
Envoy proxies to disconnect from the control plane (Consul agents).
2022-10-22 00:12:25 +00:00
If upgrading to version 1.13.2 or later, you must enable
2023-01-25 16:52:43 +00:00
[tls.grpc.use_auto_cert](/consul/docs/agent/config/config-files#use_auto_cert)
2022-10-22 21:49:57 +00:00
if you currently rely on Consul agents presenting the auto-encrypt or
auto-config certs as the TLS server certs on the gRPC port.
2022-10-18 15:38:16 +00:00
The new `use_auto_cert` flag enables TLS for gRPC based on the presence
of auto-encrypt certs.
2022-08-18 16:26:46 +00:00
#### Service mesh deployments without the HTTPS port enabled on Consul agents ((#grpc-tls))
If the HTTPS port is not enabled
2023-01-25 16:52:43 +00:00
([`ports { https = POSITIVE_INTEGER }`](/consul/docs/agent/config/config-files#https_port))
2022-08-18 16:26:46 +00:00
on a pre-1.13 Consul agent,
**[modify the agent's TLS configuration before upgrading](#modify-the-consul-agent-s-tls-configuration)**
to avoid Envoy proxies disconnecting from the control plane (Consul agents).
Envoy proxies include service mesh sidecars and gateways.
##### Changes to gRPC and HTTP interface configuration
If a Consul agent's HTTP API is exposed externally,
enabling HTTPS (TLS encryption for HTTP) is important.
The gRPC interface is used for xDS communication between Consul and
Envoy proxies when using Consul service mesh.
A Consul agent's gRPC traffic is often loopback-only,
which TLS encryption is not important for.
2023-01-25 16:52:43 +00:00
Prior to Consul 1.13, if [`ports { https = POSITIVE_INTEGER }`](/consul/docs/agent/config/config-files#https_port)
2022-08-18 16:26:46 +00:00
was configured, TLS was enabled for both HTTP *and* gRPC.
This was inconvenient for deployments that
needed TLS for HTTP, but not for gRPC.
Enabling HTTPS also required launching Envoy proxies
with the necessary TLS material for xDS communication
with its Consul agent via TLS over gRPC.
Consul 1.13 addresses this inconvenience by fully decoupling the TLS configuration for HTTP and gRPC interfaces.
TLS for gRPC is no longer enabled by setting
2023-01-25 16:52:43 +00:00
[`ports { https = POSITIVE_INTEGER }`](/consul/docs/agent/config/config-files#https_port).
2022-08-18 16:26:46 +00:00
TLS configuration for gRPC is now determined exclusively by:
2023-01-25 16:52:43 +00:00
1. [`tls.grpc`](/consul/docs/agent/config/config-files#tls_grpc), which overrides
1. [`tls.defaults`](/consul/docs/agent/config/config-files#tls_defaults), which overrides
1. [Deprecated TLS options](/consul/docs/agent/config/config-files#tls_deprecated_options) such as
[`ca_file`](/consul/docs/agent/config/config-files#ca_file-4),
[`cert_file`](/consul/docs/agent/config/config-files#cert_file-4), and
[`key_file`](/consul/docs/agent/config/config-files#key_file-4).
2022-08-18 16:26:46 +00:00
This decoupling has a side effect that requires a
[TLS configuration change](#modify-the-consul-agent-s-tls-configuration)
for pre-1.13 agents without the HTTPS port enabled.
Without a TLS configuration change,
Consul 1.13 agents may now expect gRPC *with* TLS,
causing communication to fail with Envoy proxies
that continue to use gRPC *without* TLS.
##### Modify the Consul agent's TLS configuration
2023-01-25 16:52:43 +00:00
If [`tls.grpc`](/consul/docs/agent/config/config-files#tls_grpc),
[`tls.defaults`](/consul/docs/agent/config/config-files#tls_defaults),
or the [deprecated TLS options](/consul/docs/agent/config/config-files#tls_deprecated_options)
2022-08-18 16:26:46 +00:00
define TLS material in their
`ca_file`, `ca_path`, `cert_file`, or `key_file` fields,
TLS for gRPC will be enabled in Consul 1.13, even if
2023-01-25 16:52:43 +00:00
[`ports { https = POSITIVE_INTEGER }`](/consul/docs/agent/config/config-files#https_port)
2022-08-18 16:26:46 +00:00
is not set.
This will cause Envoy proxies to disconnect from the control plane
after upgrading to Consul 1.13 if associated pre-1.13 Consul agents
have **not** set
2023-01-25 16:52:43 +00:00
[`ports { https = POSITIVE_INTEGER }`](/consul/docs/agent/config/config-files#https_port).
2022-08-18 16:26:46 +00:00
To avoid this problem, make the following agent configuration changes:
1. Remove TLS material from the Consul agents'
interface-generic TLS configuration options:
2023-01-25 16:52:43 +00:00
[`tls.defaults`](/consul/docs/agent/config/config-files#tls_grpc) and
[deprecated TLS options](/consul/docs/agent/config/config-files#tls_deprecated_options)
2022-08-18 16:26:46 +00:00
1. Reapply TLS material to the non-gRPC interfaces that need it with the
interface-specific TLS configuration stanzas
2023-01-25 16:52:43 +00:00
[introduced in Consul 1.12](/consul/docs/upgrading/upgrade-specific#tls-configuration):
[`tls.https`](/consul/docs/agent/config/config-files#tls_https) and
[`tls.internal_rpc`](/consul/docs/agent/config/config-files#tls_internal_rpc).
2022-08-18 16:26:46 +00:00
If upgrading directly from pre-1.12 Consul,
the above configuration change cannot be made before upgrading.
Therefore, consider upgrading agents to Consul 1.12 before upgrading to 1.13.
If pre-1.13 Consul agents have set
2023-01-25 16:52:43 +00:00
[`ports { https = POSITIVE_INTEGER }`](/consul/docs/agent/config/config-files#https_port),
2022-08-18 16:26:46 +00:00
this configuration change is not required to upgrade.
That setting means the pre-1.13 Consul agent requires TLS for gRPC *already*,
and will continue to do so after upgrading to 1.13.
If your pre-1.13 service mesh is working, you have already
configured your Envoy proxies to use TLS for gRPC when bootstrapping Envoy
2023-01-25 16:52:43 +00:00
via [`consul connect envoy`](/consul/commands/connect/envoy),
2022-08-18 16:26:46 +00:00
such as with flags or environment variables like
2023-01-25 16:52:43 +00:00
[`-ca-file`](/consul/commands/connect/envoy#ca-file) and
[`CONSUL_CACERT`](/consul/commands#consul_cacert).
2022-07-15 18:15:50 +00:00
2022-10-05 18:53:29 +00:00
#### Modify Vault policy for Vault CA provider
If using the Vault CA provider,
2022-10-24 21:16:51 +00:00
modify the Vault policy used by Consul to interact with Vault
to ensure that certificates required for service mesh operation can still be generated.
2022-10-05 18:53:29 +00:00
The policy must include the `update` capability on the intermediate PKI's tune mount configuration endpoint
at path `/sys/mounts/<intermediate_pki_mount_name>/tune`.
2023-01-25 16:52:43 +00:00
Refer to the [Vault CA provider documentation](/consul/docs/connect/ca/vault#vault-acl-policies)
2022-10-05 18:53:29 +00:00
for updated example Vault policies for use with Vault-managed or Consul-managed PKI paths.
You are using the Vault CA provider if either of the following configurations exists:
2023-01-25 16:52:43 +00:00
- The Consul server agent configuration option [`connect.ca_provider`](/consul/docs/agent/config/config-files#connect_ca_provider) is set to `vault`, or
- The Consul on Kubernetes Helm Chart [`global.secretsBackend.vault.connectCA`](/consul/docs/k8s/helm#v-global-secretsbackend-vault-connectca) value is configured.
2022-10-05 18:53:29 +00:00
2022-10-24 21:16:51 +00:00
Though this guidance is listed in the 1.13.x section, it applies to several release series.
Affected Consul versions contain a
2022-10-05 18:53:29 +00:00
[bugfix that allows the intermediate CA's TTL configuration to be modified](https://github.com/hashicorp/consul/pull/14516).
The bugfix requires the `update` capability to tune that configuration.
2022-10-24 21:16:51 +00:00
Without the `update` capability, the Consul versions listed in the _breaking change_ column
2022-10-05 18:53:29 +00:00
cannot provide services with the certificates they need to participate in the mesh.
2022-10-24 21:16:51 +00:00
The Consul versions in the _recommended versions_ column restore the intermediate CA's ability
to provide certificates even without the `update` capability on the tune configuration endpoint,
2022-10-05 18:53:29 +00:00
though the `update` capability will still be needed to modify the CA's TTL configuration.
2022-10-24 21:16:51 +00:00
| Release Series | Versions with breaking change | Recommended versions |
| -------------- | ----------------------------- | -------------------- |
| Consul 1.13.x | 1.13.2 | 1.13.3 or later |
| Consul 1.12.x | 1.12.5 | 1.12.6 or later |
| Consul 1.11.x | 1.11.9 - 1.11.10 | 1.11.11 or later |
As a precaution, we recommend both modifying the Vault policy
and upgrading to a recommended version as a double protection
to ensure the operation of your service mesh and to enable CA TTL modification.
2022-10-05 18:53:29 +00:00
2022-06-29 16:46:37 +00:00
### 1.9 Telemetry Compatibility
#### Removing configuration options
2023-01-25 16:52:43 +00:00
The [`disable_compat_19`](/consul/docs/agent/config/config-files#telemetry-disable_compat_1.9) telemetry configuration option is now removed.
2022-06-29 16:46:37 +00:00
In prior Consul versions (1.10.x through 1.11.x), the config defaulted to `false`. In 1.12.x it defaulted to `true`.
If you were using this flag, you must remove it before upgrading.
2022-10-05 18:53:29 +00:00
### Modify Vault Policy for Vault CA Provider
Follow the same guidance as provided in the
[1.13 upgrade section for modifying the Vault policy if using the Vault CA provider](#modify-vault-policy-for-vault-ca-provider).
2022-10-24 21:16:51 +00:00
A breaking change was made in Consul 1.13.2 that impacts service mesh operation
if the Vault policy is not modified as described.
As a precaution, we recommend both modifying the Vault policy and upgrading
to Consul 1.13.3 or later to avoid the breaking nature of that change.
2022-10-05 18:53:29 +00:00
2023-06-01 22:09:21 +00:00
### Nomad Incompatibility
Nomad users should not upgrade to Consul v1.13.8. An API change in this Consul
release prevents Nomad from correctly detecting the Consul agent version. As a
result, allocations are not placed in clients running v1.13.8.
2022-10-05 18:53:29 +00:00
## Consul 1.12.x ((#consul-1-12-0))
### Modify Vault Policy for Vault CA Provider
Follow the same guidance as provided in the
[1.13 upgrade section for modifying the Vault policy if using the Vault CA provider](#modify-vault-policy-for-vault-ca-provider).
2022-10-24 21:16:51 +00:00
A breaking change was made in Consul 1.12.5 that impacts service mesh operation
if the Vault policy is not modified as described.
As a precaution, we recommend both modifying the Vault policy and upgrading
to Consul 1.12.6 or later to avoid the breaking nature of that change.
2022-04-01 17:35:56 +00:00
### 1.9 Telemetry Compatibility
#### Changing the default behavior for option
2023-01-25 16:52:43 +00:00
The [`disable_compat_19`](/consul/docs/agent/config/config-files#telemetry-disable_compat_1.9) telemetry configuration option now defaults
2022-04-01 17:35:56 +00:00
to `true`. In prior Consul versions (1.10.x through 1.11.x), the config defaulted to `false`. If you require 1.9 style
`consul.http...` metrics, you may enable them by setting the flag to `false`. However, be advised that these metrics, as
well as the flag will be removed in upcoming Consul 1.13. We recommend changing your instrumentation to use 1.10 and later
style `consul.api.http...` metrics and removing the configuration flag from your setup.
2022-05-16 22:41:13 +00:00
### Nomad Namespace Incompatibility
2022-07-28 16:18:57 +00:00
Nomad Enterprise users should not upgrade to Consul Enterprise 1.12.0, and instead should upgrade to 1.12.1 or later.
2022-05-16 22:41:13 +00:00
2022-07-28 16:18:57 +00:00
Consul 1.12.0 Enterprise introduced a change that prevents Nomad Enterprise from removing services from non-default Consul namespaces.
The Consul Enterprise codebase was updated with a fix for this issue in version 1.12.1.
2022-05-16 22:41:13 +00:00
2022-05-11 09:28:52 +00:00
### TLS Configuration
You can now configure TLS differently for each of Consul's exposed ports. As a
result, the following top-level configuration fields are deprecated and should
2023-01-25 16:52:43 +00:00
be replaced with the new [`tls` stanza](/consul/docs/agent/config/config-files#tls-configuration-reference):
2022-05-11 09:28:52 +00:00
- `cert_file`
- `key_file`
- `ca_file`
- `ca_path`
- `tls_min_version`
- `tls_cipher_suites`
- `verify_incoming`
- `verify_incoming_rpc`
- `verify_incoming_https`
- `verify_outgoing`
- `verify_server_hostname`
2022-10-05 18:53:29 +00:00
## Consul 1.11.x ((#consul-1-11-0))
2021-10-28 01:51:35 +00:00
2022-01-10 22:18:40 +00:00
### 1.10 Compatibility <EnterpriseAlert inline />
Consul Enterprise versions 1.10.0 through 1.10.4 contain a latent bug that
causes those client or server agents to deregister their own services or health
2022-09-30 12:23:16 +00:00
checks when some of the servers have been upgraded to 1.11 or later.
Before upgrading Consul Enterprise servers to 1.11 or later,
you should first upgrade all Consul client and server agents to 1.10.7 or higher
to ensure forward compatibility and prevent flapping of catalog registrations.
2022-01-10 22:18:40 +00:00
2021-12-14 19:36:36 +00:00
### Deprecated Agent Config Options
2021-12-14 20:52:18 +00:00
Consul 1.11.0 is compiled with Go 1.17 and now the ordering of
`tls_cipher_suites` will no longer be honored. Additionally
`tls_prefer_server_cipher_suites` is now ignored.
2021-12-14 19:36:36 +00:00
The `master` and `agent_master` ACL tokens in the `acl.tokens` config block
have been renamed to `initial_management` and `agent_recovery` respectively.
The old names have been deprecated and will be removed at a future date.
2021-12-14 20:52:18 +00:00
Due to this rename the following endpoint is also deprecated:
2023-01-25 16:52:43 +00:00
- [`PUT /v1/agent/token/agent_master`](/consul/api-docs/agent#update-acl-tokens)
2021-12-14 19:36:36 +00:00
### Deprecated Agent Config Options <EnterpriseAlert inline />
2021-12-14 20:27:40 +00:00
These config keys are now deprecated:
- `audit.sink[].name`
2023-01-25 16:52:43 +00:00
- [`dns_config.dns_prefer_namespace`](/consul/docs/agent/config/config-files#dns_prefer_namespace)
2021-12-14 19:36:36 +00:00
### Deprecated CLI Subcommands
The `consul acl set-agent-token master` subcommand has been replaced with
`consul acl set-agent-token recovery`. The old subcommand is deprecated.
### Legacy ACL System Removal
2023-01-27 15:17:07 +00:00
The legacy ACL system that was deprecated in Consul 1.4.0 was removed in 1.11.0.
2021-12-14 19:36:36 +00:00
Before upgrading you should verify that nothing is still using the legacy ACL
2023-02-07 16:36:32 +00:00
system. Complete the [Migrate Legacy ACL Tokens](/consul/tutorials/security-operations/access-control-token-migration) tutorial to learn more.
2021-12-14 19:36:36 +00:00
### Raft Storage Changes
The underlying library used for persisting the Raft log to persistent storage
2021-12-14 20:52:50 +00:00
was [upgraded](https://github.com/hashicorp/consul/issues/11720) from
2021-12-14 19:36:36 +00:00
[`boltdb`](https://pkg.go.dev/github.com/boltdb/bolt) to
[`bbolt`](https://pkg.go.dev/go.etcd.io/bbolt).
The newer `bbolt` library is compatible with the persisted format generated by
`boltdb` but the reverse is not necessarily guaranteed. Like any Consul upgrade
it is strongly recommended that you take a snapshot of your database if you
expect that you will need to downgrade.
2021-10-28 01:51:35 +00:00
### Envoy xDS Protocol Upgrades
As noted in earlier upgrades, previous versions of Consul supported both v2 and v3
variants of the XDS Transport Protocol. In Consul 1.11, support for Envoy 1.16 is
removed and consequently v2 is no longer supported. What this means is that if
you have generated your Envoy bootstrap files using the Consul CLI that is newer
than 1.10, you must make sure that you upgrade Consul and Envoy per the
[Stairstep Upgrade Path](#stairstep-upgrade-path) before upgrading to Consul 1.11.
When upgrading to Consul 1.10, you must ensure that the Envoy sidecars are
restarted and bootstrapped using a version of the Consul CLI >= 1.10. This
ensures your sidecars are supported by Consul 1.11.
2022-10-05 18:53:29 +00:00
### Modify Vault Policy for Vault CA Provider
Follow the same guidance as provided in the
[1.13 upgrade section for modifying the Vault policy if using the Vault CA provider](#modify-vault-policy-for-vault-ca-provider).
2022-10-24 21:16:51 +00:00
A breaking change was made in Consul 1.11.9 that impacts service mesh operation
if the Vault policy is not modified as described.
As a precaution, we recommend both modifying the Vault policy and upgrading
to Consul 1.11.11 or later to avoid the breaking nature of that change.
2022-10-05 18:53:29 +00:00
2021-06-10 15:59:54 +00:00
## Consul 1.10.0
### Licensing Changes <EnterpriseAlert inline />
2021-06-02 19:11:53 +00:00
2023-04-07 20:47:15 +00:00
You can only upgrade to Consul Enterprise 1.10 from the following Enterprise versions:
- 1.8 release series: 1.8.13+
- 1.9 release series: 1.9.7+
Other versions of Consul Enterprise are not forward compatible with v1.10 and will
cause issues during the upgrade that could result in agents failing to start due to
[changes in the way we manage licenses](/consul/docs/enterprise/license/faq).
2021-06-02 19:11:53 +00:00
Consul Enterprise 1.10 has removed temporary licensing capabilities from the binaries
found on https://releases.hashicorp.com. Servers will no longer load a license previously
set through the CLI or API. Instead the license must be present in the server's configuration
2023-01-25 16:52:43 +00:00
or environment prior to starting. See the [licensing documentation](/consul/docs/enterprise/license/overview)
2021-06-02 19:11:53 +00:00
for more information about how to configure the license. Client agents previously retrieved their
license from the servers in the cluster within 30 minutes of starting and the snapshot agent
would similarly retrieve its license from the server or client agent it was configured to use. As
of Consul Enterprise 1.10 both the snapshot agent and client agent have gained the ability to
have a license loaded from a configuration file or from their environment the same way server
agents must have the license specified. Both agents can still perform automatic retrieval of their
license but with a few extra stipulations. First, license auto-retrieval now requires that ACLs
are on and that the client or snapshot agent is configured with a valid ACL token. Secondly, client
2023-01-25 16:52:43 +00:00
agents require that either the [`start_join`](/consul/docs/agent/config/config-files#start_join) or
[`retry_join`](/consul/docs/agent/config/config-files#retry_join) configurations are set and that they resolve to server
2021-06-02 19:11:53 +00:00
agents. If those stipulations are not met, attempting to start the client or snapshot agent will
result in it immediately shutting down.
2023-01-25 16:52:43 +00:00
For the step by step upgrade procedures see the [Upgrading to 1.10.0](/consul/docs/upgrading/instructions/upgrade-to-1-10-x) documentation.
For answers to common licensing questions please refer to the [FAQ](/consul/docs/enterprise/license/faq)
2021-06-02 19:11:53 +00:00
2021-06-10 15:59:54 +00:00
### Envoy xDS Protocol Upgrades
Consul versions 1.9 and earlier exposed an xDS server for use by
[Envoy](https://www.envoyproxy.io) proxies using the v2 ["State of the
World"](https://www.envoyproxy.io/docs/envoy/v1.17.2/api-docs/xds_protocol#variants-of-the-xds-transport-protocol)
protocol variant.
Consul 1.10.0 adds support for the v3
[Incremental](https://www.envoyproxy.io/docs/envoy/v1.17.2/api-docs/xds_protocol#incremental-xds)
protocol variant as the preferred way of conversing with Envoy. Both protocol
variants are supported in this Consul version to facilitate upgrading Consul
and Envoy in a stairstep order to avoid downtime.
2021-10-28 01:51:35 +00:00
In [Consul 1.11](#consul-1-11-0) the v2 State of the World protocol support will be removed.
2021-06-10 15:59:54 +00:00
2021-06-21 18:33:35 +00:00
| Protocol | Version | Compatible Envoy Versions | Compatible Consul Versions |
| ------------------ | ------- | ------------------------------ | -------------------------- |
| Incremental | v3 | 1.18.x, 1.17.x, 1.16.x, 1.15.x | 1.10.x |
| State of the World | v2 | 1.16.x and older | 1.10.x and older |
2021-06-10 15:59:54 +00:00
#### Escape Hatches
2023-01-25 16:52:43 +00:00
Any [escape hatches](/consul/docs/connect/proxies/envoy#advanced-configuration) that
2021-06-10 15:59:54 +00:00
are defined will likely need to be switched from using xDS v2 to xDS v3
structures. Mostly this involves migrating off of deprecated (and now removed)
fields and switching untyped config to [typed config](https://www.envoyproxy.io/docs/envoy/v1.17.2/configuration/overview/extension)
with `@type` attributes set appropriately.
xDS v3 syntax has been [supported since Envoy
1.13.0](https://www.envoyproxy.io/docs/envoy/v1.13.0/api-v3/api) so this could
be done on most earlier versions of Consul+Envoy in advance of the Consul
1.10.0 upgrade.
As an example, here's a Zipkin integration
[before](https://github.com/hashicorp/consul/blob/v1.9.5/test/integration/connect/envoy/case-zipkin/service_s2.hcl)
and [after](https://github.com/hashicorp/consul/blob/71d45a34601423abdfc0a64d44c6a55cf88fa2fc/test/integration/connect/envoy/case-zipkin/service_s2.hcl)
#### Stairstep Upgrade Path
1. Upgrade Envoy sidecars to the latest version of Envoy that is
2023-01-25 16:52:43 +00:00
[supported](/consul/docs/connect/proxies/envoy#supported-versions) by the currently
2021-06-10 15:59:54 +00:00
running version of Consul as well as Consul 1.10.0.
2023-01-25 16:52:43 +00:00
1. Determine if you are using the [escape hatch](/consul/docs/connect/proxies/envoy#advanced-configuration)
2021-06-10 15:59:54 +00:00
feature. If so, rewrite the escape hatch to use the xDS v3 syntax and update
the service registration to reflect the updated escape hatch configuration
by re-registering. This should purge v2 elements from any configs.
1. Perform a normal upgrade of both Consul servers and clients to 1.10.0. At
this point the existing Envoy instances will continue to speak the v2 State
of the World protocol to the new Consul instances without issue.
1. Once a Consul client is upgraded, use an updated CLI binary to re-bootstrap
2023-01-25 16:52:43 +00:00
and restart Envoy using [`consul connect envoy`](/consul/commands/connect/envoy).
2021-06-10 15:59:54 +00:00
This will ensure it switches over to the v3 Incremental xDS protocol.
Depending upon how you have chosen to run Envoy this is either one step
(`consul connect envoy`) or two steps (`consul connect envoy -bootstrap`
followed by running Envoy directly).
1. (Optionally) upgrade Envoy to the latest version supported in Consul 1.10.0.
2021-06-22 23:41:08 +00:00
### Transparent Proxy on Kubernetes
When upgrading to Consul >= 1.10.0, Consul-helm >= 0.32.0, and Consul-k8s >= 0.26.0, a Kubernetes Service must be added for every service registered to Consul. This Service should be added before
performing the upgrade. This will allow services to be managed by a central component, called `endpoints-controller`, which will enable features like
transparent proxy.
After the upgrade is performed, all Pods of a service will need to be restarted. The service will be up and health
checks will continue to work without restarting the service, but a restart is required so the Pods can be re-injected with the latest
container configuration.
2020-10-01 14:19:14 +00:00
## Consul 1.9.0
2020-09-25 17:46:38 +00:00
### Changes to Raft Protocol Support
Consul 1.8 supported Raft protocols 2 and 3. Consul 1.9.0 now only supports
2021-05-10 15:05:05 +00:00
Raft protocol 3. Consul has defaulted to using Raft protocol 3 since version 1.0.0,
so this should only impact users who have been using Consul prior to 1.0.0 and
may have the `raft_protocol` config setting set to 2. Users in that position
should upgrade to a previous release supporting both protocol versions and
update their configuration to use Raft protocol 3 before continuing their upgrade
to Consul 1.9.0.
2020-09-25 17:46:38 +00:00
### Changes to Configuration Defaults
2023-01-25 16:52:43 +00:00
The [`enable_central_service_config`](/consul/docs/agent/config/config-files#enable_central_service_config)
2020-10-01 14:19:14 +00:00
configuration now defaults to `true`.
2020-10-14 15:23:05 +00:00
### Changes to Intentions
2020-12-14 15:57:02 +00:00
#### Namespaced Intentions <EnterpriseAlert inline />
The API endpoint to [list
2023-01-25 16:52:43 +00:00
intentions](/consul/api-docs/connect/intentions#list-intentions) now accepts the same
2020-12-14 15:57:02 +00:00
`ns` query parameter (or `X-Consul-Namespace` header) used on other API
endpoints. By default this will now only list the intentions in a specific
namespace, rather than listing all intentions across all namespaces. To achieve
the same results as Consul versions prior to 1.9.0 request the wildcard
namespace with a query parameter of `?ns=*`.
2020-10-14 15:23:05 +00:00
#### Migration
Upgrading to Consul 1.9.0 will trigger a one-time background migration of
2023-01-25 16:52:43 +00:00
[intentions](/consul/docs/connect/intentions) into an equivalent set of
[`service-intentions`](/consul/docs/connect/config-entries/service-intentions) config
2020-10-14 15:23:05 +00:00
entries. This process will wait until all of the Consul servers in the primary
datacenter are running Consul 1.9.0+.
All write requests via either the [Intentions
2023-01-25 16:52:43 +00:00
API](/consul/api-docs/connect/intentions) endpoints or [Config Entry
API](/consul/api-docs/config) endpoints for a `service-intentions` kind will be
2020-10-14 15:23:05 +00:00
blocked until the migration process is complete after the upgrade. Reads will
function normally throughout the migration, so authorization enforcement will
be unaffected.
Secondary datacenters will perform their own one-time migration operations
after the primary datacenter completes its migration and all of the Consul
servers in the secondary datacenter are running Consul 1.9.0+. It is safe to
upgrade the datacenters in any order.
#### Deprecated Fields
2023-01-25 16:52:43 +00:00
All old ID-based [Intentions API](/consul/api-docs/connect/intentions) CRUD endpoints
2020-10-14 15:23:05 +00:00
will retain all of their prior fields _as long as those endpoints are
exclusively used to edit intentions_. Once the underlying config entry
representation is edited it will transition the intention into the newer format
where some fields are no longer present. Once this transition occurs those
intentions can no longer be used with the ID-based endpoints unless they are
re-created via the old endpoints. Fields that are being removed or changing
behavior:
- `Intention.ID` after migration is stored in the
2023-01-25 16:52:43 +00:00
[`LegacyID`](/consul/docs/connect/config-entries/service-intentions#legacyid) field.
2020-10-14 15:23:05 +00:00
After transitioning this field is cleared.
- `Intention.CreatedAt` after migration is stored in the
2023-01-25 16:52:43 +00:00
[`LegacyCreateTime`](/consul/docs/connect/config-entries/service-intentions#legacycreatetime)
2020-10-14 15:23:05 +00:00
field. After transitioning this field is cleared.
- `Intention.UpdatedAt` after migration is stored in the
2023-01-25 16:52:43 +00:00
[`LegacyUpdateTime`](/consul/docs/connect/config-entries/service-intentions#legacyupdatetime)
2020-10-14 15:23:05 +00:00
field. After transitioning this field is cleared.
- `Intention.Meta` after migration is stored in the
2023-01-25 16:52:43 +00:00
[`LegacyMeta`](/consul/docs/connect/config-entries/service-intentions#legacymeta)
2020-10-14 15:23:05 +00:00
field. To complete the transition, this field **must be cleared manually**
and the metadata moved up to the enclosing config entry's
2023-01-25 16:52:43 +00:00
[`Meta`](/consul/docs/connect/config-entries/service-intentions#meta) field. This is
2020-10-14 15:23:05 +00:00
not done automatically since it is potentially a lossy operation.
2020-05-29 21:16:03 +00:00
## Consul 1.8.0
2020-10-14 15:23:05 +00:00
#### Removal of Deprecated Features
2023-01-25 16:52:43 +00:00
The [`acl_enforce_version_8`](/consul/docs/agent/config/config-files#acl_enforce_version_8)
2020-05-29 21:16:03 +00:00
configuration has been removed (with version 8 ACL support by being on by
default).
2019-12-10 02:26:41 +00:00
## Consul 1.7.0
2020-04-06 20:27:35 +00:00
Consul 1.7.0 contains three major changes that impact upgrades:
[stricter JSON decoding](#stricter-json-decoding), [modified DNS outputs](#dns-ptr-record-output),
2020-03-05 20:04:04 +00:00
and [backward-incompatible Session API changes](#session-api).
### Session API
2020-04-06 20:27:35 +00:00
Consul 1.7.0 introduced a backwards incompatible change to the Session API.
2020-03-05 20:04:04 +00:00
Queries to view or renew sessions from agents on earlier versions will be rejected.
This impacts features and products including: Vault, the Enterprise snapshot agent, and locks.
2020-04-06 20:27:35 +00:00
The issue occurs when clients are still running 1.6.4 or earlier but servers have been upgraded to 1.7.0 or 1.7.1.
2020-03-05 20:04:04 +00:00
For this reason, we recommend you upgrade directly to 1.7.2 when it is available as it will include a fix for this issue.
2019-12-10 02:26:41 +00:00
### Stricter JSON Decoding
The HTTP API will now return 400 status codes with a textual error when unknown fields
are present in the payload of a request. Previously, Consul would simply ignore the
unknown fields. You will need to ensure that your API usage only uses supported
fields which are those documented in the example payloads in the API documentation.
### DNS PTR Record Output
2023-09-27 16:31:28 +00:00
Consul will now return the canonical service name in response to PTR queries. For CE users, the
2019-12-10 02:26:41 +00:00
change is that the datacenter will be present where it was not before. For Consul Enterprise
users, both the datacenter and the services namespace will be present. For example, where a
PTR record would previously have contained `web.service.consul`, it will now be `web.service.dc1.consul`
2023-09-27 16:31:28 +00:00
in CE, or `web.service.ns1.dc1.consul` for Enterprise.
2019-12-10 02:26:41 +00:00
2020-02-10 18:01:15 +00:00
### Telemetry: semantics of `consul.rpc.query` changed, see `consul.rpc.queries_blocking`
2023-01-25 16:52:43 +00:00
Consul has changed the semantics of query counts in its [telemetry](/consul/docs/agent/telemetry#metrics-reference).
2020-04-06 20:27:35 +00:00
`consul.rpc.query` now only increments on the _start_ of a query (blocking or non-blocking), whereas before it would
2020-03-10 17:00:49 +00:00
measure when blocking queries polled for more data. The `consul.rpc.queries_blocking` gauge has been added
2020-04-06 20:27:35 +00:00
to more precisely capture the view of _active_ blocking queries.
2020-02-10 18:01:15 +00:00
2020-03-10 17:00:49 +00:00
### Vault: default `http_max_conns_per_client` too low to run Vault properly
2020-02-13 19:42:36 +00:00
2023-01-25 16:52:43 +00:00
Consul 1.7.0 introduced [limiting of connections per client](/consul/docs/agent/config/config-files#http_max_conns_per_client). The default value
2020-03-10 17:00:49 +00:00
was 100, but Vault could use up to 128, which caused problems. If you want to use Vault with Consul 1.7.0, you should change the value to 200.
Starting with Consul 1.7.1 this is the new default.
2020-02-13 19:42:36 +00:00
## Consul 1.6.3
2020-03-10 17:00:49 +00:00
### Vault: default `http_max_conns_per_client` too low to run Vault properly
2020-02-13 19:42:36 +00:00
2023-01-25 16:52:43 +00:00
Consul 1.6.3 introduced [limiting of connections per client](/consul/docs/agent/config/config-files#http_max_conns_per_client). The default value
2020-11-02 23:10:34 +00:00
was 100, but Vault could use up to 128, which caused problems. If you want to use Vault with Consul 1.6.3 through 1.7.0, you should change the value to 200.
Starting with Consul 1.7.1 this is the new default.
2020-02-13 19:42:36 +00:00
2019-09-27 14:52:47 +00:00
## Consul 1.6.0
#### Removal of Deprecated Features
2023-09-16 04:44:27 +00:00
Managed proxies, which are deprecated since Consul v1.3.0, have now been
2023-08-18 18:54:42 +00:00
[removed](/consul/docs/connect/proxies). Before upgrading, you must
migrate any managed proxy usage to [sidecar service
2023-09-06 23:55:18 +00:00
registrations](/consul/docs/connect/proxies/deploy-sidecar-services).
2019-09-27 14:52:47 +00:00
2018-11-14 15:40:02 +00:00
## Consul 1.4.0
2019-05-15 15:49:41 +00:00
There are two major features in Consul 1.4.0 that may impact upgrades: a [new
ACL system](#acl-upgrade) and [multi-datacenter support for
2023-05-05 17:41:40 +00:00
service mesh](#multi-datacenter-service-mesh) in the Enterprise version.
2018-11-14 15:40:02 +00:00
### ACL Upgrade
2019-05-15 15:49:41 +00:00
Consul 1.4.0 includes a [new ACL
2023-01-25 16:52:43 +00:00
system](/consul/tutorials/security/access-control-setup-production)
2019-05-15 15:49:41 +00:00
that is designed to have a smooth upgrade path but requires care to upgrade
components in the right order.
2018-11-14 15:40:02 +00:00
**Note:** As with most major version upgrades, you cannot downgrade once the
upgrade to 1.4.0 is complete as it adds new state to the raft store. As always
it is _strongly_ recommended that you test the upgrade first outside of
production and ensure you take backup snapshots of all datacenters before
upgrading.
#### Primary Datacenter
The "ACL datacenter" in 1.3.x and earlier is now referred to as the "Primary
datacenter". All configuration is backwards compatible and shouldn't need to
change prior to upgrade although it's strongly recommended to migrate ACL
configuration to the new syntax soon after upgrade. This includes moving to
`primary_datacenter` rather than `acl_datacenter` and `acl_*` to the new [ACL
2023-01-25 16:52:43 +00:00
block](/consul/docs/agent/config/config-files#acl).
2018-11-14 15:40:02 +00:00
Datacenters can be upgraded in any order although secondaries will remain in
[Legacy ACL mode](#legacy-acl-mode) until the primary datacenter is fully
2019-06-24 21:25:58 +00:00
upgraded.
2018-11-14 15:40:02 +00:00
Each datacenter should follow the [standard rolling upgrade
2023-01-25 16:52:43 +00:00
procedure](/consul/docs/upgrading#standard-upgrades).
2018-11-14 15:40:02 +00:00
#### Legacy ACL Mode
When a 1.4.0 server first starts, it runs in "Legacy ACL mode". In this mode,
bootstrap requests and new ACL APIs will not be functional yet and will return
2020-10-14 15:23:05 +00:00
an error. The server advertises its ability to support 1.4.0 ACLs via gossip
2018-11-14 15:40:02 +00:00
and waits.
In the primary datacenter, the servers all wait in legacy ACL mode until they
see every server in the primary datacenter advertise 1.4.0 ACL support. Once
this happens, the leader will complete the transition out of "legacy ACL mode"
and write this into the state so future restarts don't need to go through the
same transition.
In a secondary datacenter, the same process happens except that servers
_additionally_ wait for all servers in the primary datacenter making it safe to
upgrade datacenters in any order.
It should be noted that even if you are not upgrading, starting a brand new
1.4.0 cluster will transition through legacy ACL mode so you may be unable to
bootstrap ACLs until all the expected servers are up and healthy.
#### Legacy Token Accessor Migration
As soon as all servers in the primary datacenter have been upgraded to 1.4.0,
the leader will begin the process of creating new accessor IDs for all existing
ACL tokens.
This process completes in the background and is rate limited to ensure it
doesn't overload the leader. It completes upgrades in batches of 128 tokens and
will not upgrade more than one batch per second so on a cluster with 10,000
tokens, this may take several minutes.
While this is happening both old and new ACLs will work correctly with the
2023-01-25 16:52:43 +00:00
caveat that new ACL [Token APIs](/consul/api-docs/acl/tokens) may not return an
2018-11-14 15:40:02 +00:00
accessor ID for legacy tokens that are not yet migrated.
#### Migrating Existing ACLs
New ACL policies have slightly different syntax designed to fix some
shortcomings in old ACL syntax. During and after the upgrade process, any old
ACL tokens will continue to work and grant exactly the same level of access.
After upgrade, it is still possible to create "legacy" tokens using the existing
API so existing integrations that create tokens (e.g. Vault) will continue to
work. The "legacy" tokens generated though will not be able to take advantage of
new policy features. It's recommended that you complete migration of all tokens
as soon as possible after upgrade, as well as updating any integrations to work
2023-07-31 17:56:09 +00:00
with the new ACL [Token](/consul/api-docs/acl/tokens) and
2023-01-25 16:52:43 +00:00
[Policy](/consul/api-docs/acl/policies) APIs.
2018-11-14 15:40:02 +00:00
2023-05-05 17:41:40 +00:00
### Multi-datacenter service mesh
2018-11-14 15:40:02 +00:00
This only applies to users upgrading from an older version of Consul Enterprise to Consul Enterprise 1.4.0 (all license types).
2023-05-05 17:41:40 +00:00
In addition, this upgrade will only affect clusters where [service mesh is enabled](/consul/docs/connect/configuration) on your servers before the migration.
2018-11-14 15:40:02 +00:00
2023-05-05 17:41:40 +00:00
Multi-datacenter service mesh uses the same primary/secondary approach as ACLs and
2019-05-15 15:49:41 +00:00
will use the same [primary_datacenter](#primary-datacenter). When a secondary
datacenter server restarts with 1.4.0 it will detect it is not the primary and
begin an automatic bootstrap of multi-datacenter CA federation.
Datacenters can be upgraded in either order; secondary datacenters will not
switch into multi-datacenter mode until all servers in both the secondary and
primary datacenter are detected to be running at least Consul 1.4.0. Secondary
datacenters monitor this periodically (every few minutes) and will
2023-05-05 17:41:40 +00:00
automatically upgrade service mesh to use a federated Certificate Authority when
2019-05-15 15:49:41 +00:00
they do.
2023-09-27 16:31:28 +00:00
In general, migrating a Consul cluster from CE to Enterprise will update the
2023-05-05 17:41:40 +00:00
CA to be federated automatically and without impact on service mesh traffic. When
2019-05-15 15:49:41 +00:00
upgrading Consul Enterprise 1.3.x to Consul Enterprise 1.4.0 upgrades the CA
upgrade is seamless, however depending on the size of the cluster, _new_
connection attempts in the secondary datacenter might fail for a short window
(typically seconds) while the update is propagated due to the 1.3.x Beta
authorization endpoint validating originating cluster in a way that was not
fully forwards compatible with migrating between cluster trust domains. That
issue is fixed in 1.4.0 as part of General Availability.
2023-05-05 17:41:40 +00:00
Once migrated (typically a few seconds). The service mesh will use the primary
2019-05-15 15:49:41 +00:00
datacenter's Certificate Authority as the root of trust for all other
datacenters. CA migration or root key changes in the primary will now rotate
automatically and without loss of connectivity throughout all datacenters and
workloads.
2018-11-14 21:39:59 +00:00
## Consul 1.3.0
2019-05-15 15:49:41 +00:00
This version added support for multiple tag filters in service discovery
queries, however it introduced a subtle bug where API calls to
`/catalog/service/:name?tag=<tag>` would ignore the tag filter _only during the
upgrade_. It only occurs when clients are still running 1.2.3 or earlier but
servers have been upgraded. The `/health/service/:name?tag=<tag>` endpoint and
DNS interface were _not_ affected.
2018-11-14 21:39:59 +00:00
2019-05-15 15:49:41 +00:00
For this reason, we recommend you upgrade directly to 1.3.1 which includes only
a fix for this issue.
2018-11-14 21:39:59 +00:00
2018-05-09 22:54:08 +00:00
## Consul 1.1.0
2018-05-10 22:33:30 +00:00
#### Removal of Deprecated Features
2018-05-09 22:54:08 +00:00
The following previously deprecated fields and config options have been removed:
2020-04-06 20:27:35 +00:00
- `CheckID` has been removed from config file check definitions (use `id` instead).
- `script` has been removed from config file check definitions (use `args` instead).
- `enableTagOverride` is no longer valid in service definitions (use `enable_tag_override` instead).
2023-01-25 16:52:43 +00:00
- The [deprecated set of metric names](/consul/docs/upgrading/upgrade-specific#metric-names-updated) (beginning with `consul.consul.`) has been removed
2020-04-06 20:27:35 +00:00
along with the `enable_deprecated_names` option from the metrics configuration.
2018-05-09 22:54:08 +00:00
2018-05-11 15:11:15 +00:00
#### New defaults for Raft Snapshot Creation
2019-05-15 15:49:41 +00:00
2018-05-11 15:11:15 +00:00
Consul 1.0.1 (and earlier versions of Consul) checked for raft snapshots every
5 seconds, and created new snapshots for every 8192 writes. These defaults cause
constant disk IO in large busy clusters. Consul 1.1.0 increases these to larger values,
2023-01-25 16:52:43 +00:00
and makes them tunable via the [raft_snapshot_interval](/consul/docs/agent/config/config-files#_raft_snapshot_interval) and
[raft_snapshot_threshold](/consul/docs/agent/config/config-files#_raft_snapshot_threshold) parameters. We recommend
2018-05-11 15:11:15 +00:00
keeping the new defaults. However, operators can go back to the old defaults by changing their
2023-01-25 16:52:43 +00:00
config if they prefer more frequent snapshots. See the documentation for [raft_snapshot_interval](/consul/docs/agent/config/config-files#_raft_snapshot_interval)
and [raft_snapshot_threshold](/consul/docs/agent/config/config-files#_raft_snapshot_threshold) to understand the trade-offs
2018-05-11 15:11:15 +00:00
when tuning these.
2018-10-11 10:38:55 +00:00
## Consul 1.0.7
When requesting a specific service (`/v1/health/:service` or
`/v1/catalog/:service` endpoints), the `X-Consul-Index` returned is now the
index at which that _specific service_ was last modified. In version 1.0.6 and
earlier the `X-Consul-Index` returned was the index at which _any_ service was
last modified. See [GH-3890](https://github.com/hashicorp/consul/issues/3890)
for more details.
During upgrades from 1.0.6 or lower to 1.0.7 or higher, watchers are likely to
see `X-Consul-Index` for these endpoints decrease between blocking calls.
2022-09-14 22:45:42 +00:00
Consul's watch feature and `consul-template` should gracefully handle this case.
2018-10-11 10:38:55 +00:00
Other tools relying on blocking service or health queries are also likely to
work; some may require a restart. It is possible external tools could break and
either stop working or continually re-request data without blocking if they
have assumed indexes can never decrease or be reset and/or persist index
values. Please test any blocking query integrations in a controlled environment
before proceeding.
2017-11-20 20:01:23 +00:00
## Consul 1.0.1
#### Carefully Check and Remove Stale Servers During Rolling Upgrades
2019-05-15 15:49:41 +00:00
Consul 1.0 (and earlier versions of Consul when running with [Raft protocol
2023-01-25 16:52:43 +00:00
3](/consul/docs/agent/config/config-files#_raft_protocol) had an issue where performing
2019-05-15 15:49:41 +00:00
rolling updates of Consul servers could result in an outage from old servers
remaining in the cluster.
2023-01-25 16:52:43 +00:00
[Autopilot](/consul/tutorials/datacenter-operations/autopilot-datacenter-operations)
2019-05-15 15:49:41 +00:00
would normally remove old servers when new ones come online, but it was also
waiting to promote servers to voters in pairs to maintain an odd quorum size.
The pairwise promotion feature was removed so that servers become voters as
soon as they are stable, allowing Autopilot to remove old servers in a safer
way.
When upgrading from Consul 1.0, you may need to manually
2023-01-25 16:52:43 +00:00
[force-leave](/consul/commands/force-leave) old servers as part of a rolling
2019-05-15 15:49:41 +00:00
update to Consul 1.0.1.
2017-11-20 20:01:23 +00:00
2017-10-13 23:46:36 +00:00
## Consul 1.0
2019-05-15 15:49:41 +00:00
Consul 1.0 has several important breaking changes that are documented here.
Please be sure to read over all the details here before upgrading.
2017-10-13 23:46:36 +00:00
#### Raft Protocol Now Defaults to 3
2023-01-25 16:52:43 +00:00
The [`-raft-protocol`](/consul/docs/agent/config/cli-flags#_raft_protocol) default has
2019-05-15 15:49:41 +00:00
been changed from 2 to 3, enabling all
2023-01-25 16:52:43 +00:00
[Autopilot](/consul/tutorials/datacenter-operations/autopilot-datacenter-operations)
2019-05-15 15:49:41 +00:00
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
2023-01-25 16:52:43 +00:00
Compatibility](/consul/docs/upgrading/upgrade-specific#raft-protocol-version-compatibility)
2019-05-15 15:49:41 +00:00
for more details. Also the format of `peers.json` used for outage recovery is
2020-08-13 21:02:44 +00:00
different when running with the latest Raft protocol. Review [Manual Recovery
2019-05-15 15:49:41 +00:00
Using
2023-01-25 16:52:43 +00:00
peers.json](/consul/tutorials/datacenter-operations/recovery-outage#manual-recovery-using-peers-json)
2019-05-15 15:49:41 +00:00
for a description of the required format.
Please note that the Raft protocol is different from Consul's internal protocol
2023-01-25 16:52:43 +00:00
as described on the [Protocol Compatibility Promise](/consul/docs/upgrading/compatibility)
2019-05-15 15:49:41 +00:00
page, and as is shown in commands like `consul members` and `consul version`.
2020-04-06 20:27:35 +00:00
To see the version of the Raft protocol in use on each server, use the `consul operator raft list-peers` command.
2019-05-15 15:49:41 +00:00
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
2023-01-25 16:52:43 +00:00
[`-node-id`](/consul/docs/agent/config/cli-flags#_node_id) instead of their IP address
2019-05-15 15:49:41 +00:00
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
2023-01-25 16:52:43 +00:00
peers.json](/consul/tutorials/datacenter-operations/recovery-outage#manual-recovery-using-peers-json)
2019-05-15 15:49:41 +00:00
to map the server to its node ID in the Raft quorum configuration.
2017-10-13 23:46:36 +00:00
#### Config Files Require an Extension
2019-05-15 15:49:41 +00:00
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
2023-01-25 16:52:43 +00:00
[`-config-file`](/consul/docs/agent/config/cli-flags#_config_file) argument to specify a
2019-05-15 15:49:41 +00:00
file directly.
2017-10-13 23:46:36 +00:00
2023-02-28 22:09:56 +00:00
#### Use Snake Case for Service Definition Parameters
2020-02-18 13:32:07 +00:00
2023-02-28 22:09:56 +00:00
Snake case, which is a convention that uses underscores between words in a configuration key, is required for all configuration file formats. Change any camel cased parameter to snake case equivalents before upgrading.
2020-02-18 13:32:07 +00:00
2017-10-13 23:46:36 +00:00
#### Deprecated Options Have Been Removed
2019-05-15 15:49:41 +00:00
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:
2017-10-13 23:46:36 +00:00
2020-04-09 23:46:54 +00:00
| Removed Option | Equivalent |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2023-01-25 16:52:43 +00:00
| `-dc` | [`-datacenter`](/consul/docs/agent/config/cli-flags#_datacenter) |
| `-retry-join-azure-tag-name` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-azure-tag-value` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-ec2-region` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-ec2-tag-key` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-ec2-tag-value` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-gce-credentials-file` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-gce-project-name` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-gce-tag-name` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
| `-retry-join-gce-zone-pattern` | [`-retry-join`](/consul/docs/agent/config/cli-flags#_retry_join) |
2020-04-09 23:46:54 +00:00
| `addresses.rpc` | None, the RPC server for CLI commands is no longer supported. |
2023-01-25 16:52:43 +00:00
| `advertise_addrs` | [`ports`](/consul/docs/agent/config/config-files#ports) with [`advertise_addr`](/consul/docs/agent/config/config-files#advertise_addr) and/or [`advertise_addr_wan`](/consul/docs/agent/config/config-files#advertise_addr_wan) |
| `dogstatsd_addr` | [`telemetry.dogstatsd_addr`](/consul/docs/agent/config/config-files#telemetry-dogstatsd_addr) |
| `dogstatsd_tags` | [`telemetry.dogstatsd_tags`](/consul/docs/agent/config/config-files#telemetry-dogstatsd_tags) |
| `http_api_response_headers` | [`http_config.response_headers`](/consul/docs/agent/config/config-files#response_headers) |
2020-04-09 23:46:54 +00:00
| `ports.rpc` | None, the RPC server for CLI commands is no longer supported. |
2022-01-10 21:13:13 +00:00
2023-01-25 16:52:43 +00:00
| `recursor` | [`recursors`](/consul/docs/agent/config/config-files#recursors) |
| `retry_join_azure` | [`retry-join`](/consul/docs/agent/config/config-files#retry_join) |
| `retry_join_ec2` | [`retry-join`](/consul/docs/agent/config/config-files#retry_join) |
| `retry_join_gce` | [`retry-join`](/consul/docs/agent/config/config-files#retry_join) |
| `statsd_addr` | [`telemetry.statsd_address`](/consul/docs/agent/config/config-files#telemetry-statsd_address) |
| `statsite_addr` | [`telemetry.statsite_address`](/consul/docs/agent/config/config-files#telemetry-statsite_address) |
| `statsite_prefix` | [`telemetry.metrics_prefix`](/consul/docs/agent/config/config-files#telemetry-metrics_prefix) |
| `telemetry.statsite_prefix` | [`telemetry.metrics_prefix`](/consul/docs/agent/config/config-files#telemetry-metrics_prefix) |
| (service definitions) `serviceid` | [`id`](/consul/api-docs/agent/service#id) |
| (service definitions) `dockercontainerid` | [`docker_container_id`](/consul/api-docs/agent/check#dockercontainerid) |
| (service definitions) `tlsskipverify` | [`tls_skip_verify`](/consul/api-docs/agent/check#tlsskipverify) |
| (service definitions) `deregistercriticalserviceafter` | [`deregister_critical_service_after`](/consul/api-docs/agent/check#deregistercriticalserviceafter) |
2017-10-13 23:46:36 +00:00
#### `statsite_prefix` Renamed to `metrics_prefix`
2019-05-15 15:49:41 +00:00
Since the `statsite_prefix` configuration option applied to all telemetry
providers, `statsite_prefix` was renamed to
2023-01-25 16:52:43 +00:00
[`metrics_prefix`](/consul/docs/agent/config/config-files#telemetry-metrics_prefix).
2019-05-15 15:49:41 +00:00
Configuration files will need to be updated when upgrading to this version of
Consul.
2017-10-13 23:46:36 +00:00
#### `advertise_addrs` Removed
2019-05-15 15:49:41 +00:00
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.
2017-10-13 23:46:36 +00:00
#### Escaping Behavior Changed for go-discover Configs
2023-01-25 16:52:43 +00:00
The format for [`-retry-join`](/consul/docs/agent/config/cli-flags#retry-join) and
[`-retry-join-wan`](/consul/docs/agent/config/cli-flags#retry-join-wan) values that use
2019-05-15 15:49:41 +00:00
[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 `\`.
2017-10-13 23:46:36 +00:00
#### HTTP Verbs are Enforced in Many HTTP APIs
2019-05-15 15:49:41 +00:00
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:
2017-10-13 23:46:36 +00:00
2020-04-06 20:27:35 +00:00
| 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 |
2017-10-13 23:46:36 +00:00
#### Unauthorized KV Requests Return 403
2019-05-15 15:49:41 +00:00
When ACLs are enabled, reading a key with an unauthorized token returns a 403.
This previously returned a 404 response.
2017-10-13 23:46:36 +00:00
#### Config Section of Agent Self Endpoint has Changed
2019-05-15 15:49:41 +00:00
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
2023-01-25 16:52:43 +00:00
Configuration](/consul/api-docs/agent#read-configuration) endpoint documentation for
2019-05-15 15:49:41 +00:00
details.
2017-10-13 23:46:36 +00:00
#### Deprecated `configtest` Command Removed
2019-05-15 15:49:41 +00:00
The `configtest` command was deprecated and has been superseded by the
`validate` command.
2017-10-13 23:46:36 +00:00
#### Undocumented Flags in `validate` Command Removed
2019-05-15 15:49:41 +00:00
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.
2017-10-13 23:46:36 +00:00
#### Metric Names Updated
2019-05-15 15:49:41 +00:00
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:
2017-10-13 23:46:36 +00:00
2020-04-06 20:27:35 +00:00
| 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 |
2017-10-13 23:46:36 +00:00
| consul.consul.prepared-query |
2020-04-06 20:27:35 +00:00
| consul.consul.rpc |
| consul.consul.session |
| consul.consul.session_ttl |
| consul.consul.txn |
2017-10-13 23:46:36 +00:00
#### Checks Validated On Agent Startup
2019-05-15 15:49:41 +00:00
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.
2017-10-13 23:46:36 +00:00
2017-07-17 21:11:08 +00:00
## Consul 0.9.0
2017-07-20 21:48:45 +00:00
#### Script Checks Are Now Opt-In
2017-07-17 21:11:08 +00:00
2023-01-25 16:52:43 +00:00
A new [`enable_script_checks`](/consul/docs/agent/config/cli-flags#_enable_script_checks)
2019-05-15 15:49:41 +00:00
configuration option was added, and defaults to `false`, meaning that in order
to allow an agent to run health checks that execute scripts, this will need to
be configured and set to `true`. This provides a safer out-of-the-box
configuration for Consul where operators must opt-in to allow script-based
health checks.
2017-07-17 21:11:08 +00:00
2019-05-15 15:49:41 +00:00
If your cluster uses script health checks please be sure to set this to `true`
as part of upgrading agents. If this is set to `true`, you should also enable
2023-01-25 16:52:43 +00:00
[ACLs](/consul/tutorials/security/access-control-setup-production)
2019-05-15 15:49:41 +00:00
to provide control over which users are allowed to register health checks that
could potentially execute scripts on the agent machines.
2017-07-18 14:11:59 +00:00
2020-11-10 22:01:34 +00:00
!> **Security Warning:** Using `enable_script_checks` without ACLs and without
`allow_write_http_from` is _DANGEROUS_. Use the `enable_local_script_checks` setting
introduced in v0.9.4 instead. See [this article](https://www.hashicorp.com/blog/protecting-consul-from-rce-risk-in-specific-configurations/)
for more information.
2017-07-18 14:11:59 +00:00
#### Web UI Is No Longer Released Separately
2019-05-15 15:49:41 +00:00
Consul releases will no longer include a `web_ui.zip` file with the compiled
web assets. These have been built in to the Consul binary since the 0.7.x
2023-01-25 16:52:43 +00:00
series and can be enabled with the [`-ui`](/consul/docs/agent/config/cli-flags#_ui)
2019-05-15 15:49:41 +00:00
configuration option. These built-in web assets have always been identical to
the contents of the `web_ui.zip` file for each release. The
2023-01-25 16:52:43 +00:00
[`-ui-dir`](/consul/docs/agent/config/cli-flags#_ui_dir) option is still available for
2019-05-15 15:49:41 +00:00
hosting customized versions of the web assets, but the vast majority of Consul
users can just use the built in web assets.
2017-07-17 21:11:08 +00:00
2017-02-25 02:10:46 +00:00
## Consul 0.8.0
2017-04-11 17:50:56 +00:00
#### Upgrade Current Cluster Leader Last
2019-05-15 15:49:41 +00:00
We identified a potential issue with Consul 0.8 that requires the current
cluster leader to be upgraded last when updating multiple servers. Please see
2017-04-11 17:50:56 +00:00
[this issue](https://github.com/hashicorp/consul/issues/2889) for more details.
2017-02-25 02:10:46 +00:00
#### Command-Line Interface RPC Deprecation
2019-05-15 15:49:41 +00:00
The RPC client interface has been removed. All CLI commands that used RPC and
the `-rpc-addr` flag to communicate with Consul have been converted to use the
HTTP API and the appropriate flags for it, and the `rpc` field has been removed
from the port and address binding configs. You will need to remove these fields
from your config files and update any scripts that passed a custom `-rpc-addr`
to the following commands:
2017-02-25 02:10:46 +00:00
2020-04-06 20:27:35 +00:00
- `force-leave`
- `info`
- `join`
- `keyring`
- `leave`
- `members`
- `monitor`
- `reload`
2017-02-25 02:10:46 +00:00
2017-03-25 00:45:24 +00:00
#### Version 8 ACLs Are Now Opt-Out
2023-01-25 16:52:43 +00:00
The [`acl_enforce_version_8`](/consul/docs/agent/config/config-files#acl_enforce_version_8)
2019-05-15 15:49:41 +00:00
configuration now defaults to `true` to enable full version 8 ACL support by
default. If you are upgrading an existing cluster with ACLs enabled, you will
need to set this to `false` during the upgrade on **both Consul agents and
Consul servers**. Version 8 ACLs were also changed so that
2023-01-25 16:52:43 +00:00
[`acl_datacenter`](/consul/docs/agent/config/config-files#acl_datacenter) must be set on
2019-05-15 15:49:41 +00:00
agents in order to enable the agent-side enforcement of ACLs. This makes for a
smoother experience in clusters where ACLs aren't enabled at all, but where the
agents would have to wait to contact a Consul server before learning that.
2017-03-25 00:45:24 +00:00
2017-03-30 16:25:12 +00:00
#### Remote Exec Is Now Opt-In
2019-05-15 15:49:41 +00:00
The default for
2023-01-25 16:52:43 +00:00
[`disable_remote_exec`](/consul/docs/agent/config/config-files#disable_remote_exec) was
2019-05-15 15:49:41 +00:00
changed to "true", so now operators need to opt-in to having agents support
2023-01-25 16:52:43 +00:00
running commands remotely via [`consul exec`](/consul/commands/exec).
2017-03-30 16:25:12 +00:00
#### Raft Protocol Version Compatibility
2017-03-10 22:55:18 +00:00
2019-05-15 15:49:41 +00:00
When upgrading to Consul 0.8.0 from a version lower than 0.7.0, users will need
2023-01-25 16:52:43 +00:00
to set the [`-raft-protocol`](/consul/docs/agent/config/cli-flags#_raft_protocol) option
2019-05-15 15:49:41 +00:00
to 1 in order to maintain backwards compatibility with the old servers during
2020-04-06 20:27:35 +00:00
the upgrade. After the servers have been migrated to version 0.8.0,
2019-05-15 15:49:41 +00:00
`-raft-protocol` can be moved up to 2 and the servers restarted to match the
default.
2017-03-10 22:55:18 +00:00
2019-05-15 15:49:41 +00:00
The Raft protocol must be stepped up in this way; only adjacent version numbers
are compatible (for example, version 1 cannot talk to version 3). Here is a
table of the Raft Protocol versions supported by each Consul version:
2017-03-10 22:55:18 +00:00
2020-04-07 23:56:08 +00:00
| Version | Supported Raft Protocols |
| --------------- | ------------------------ |
| 0.6 and earlier | 0 |
| 0.7 | 1 |
| 0.8 | 1, 2, 3 |
2017-03-10 22:55:18 +00:00
2019-05-15 15:49:41 +00:00
In order to enable all
2023-01-25 16:52:43 +00:00
[Autopilot](/consul/tutorials/datacenter-operations/autopilot-datacenter-operations)
2020-08-13 21:02:44 +00:00
features, all servers in a Consul datacenter must be running with Raft protocol
2019-05-15 15:49:41 +00:00
version 3 or later.
2017-03-10 23:19:50 +00:00
2016-11-08 20:12:57 +00:00
## Consul 0.7.1
#### Child Process Reaping
2019-05-15 15:49:41 +00:00
Child process reaping support has been removed, along with the `reap`
configuration option. Reaping is also done via
[dumb-init](https://github.com/Yelp/dumb-init) in the [Consul Docker
image](https://github.com/hashicorp/docker-consul), so removing it from Consul
itself simplifies the code and eases future maintenance for Consul. If you are
running Consul as PID 1 in a container you will need to arrange for a wrapper
process to reap child processes.
2016-11-08 20:12:57 +00:00
#### DNS Resiliency Defaults
2023-01-25 16:52:43 +00:00
The default for [`max_stale`](/consul/docs/agent/config/config-files#max_stale) has been
2019-05-15 15:49:41 +00:00
increased from 5 seconds to a near-indefinite threshold (10 years) to allow DNS
queries to continue to be served in the event of a long outage with no leader.
A new telemetry counter was added at `consul.dns.stale_queries` to track when
agents serve DNS queries that are stale by more than 5 seconds.
2016-11-08 20:12:57 +00:00
2016-07-01 19:26:14 +00:00
## Consul 0.7
2016-08-16 22:10:52 +00:00
Consul version 0.7 is a very large release with many important changes. Changes
to be aware of during an upgrade are categorized below.
2016-09-01 07:22:09 +00:00
#### Performance Timing Defaults and Tuning
2016-08-25 00:33:53 +00:00
2019-05-15 15:49:41 +00:00
Consul 0.7 now defaults the DNS configuration to allow for stale queries by
2023-01-25 16:52:43 +00:00
defaulting [`allow_stale`](/consul/docs/agent/config/config-files#allow_stale) to true for
2019-05-15 15:49:41 +00:00
better utilization of available servers. If you want to retain the previous
behavior, set the following configuration:
2016-08-30 20:40:43 +00:00
2021-07-31 01:37:33 +00:00
```json
2016-08-30 20:40:43 +00:00
{
"dns_config": {
"allow_stale": false
}
}
```
Consul also 0.7 introduced support for tuning Raft performance using a new
2023-01-25 16:52:43 +00:00
[performance configuration block](/consul/docs/agent/config/config-files#performance). Also,
2016-08-25 00:33:53 +00:00
the default Raft timing is set to a lower-performance mode suitable for
2023-01-25 16:52:43 +00:00
[minimal Consul servers](/consul/docs/install/performance#minimum).
2016-08-25 00:33:53 +00:00
To continue to use the high-performance settings that were the default prior to
2019-05-15 15:49:41 +00:00
Consul 0.7 (recommended for production servers), add the following
configuration to all Consul servers when upgrading:
2016-08-25 00:33:53 +00:00
2021-07-31 01:37:33 +00:00
```json
2016-08-25 00:33:53 +00:00
{
"performance": {
"raft_multiplier": 1
}
}
```
2023-01-25 16:52:43 +00:00
See the [Server Performance](/consul/docs/install/performance) guide for more details.
2016-08-25 00:33:53 +00:00
2016-09-01 07:22:09 +00:00
#### Leave-Related Configuration Defaults
2016-08-16 22:10:52 +00:00
2023-01-25 16:52:43 +00:00
The default behavior of [`leave_on_terminate`](/consul/docs/agent/config/config-files#leave_on_terminate)
and [`skip_leave_on_interrupt`](/consul/docs/agent/config/config-files#skip_leave_on_interrupt)
2016-09-01 07:22:09 +00:00
are now dependent on whether or not the agent is acting as a server or client:
2020-04-06 20:27:35 +00:00
- For servers, `leave_on_terminate` defaults to "false" and `skip_leave_on_interrupt`
defaults to "true".
2016-09-01 07:22:09 +00:00
2020-04-06 20:27:35 +00:00
- For clients, `leave_on_terminate` defaults to "true" and `skip_leave_on_interrupt`
defaults to "false".
2016-09-01 07:22:09 +00:00
These defaults are designed to be safer for servers so that you must explicitly
configure them to leave the cluster. This also results in a better experience for
clients, especially in cloud environments where they may be created and destroyed
often and users prefer not to wait for the 72 hour reap time for cleanup.
2016-08-16 22:10:52 +00:00
2016-08-10 01:10:04 +00:00
#### Dropped Support for Protocol Version 1
Consul version 0.7 dropped support for protocol version 1, which means it
is no longer compatible with versions of Consul prior to 0.3. You will need
to upgrade all agents to a newer version of Consul before upgrading to Consul
0.7.
#### Prepared Query Changes
2016-07-01 19:26:14 +00:00
Consul version 0.7 adds a feature which allows prepared queries to store a
2023-01-25 16:52:43 +00:00
[`Near` parameter](/consul/api-docs/query#near) in the query definition
2016-07-01 19:26:14 +00:00
itself. This feature enables using the distance sorting features of prepared
queries without explicitly providing the node to sort near in requests, but
requires the agent servicing a request to send additional information about
itself to the Consul servers when executing the prepared query. Agents prior
2016-08-16 22:10:52 +00:00
to 0.7 do not send this information, which means they are unable to properly
2016-07-01 19:26:14 +00:00
execute prepared queries configured with a `Near` parameter. Similarly, any
2016-08-16 22:10:52 +00:00
server nodes prior to version 0.7 are unable to store the `Near` parameter,
2016-07-01 19:26:14 +00:00
making them unable to properly serve requests for prepared queries using the
2016-08-16 22:10:52 +00:00
feature. It is recommended that all agents be running version 0.7 prior to
2016-07-01 19:26:14 +00:00
using this feature.
2016-08-15 22:47:15 +00:00
#### WAN Address Translation in HTTP Endpoints
Consul version 0.7 added support for translating WAN addresses in certain
2023-01-25 16:52:43 +00:00
[HTTP endpoints](/consul/docs/agent/config/config-files#translate_wan_addrs). The servers
2016-08-16 22:10:52 +00:00
and the agents need to be running version 0.7 or later in order to use this
2016-08-15 22:47:15 +00:00
feature.
2016-09-01 07:22:09 +00:00
These translated addresses could break HTTP endpoint consumers that are
2023-01-25 16:52:43 +00:00
expecting local addresses, so a new [`X-Consul-Translate-Addresses`](/consul/api-docs/api-structure#translated-addresses)
2016-08-16 22:10:52 +00:00
header was added to allow clients to detect if translation is enabled for HTTP
2016-09-01 07:22:09 +00:00
responses. A "lan" tag was added to `TaggedAddresses` for clients that need
2016-08-16 22:10:52 +00:00
the local address regardless of translation.
2016-09-01 07:22:09 +00:00
#### Outage Recovery and `peers.json` Changes
2016-08-16 22:10:52 +00:00
The `peers.json` file is no longer present by default and is only used when
performing recovery. This file will be deleted after Consul starts and ingests
2016-09-01 07:22:09 +00:00
the file. Consul 0.7 also uses a new, automatically-created raft/peers.info file
to avoid ingesting the `peers.json` file on the first start after upgrading (the
`peers.json` file is simply deleted on the first start after upgrading).
2016-08-16 22:10:52 +00:00
2023-05-15 07:59:30 +00:00
Please be sure to review the [Disaster recovery for Consul clusters tutorial](/consul/tutorials/datacenter-operations/recovery-outage)
2016-08-16 22:10:52 +00:00
before upgrading for more details.
2016-02-24 09:33:10 +00:00
## Consul 0.6.4
Consul 0.6.4 made some substantial changes to how ACLs work with prepared
queries. Existing queries will execute with no changes, but there are important
differences to understand about how prepared queries are managed before you
upgrade. In particular, prepared queries with no `Name` defined will no longer
require any ACL to manage them, and prepared queries with a `Name` defined are
2016-03-05 00:32:53 +00:00
now governed by a new `query` ACL policy that will need to be configured
2016-02-24 09:33:10 +00:00
after the upgrade.
2023-01-25 16:52:43 +00:00
See the [ACL rules documentation](/consul/docs/security/acl/acl-rules#prepared-query-rules) for more details
2017-04-05 01:51:47 +00:00
about the new behavior and how it compares to previous versions of Consul.
2016-02-24 09:33:10 +00:00
2015-06-12 00:48:08 +00:00
## Consul 0.6
2015-10-15 21:42:46 +00:00
Consul version 0.6 is a very large release with many enhancements and
optimizations. Changes to be aware of during an upgrade are categorized below.
2016-08-04 13:39:50 +00:00
#### Data Store Changes
2015-10-15 21:42:46 +00:00
Consul changed the format used to store data on the server nodes in version 0.5
(see 0.5.1 notes below for details). Previously, Consul would automatically
detect data directories using the old LMDB format, and convert them to the newer
BoltDB format. This automatic upgrade has been removed for Consul 0.6, and
instead a safeguard has been put in place which will prevent Consul from booting
if the old directory format is detected.
It is still possible to migrate from a 0.5.x version of Consul to 0.6+ using the
[consul-migrate](https://github.com/hashicorp/consul-migrate) CLI utility. This
is the same tool that was previously embedded into Consul. See the
[releases](https://github.com/hashicorp/consul-migrate/releases) page for
downloadable versions of the tool.
2016-01-09 02:49:31 +00:00
Also, in this release Consul switched from LMDB to a fully in-memory database for
the state store. Because LMDB is a disk-based backing store, it was able to store
more data than could fit in RAM in some cases (though this is not a recommended
configuration for Consul). If you have an extremely large data set that won't fit
2016-01-09 03:15:42 +00:00
into RAM, you may encounter issues upgrading to Consul 0.6.0 and later. Consul
should be provisioned with physical memory approximately 2X the data set size to
allow for bursty allocations and subsequent garbage collection.
2016-01-09 02:49:31 +00:00
2015-10-15 21:42:46 +00:00
#### ACL Enhancements
2015-06-12 00:48:08 +00:00
Consul 0.6 introduces enhancements to the ACL system which may require special
handling:
2020-04-06 20:27:35 +00:00
- Service ACLs are enforced during service discovery (REST + DNS)
2015-06-12 00:48:08 +00:00
Previously, service discovery was wide open, and any client could query
information about any service without providing a token. Consul now requires
2015-12-02 18:32:00 +00:00
read-level access at a minimum when ACLs are enabled to return service
2015-06-12 00:48:08 +00:00
information over the REST or DNS interfaces. If clients depend on an open
service discovery system, then the following should be added to all ACL tokens
which require it:
# Enable discovery of all services
service "" {
policy = "read"
}
2016-11-25 16:00:02 +00:00
When the DNS interface is queried, the agent's
2023-01-25 16:52:43 +00:00
[`acl_token`](/consul/docs/agent/config/config-files#acl_token) is used, so be sure
2016-11-25 16:00:02 +00:00
that token has sufficient privileges to return the DNS records you
expect to retrieve from it.
2015-06-12 00:48:08 +00:00
2020-04-06 20:27:35 +00:00
- Event and keyring ACLs
2015-12-02 18:32:00 +00:00
Similar to service discovery, the new event and keyring ACLs will block access
to these operations if the `acl_default_policy` is set to `deny`. If clients depend
on open access to these, then the following should be added to all ACL tokens which
require them:
event "" {
policy = "write"
}
keyring = "write"
Unfortunately, these are new ACLs for Consul 0.6, so they must be added after the
upgrade is complete.
#### Prepared Queries
Prepared queries introduce a new Raft log entry type that isn't supported on older
versions of Consul. It's important to not use the prepared query features of Consul
until all servers in a cluster have been upgraded to version 0.6.0.
2015-12-08 01:58:43 +00:00
#### Single Private IP Enforcement
Consul will refuse to start if there are multiple private IPs available, so
if this is the case you will need to configure Consul's advertise or bind addresses
before upgrading.
2015-12-15 23:17:11 +00:00
#### New Web UI File Layout
The release .zip file for Consul's web UI no longer contains a `dist` sub-folder;
everything has been moved up one level. If you have any automated scripts that
expect the old layout you may need to update them.
2015-04-11 00:52:49 +00:00
## Consul 0.5.1
Consul version 0.5.1 uses a different backend store for persisting the Raft
log. Because of this change, a data migration is necessary to move the log
entries out of LMDB and into the newer backend, BoltDB.
2015-06-02 18:02:35 +00:00
Consul version 0.5.1+ makes this transition seamless and easy. As a user, there
are no special steps you need to take. When Consul starts, it checks
2015-04-11 00:52:49 +00:00
for presence of the legacy LMDB data files, and migrates them automatically
2015-04-11 01:24:09 +00:00
if any are found. You will see a log emitted when Raft data is migrated, like
this:
```
==> Successfully migrated raft data in 5.839642ms
```
2015-04-11 00:52:49 +00:00
2015-06-02 18:02:35 +00:00
This automatic upgrade will only exist in Consul 0.5.1+ and it will
2017-07-20 21:48:45 +00:00
be removed starting with Consul 0.6.0+. It will still be possible to upgrade directly
2015-06-02 18:02:35 +00:00
from pre-0.5.1 versions by using the consul-migrate utility, which is available on the
2023-01-25 16:52:43 +00:00
[Consul Tools page](/consul/docs/integrate/download-tools).
2015-04-11 00:52:49 +00:00
2015-02-19 19:03:02 +00:00
## Consul 0.5
Consul version 0.5 adds two features that complicate the upgrade process:
2020-04-06 20:27:35 +00:00
- ACL system includes service discovery and registration
- Internal use of tombstones to fix behavior of blocking queries
2015-02-19 19:03:02 +00:00
in certain edge cases.
Users of the ACL system need to be aware that deploying Consul 0.5 will
cause service registration to be enforced. This means if an agent
attempts to register a service without proper privileges it will be denied.
If the `acl_default_policy` is "allow" then clients will continue to
work without an updated policy. If the policy is "deny", then all clients
will begin to have their registration rejected causing issues.
To avoid this situation, all the ACL policies should be updated to
add something like this:
# Enable all services to be registered
service "" {
policy = "write"
}
This will set the service policy to `write` level for all services.
The blank service name is the catch-all value. A more specific service
can also be specified:
# Enable only the API service to be registered
service "api" {
policy = "write"
}
The ACL policy can be updated while running 0.4, and enforcement will
being with the upgrade to 0.5. The policy updates will ensure the
availability of the cluster.
The second major change is the new internal command used for tombstones.
The details of the change are not important, however to function the leader
node will replicate a new command to its followers. Consul is designed
defensively, and when a command that is not recognized is received, the
server will panic. This is a purposeful design decision to avoid the possibility
2017-09-27 18:20:01 +00:00
of data loss, inconsistencies, or security issues caused by future incompatibility.
2015-02-19 19:03:02 +00:00
In practice, this means if a Consul 0.5 node is the leader, all of its
followers must also be running 0.5. There are a number of ways to do this
to ensure cluster availability:
2020-04-06 20:27:35 +00:00
- Add new 0.5 nodes, then remove the old servers. This will add the new
2015-02-19 19:03:02 +00:00
nodes as followers, and once the old servers are removed, one of the
0.5 nodes will become leader.
2020-04-06 20:27:35 +00:00
- Upgrade the followers first, then the leader last. Using `consul info`,
2015-02-19 19:03:02 +00:00
you can determine which nodes are followers. Do an in-place upgrade
on them first, and finally upgrade the leader last.
2020-04-06 20:27:35 +00:00
- Upgrade them in any order, but ensure all are done within 15 minutes.
2015-02-19 19:03:02 +00:00
Even if the leader is upgraded to 0.5 first, as long as all of the followers
are running 0.5 within 15 minutes there will be no issues.
Finally, even if any of the methods above are not possible or the process
fails for some reason, it is not fatal. The older version of the server
will simply panic and stop. At that point, you can upgrade to the new version
and restart the agent. There will be no data loss and the cluster will
resume operations.