valeriano-manassero/helm-charts

Trino Workers pods exception permission denied

Closed this issue · 5 comments

Hi I am trying to run chart on OpenShift and facing permission denied exception for data directory /data/trino when workers trying to get up. (ERROR: [Errno 13] Permission denied: '/data/trino/var')
To resolve it I added new PVC and mounted to /data/trino location , I this case I am not able to run multiple workers as its creating PID file at PVC and getting below error

  • set +e
  • grep -s -q node.id /etc/trino/node.properties
  • NODE_ID_EXISTS=1
  • set -e
  • NODE_ID=
  • [[ 1 != 0 ]]
  • NODE_ID=-Dnode.id=trino-worker-875c847fb-h8ckd
  • exec /usr/lib/trino/bin/launcher run --etc-dir /etc/trino -Dnode.id=trino-worker-875c847fb-h8ckd
    Already running as 1

May I know how to resolve it ?

What kind of StorageClass are you trying to use?
Pods are scheduled on different nodes?

When I didn't provide any storageClass (installing as is chart without any custom values) I get permission denied for workers to get up. When I updated template to add PVC then its not allowing to add more than one worker
I am running it on Openshift not sure Pods are getting scheduled on same or different nodes

This looks pretty weird to me. dataDir is usually pointing to a folder that is inside the container and not mounted at all. Even if the related filesystem is ephemeral, it should be writable. I never had an OpenShift so I'm not sure if there is some specific cluster config that forces the internal container filesystem to be readonly.

If you are trying to patch the chart itself I suggest to create a WIP PR so we can discuss and proceed to gather for an implementation since I never had a use case before where I needed to persist datadir.

P.S. Maybe an emptyDir ephemeral storage can do the trick.

@fxulusoy @RoboticHuman since you contributed on this project, have you any comment on the related pr? Ty!

Hi @valeriano-manassero , Thanks for suggestion , emptyDir fixed the issue for me and it worked.

deployment-worker.yaml
spec:
volumes:
- name: data-volume
emptyDir: {}

containers:
volumeMounts:
- mountPath: /data/trino (We can specify .Values.server.node.dataDir)
name: data-volume

Thanks