You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When official Consul docker image is started on Kubernetes without mounted volume, it fails with either su-exec: setgroups(1000): Operation not permitted or failed to write NodeID to disk error.
Reproduction Steps
Steps for Openshift, steps for K8s should be similar:
Deploy the container: oc apply -f consul.yml -n ts-consul
Start the container: oc scale deployemnt/consul --replicas=1 -n ts-consul
Wait for several seconds and check status:
$ oc get pods
NAME READY STATUS RESTARTS AGE
consul-6b486f7bfc-kjcd4 0/1 CrashLoopBackOff 3 (15s ago) 56s
Check pod logs: oc logs pod/consul-6b486f7bfc-kjcd4 (replace with the id of your pod): `su-exec: setgroups(1000): Operation not permitted
Alternative solution
We can follow the solution, implemented in hashicorp/docker-consul#103 and add CONSUL_DISABLE_PERM_MGMT property. Unfortunately, this will just lead to a different error:
failed to setup node ID: failed to write NodeID to disk: open /consul/data/node-id: permission denied
Consul info for both Client and Server
We use official docker container docker.io/hashicorp/consul:1.19
Usage of bitnami/consul image can be considered a workaround, but it comes with its own challenges[1] so it is preferable to have this issue solved for the official image.
Overview of the Issue
When official Consul docker image is started on Kubernetes without mounted volume, it fails with either su-exec: setgroups(1000): Operation not permitted or failed to write NodeID to disk error.
Reproduction Steps
Steps for Openshift, steps for K8s should be similar:
oc new-project ts-consul
oc apply -f consul.yml -n ts-consul
oc scale deployemnt/consul --replicas=1 -n ts-consul
oc logs pod/consul-6b486f7bfc-kjcd4
(replace with the id of your pod): `su-exec: setgroups(1000): Operation not permittedAlternative solution
We can follow the solution, implemented in hashicorp/docker-consul#103 and add
CONSUL_DISABLE_PERM_MGMT
property. Unfortunately, this will just lead to a different error:Consul info for both Client and Server
We use official docker container
docker.io/hashicorp/consul:1.19
Operating system and Environment details
OC:
6.10.8-200.fc40.x86_64
Openshift version:
Similar error was previously described several times:
CONSUL_DISABLE_PERM_MGMT
environment property, not helpful in this case, see "Alternative solution" section)Usage of bitnami/consul image can be considered a workaround, but it comes with its own challenges[1] so it is preferable to have this issue solved for the official image.
Was earlier reported in this repo (#12882) and in the docker-consul one (hashicorp/docker-consul#184)
[1] bitnami-labs/sealed-secrets#822
The text was updated successfully, but these errors were encountered: