ihatemodels opened a new issue, #121:
URL: https://github.com/apache/couchdb-helm/issues/121
### **Describe the bug**
Upon executing helm install couchdb -n couchdb couchdb/couchdb -f
values.yaml, the main container enters a continuous restart loop, lacking
explanatory logs. This issue surfaces when persistence is enabled; without it,
the container starts successfully. The PVC and PV are properly created, mounted
and writable ( i tested from another container ).
Experimenting with a custom Deployment resulted in same behaviour.
Consequently, the issue could originate from my storage configuration or
permissions and how the docker container or the software expects them. It's
noteworthy that other applications (Prometheus, RabbitMQ) operate without
issues on the same storage. cluster, helm.
Any information or further steps will be appreciated. Thank you!
**Version of Helm and Kubernetes**:
### Kubernetes
Provider: Amazon EKS, Kubernetes Version: v1.24.13 -0a21954
### Helm:
version.BuildInfo{Version:"v3.9.4",
GitCommit:"dbc6d8e20fe1d58d50e6ed30f09a04a77e4c68db", GitTreeState:"clean",
GoVersion:"go1.17.13"}
### StorageClass:
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: efs-storage-class-wa
allowVolumeExpansion: true
parameters:
basePath: /dynamic_provisioning
directoryPerms: '700'
fileSystemId: <fs>
gidRangeEnd: '2000'
gidRangeStart: '1000'
provisioningMode: efs-ap
provisioner: efs.csi.aws.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
```
### **What happened**:
The StatefulSet is unable to start with Persistence Storage
### **How to reproduce it** (as minimally and precisely as possible):
Create EFS Storage on EKS and deploy following the guide in the README.
### **Anything else we need to know**:
### values.yaml
```yaml
# -- the initial number of nodes in the CouchDB cluster.
clusterSize: 1
persistentVolume:
enabled: true
storageClass: "efs-storage-class-wa"
accessModes:
- ReadWriteOnce
size: 10Gi
networkPolicy:
enabled: false
image:
tag: 3.3.2
dns:
clusterDomainSuffix: cluster.local
service:
enabled: true
prometheusPort:
enabled: true
bind_address: "0.0.0.0"
port: 8080
couchdbConfig:
chttpd:
bind_address: any
require_valid_user: false
couchdb:
uuid: 4714aa87edb4be946671309fbec8941a
```
### kubectl describe pod couchdb-couchdb-0 -n couchdb-qa
```bash
Name: couchdb-qa-couchdb-0
Namespace: couchdb-qa
Priority: 0
Node: ip-10-152-181-13.eu-west-1.compute.internal/10.152.181.13
Start Time: Wed, 07 Jun 2023 12:34:11 +0300
Labels: app=couchdb
controller-revision-hash=couchdb-qa-couchdb-b6c8db589
release=couchdb-qa
statefulset.kubernetes.io/pod-name=couchdb-qa-couchdb-0
Status: Running
Controlled By: StatefulSet/couchdb-qa-couchdb
Init Containers:
init-copy:
Container ID:
containerd://de3c35142624b77f0c8abcca439f5b436ac0a23666e88cf0a5274f00e6558ca8
Image: busybox:latest
Image ID:
docker.io/library/busybox@sha256:560af6915bfc8d7630e50e212e08242d37b63bd5c1ccf9bd4acccf116e262d5b
Port: <none>
Host Port: <none>
Command:
sh
-c
cp /tmp/chart.ini /default.d; cp /tmp/seedlist.ini /default.d; cp
/tmp/prometheus.ini /default.d; ls -lrt /default.d;
State: Terminated
Reason: Completed
Exit Code: 0
Started: Wed, 07 Jun 2023 12:34:13 +0300
Finished: Wed, 07 Jun 2023 12:34:13 +0300
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/default.d from config-storage (rw)
/tmp/ from config (rw)
/var/run/secrets/kubernetes.io/serviceaccount from
kube-api-access-w5kzb (ro)
Containers:
couchdb:
Container ID:
containerd://ff97bde75fd9ce3ea58d962bb8aa8e35902af2584bea4ac16ba0317d60b35a1f
Image: couchdb:3.3.2
Image ID:
docker.io/library/couchdb@sha256:efd8eefd6e849ac88a5418bd4e633002e9f665fd6b16c3eb431656984203cfec
Ports: 5984/TCP, 4369/TCP, 9100/TCP, 8080/TCP
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Wed, 07 Jun 2023 12:34:14 +0300
Finished: Wed, 07 Jun 2023 12:34:14 +0300
Ready: False
Restart Count: 1
Liveness: http-get http://:5984/_up delay=0s timeout=1s period=10s
#success=1 #failure=3
Readiness: http-get http://:5984/_up delay=0s timeout=1s period=10s
#success=1 #failure=3
Environment:
COUCHDB_USER: <set to the key 'adminUsername' in secret
'couchdb-qa-couchdb'> Optional: false
COUCHDB_PASSWORD: <set to the key 'adminPassword' in secret
'couchdb-qa-couchdb'> Optional: false
COUCHDB_SECRET: <set to the key 'cookieAuthSecret' in secret
'couchdb-qa-couchdb'> Optional: false
COUCHDB_ERLANG_COOKIE: <set to the key 'erlangCookie' in secret
'couchdb-qa-couchdb'> Optional: false
ERL_FLAGS: -name couchdb -setcookie XXXXXXXXXXX
Mounts:
/opt/couchdb/data from database-storage (rw)
/opt/couchdb/etc/default.d from config-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from
kube-api-access-w5kzb (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
database-storage:
Type: PersistentVolumeClaim (a reference to a
PersistentVolumeClaim in the same namespace)
ClaimName: database-storage-couchdb-qa-couchdb-0
ReadOnly: false
config-storage:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: couchdb-qa-couchdb
Optional: false
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 4s default-scheduler
Successfully assigned couchdb-qa/couchdb-qa-couchdb-0 to node1
Normal Pulling 3s kubelet Pulling
image "busybox:latest"
Normal Pulled 2s kubelet
Successfully pulled image "busybox:latest" in 593.012622ms
Normal Created 2s kubelet Created
container init-copy
Normal Started 2s kubelet Started
container init-copy
Normal Created 1s (x2 over 2s) kubelet Created
container couchdb
Normal Started 1s (x2 over 2s) kubelet Started
container couchdb
Warning BackOff <invalid> (x4 over 0s) kubelet Back-off
restarting failed container
```
### kubectl logs couchdb-qa-couchdb-0 -n couchdb-qa
```bash
Defaulted container "couchdb" out of: couchdb, init-copy (init)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]