apache / couchdb-helm

Apache CouchDB Helm Chart
https://couchdb.apache.org/
Apache License 2.0
49 stars 64 forks source link

Erlang cookie not the same on all nodes #97

Closed fritzfranzke closed 2 years ago

fritzfranzke commented 2 years ago

Installation of v3.6.1 of the couchdb helm chart in a k8s cluster managed by Rancher fails. Pods enter a CrashLoopBackOff state with the log message

Monster detected ohno!, aborting startup.
Please change the Erlang cookie in vm.args to the same 
securely generated random value on all nodes of this cluster. 

I created a secret my-release-couchdb in the same namespace:

I tried with and without the erlangCookie key, also I tried setting the erlangFlags.setcookie=monster in the values.yaml, both to no avail. The values.yaml is shown below. They are mostly the defaults.

adminUsername: admin
affinity: {}
allowAdminParty: false
annotations: {}
clusterSize: 3
couchdbConfig:
  chttpd:
    bind_address: any
    require_valid_user: false
  couchdb:
    uuid: bbeb004f-11ad-44bd-8300-900fcb9600a2
createAdminSecret: false
dns:
  clusterDomainSuffix: cluster.local
enableSearch: false
erlangFlags:
  name: couchdb
image:
  pullPolicy: IfNotPresent
  repository: couchdb
  tag: 3.2.2
ingress:
  annotations: []
  enabled: false
  hosts:
    - chart-example.local
  path: /
  tls: null
initImage:
  pullPolicy: Always
  repository: busybox
  tag: latest
livenessProbe:
  enabled: true
  failureThreshold: 3
  initialDelaySeconds: 0
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 1
networkPolicy:
  enabled: true
persistentVolume:
  accessModes:
    - ReadWriteOnce
  enabled: true
  size: 10Gi
placementConfig:
  enabled: false
  image:
    repository: caligrafix/couchdb-autoscaler-placement-manager
    tag: 0.1.0
podManagementPolicy: Parallel
prometheusPort:
  bind_address: 0.0.0.0
  enabled: false
  port: 17986
readinessProbe:
  enabled: true
  failureThreshold: 3
  initialDelaySeconds: 0
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 1
resources: {}
searchImage:
  pullPolicy: IfNotPresent
  repository: kocolosk/couchdb-search
  tag: 0.2.0
service:
  enabled: true
  externalPort: 5984
  type: ClusterIP
serviceAccount:
  create: true
  enabled: true
sidecars: {}
tolerations: []
topologySpreadConstraints: {}
big-r81 commented 2 years ago

The value of the erlang cookie CANNOT be monster!

fritzfranzke commented 2 years ago

Hi, thanks for the quick reply! Indeed setting the erlangCookie value in the secret to some arbitrary value worked. Is this some common knowledge I was missing? Tbh I don't even know what the erlangCookie does... Anyhow, thanks again!

big-r81 commented 2 years ago

Hi,

this cookie is used for inter-node communication between the nodes in a cluster.

Maybe we can improve the error message not to use monster as an erlang cookie value. It's a bit hidden here.