Open ihatemodels opened 1 year ago
We are also experiencing this same issue when trying to go to 3.3.2
. We've been able to successfully go to 3.2.1
for the time being.
We are also experiencing this same issue when trying to go to
3.3.2
. We've been able to successfully go to3.2.1
for the time being.
That is not helping in my case. I get the same behaviour with different versions. Even 2.X.X
I have a same problem described in here https://github.com/apache/couchdb-helm/issues/123 Installing version back to 3.2.1 did not solve the problem.
My guess is that this is a permissions issue. If you can reproduce in a test environment, I would see whether you can get the container running using a custom command e.g. update the deployment to set:
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
and then exec into the container. The standard container entrypoint is defined at https://github.com/apache/couchdb-docker/blob/main/3.3.2/docker-entrypoint.sh, so you could try running that manually from a shell and see whether any commands fail.
I am not sure how to change an entrypoint of a docker image that is being deployed via helm chart. Values.yaml doesn't give me such a possibility...
@lolszowy I would just kubectl edit
the deployment manifest directly after deploying with Helm.
As the author of the issue I am sorry, but currently I don't have much time to invest in it. As soon as I can I will proceed with further testing too. I tested with different storage class ( Amazon EBS and Longhorn ) and it was working as expected.
problem is definitely with mounting pv. There is no problem with running CouchDB without PV. But even when I am trying to create a local pv it is crashing same way.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: couchdb-statefulset
spec:
selector:
matchLabels:
app: couchdb
serviceName: couchdb-service
replicas: 1
template:
metadata:
labels:
app: couchdb
spec:
containers:
- name: couchdb
image: couchdb:3.3.1
ports:
- containerPort: 5984
volumeMounts:
- name: couchdb-data
mountPath: /opt/couchdb/
volumes:
- name: couchdb-data
persistentVolumeClaim:
claimName: couchdb-pvc-local
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: couchdb-pvc-local
spec:
storageClassName: local-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: my-local-pv
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
storageClassName: local-storage
local:
path: /mnt
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- ip-10-3-1-81.eu-west-1.compute.internal
- ip-10-3-2-247.eu-west-1.compute.internal
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
k describe pod couchdb-statefulset-0
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 8s default-scheduler 0/3 nodes are available: persistentvolumeclaim "couchdb-pvc-local" not found. preemption: 0/3 nodes are available: 3 No preemption victims found for incoming pod..
Normal Scheduled 5s default-scheduler Successfully assigned tpos-sync/couchdb-statefulset-0 to ip-10-3-2-247.eu-west-1.compute.internal
Normal Pulled 3s (x2 over 4s) kubelet Container image "couchdb:3.3.1" already present on machine
Normal Created 3s (x2 over 4s) kubelet Created container couchdb
Normal Started 3s (x2 over 4s) kubelet Started container couchdb
Warning BackOff 2s kubelet Back-off restarting failed container couchdb in pod couchdb-statefulset-0_tpos-sync(92a8c35d-c8e1-4dee-b745-a8f4be50c106)
While using Helm Chart I had that error Warning FailedScheduling 62s default-scheduler 0/3 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/3 nodes are available: 3 No preemption victims found for incoming pod..
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:
What happened:
The StatefulSet is unable to start with Amzon EFS 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
kubectl describe pod couchdb-couchdb-0 -n couchdb-qa
kubectl logs couchdb-qa-couchdb-0 -n couchdb-qa
kubectl logs couchdb-qa-couchdb-0 --container init-copy -n couchdb-qa