mysql-operator icon indicating copy to clipboard operation
mysql-operator copied to clipboard

Orchestrator persistence does not work on NFS?

Open ibsrtm opened this issue 3 years ago • 0 comments

Hi, I'm trying to install mysql-operator with PV on NFS, but the orhestrator cannot write the db, I'm running:

helm install mysql-operator bitpoke/mysql-operator -n mysql-operator --create-namespace --set orchestrator.persistence.storageClass="nfs" --set orchestrator.persistence.fsGroupWorkaroundEnabled=true --set podSecurityContext.runAsNonRoot=false

Init container seems to run and sets the permissions:

kubectl describe pod mysql-operator-0 -n mysql-operator ... Init Containers: init-mount: Container ID: containerd://1c39f97c35d35749428ad03e4a4f5119f5abd56967c6fee91ba7e39b29862569 Image: busybox:1.34.0 Image ID: docker.io/library/busybox@sha256:e8e5cca392e3cf056fcdb3093e7ac2bf83fcf28b3bcf5818fe8ae71cf360c231 Port: Host Port: Command: sh -c chown -R 65532:65532 /var/lib/orchestrator State: Terminated Reason: Completed Exit Code: 0 Started: Sun, 03 Jul 2022 12:06:20 +0200 Finished: Sun, 03 Jul 2022 12:06:20 +0200 Ready: True Restart Count: 0 Environment: Mounts: /var/lib/orchestrator from data (rw) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-4p4k5 (ro) ...

The permissions looks ok when I mount the NFS directory on other server:

ls -la /mnt/test total 4 drwxrwxrwx 1 root root 24 Jul 3 04:36 . drwxr-xr-x 4 root root 4096 Jul 3 04:03 .. drwxrwxrwx 1 65532 65532 0 Jul 3 04:36 pvtest

But the orchestrator says:

kubectl logs mysql-operator-0 -c orchestrator -n mysql-operator 2022-07-03 10:09:39 FATAL unable to open database file 2022/07/03 10:09:39 Command exited with error: exit status 1

The PV I use:

apiVersion: v1 kind: PersistentVolume metadata: name: persistent-volume spec: storageClassName: nfs capacity: storage: 5Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain nfs: server: 192.168.y.x path: /volume1/PV/pvtest

Why the orchestator can't write db on it? Does persistence work at all on NFS?

ibsrtm avatar Jul 04 '22 05:07 ibsrtm