From 7d7a7f6d0c1cd746153e72674c396e3109aca548 Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Thu, 29 Apr 2021 10:00:34 -0700 Subject: [PATCH] Remove -disable-host-node-id=false flag Don't set `-disable-host-node-id=false` on Consul Clients because it causes Clients to not be able to join the cluster on certain hypervisor or Kind setups. This flag was added in 0.30.0 to stop Consul logging an error when a Client pod was force deleted but this error does not affect the pod restarting so removing the flag will have no real effect. --- CHANGELOG.md | 5 +++++ templates/client-daemonset.yaml | 1 - test/unit/client-daemonset.bats | 24 ------------------------ values.yaml | 7 ------- 4 files changed, 5 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 369e91c65..55f29bb88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ FEATURES: BUG FIXES: * CRDs: Fix a bug where the `config` field in `ProxyDefaults` CR was not synced to Consul because `apiextensions.k8s.io/v1` requires CRD spec to have structured schema. [[GH-921](https://github.com/hashicorp/consul-helm/pull/921)] +* Don't set `-disable-host-node-id=false` on Consul Clients because it causes Clients to + not be able to join the cluster on certain hypervisor or Kind setups. This flag was + added in 0.30.0 to stop Consul logging an error when a Client pod was force deleted + but this error does not affect the pod restarting so removing the flag will have + no real effect. [[GH-934](https://github.com/hashicorp/consul-helm/pull/934)] BREAKING CHANGES: * Remove templates for a demo installation of Grafana in light of recent license changes to Grafana. [[GH-930](https://github.com/hashicorp/consul-helm/pull/930)] diff --git a/templates/client-daemonset.yaml b/templates/client-daemonset.yaml index 55bc053aa..99ea4fa3e 100644 --- a/templates/client-daemonset.yaml +++ b/templates/client-daemonset.yaml @@ -191,7 +191,6 @@ spec: -node-meta=pod-name:${HOSTNAME} \ -node-meta=host-ip:${HOST_IP} \ -hcl='leave_on_terminate = true' \ - -disable-host-node-id={{ .Values.client.disableHostNodeID }} \ {{- if .Values.global.tls.enabled }} -hcl='ca_file = "/consul/tls/ca/tls.crt"' \ {{- if .Values.global.tls.enableAutoEncrypt }} diff --git a/test/unit/client-daemonset.bats b/test/unit/client-daemonset.bats index 3e21192d7..24b60c606 100755 --- a/test/unit/client-daemonset.bats +++ b/test/unit/client-daemonset.bats @@ -1206,27 +1206,3 @@ rollingUpdate: local actual=$(echo $security_context | jq -r .privileged) [ "${actual}" = "true" ] } - -#-------------------------------------------------------------------- -# client.disableHostNodeID - -@test "client/DaemonSet: disableHostNodeID defaults to false" { - cd `chart_dir` - local actual=$(helm template \ - -s templates/client-daemonset.yaml \ - . | tee /dev/stderr | \ - yq '.spec.template.spec.containers[0].command | any(contains("disable-host-node-id=false"))' \ - | tee /dev/stderr) - [ "${actual}" = "true" ] -} - -@test "client/DaemonSet: disableHostNodeID can be set to true" { - cd `chart_dir` - local actual=$(helm template \ - -s templates/client-daemonset.yaml \ - --set 'client.disableHostNodeID=true' \ - . | tee /dev/stderr | \ - yq '.spec.template.spec.containers[0].command | any(contains("disable-host-node-id=true"))' \ - | tee /dev/stderr) - [ "${actual}" = "true" ] -} diff --git a/values.yaml b/values.yaml index d998ffe7a..250091336 100644 --- a/values.yaml +++ b/values.yaml @@ -699,13 +699,6 @@ client: # This also changes the clients' advertised IP to the `hostIP` rather than `podIP`. exposeGossipPorts: false - # Disable host node ID - # If true, consul clients will not use information from the host to generate a deterministic node ID - # and will instead generate a random node ID which will be persisted in the data directory. - # When two VMs are on the same underlying hardware, they can have node IDs that collide. Setting `disableHostNodeID` to true can work around the collision. - # Refer to https://www.consul.io/docs/agent/options#_disable_host_node_id for more info. - disableHostNodeID: false - # Resource settings for Client agents. # NOTE: The use of a YAML string is deprecated. Instead, set directly as a # YAML map.