- Red Hat OpenShift on IBM Cloud (ROKS) on VPC infrastructure, x86-64
- IBM Cloud File Storage for VPC (add-on
vpc-file-csi-driver), storage classesibmc-vpc-file-* - SAP Edge Integration Cell (EIC) with Enable Shared File System: yes, see SAP Help Portal: Deploy the Edge Integration Cell Solution
- Both deployment models: Restricted-Access OpenShift Cluster and a kubeconfig with full cluster-admin privileges
SAP Edge Integration Cell (EIC) - "Permission Denied" on IBM Cloud File Storage for VPC Shared Volumes (ROKS)
Request a new translation or translation update
A translation for your language preference does not exist. Click below to request a translation for your selected language.
Environment
Issue
SAP Edge Integration Cell (EIC) deployed on Red Hat OpenShift on IBM Cloud (ROKS) with Enable Shared File System: yes and an IBM Cloud File Storage for VPC storage class (for example ibmc-vpc-file-500-iops) does not start. The worker pod stays in CrashLoopBackOff with:
Error opening log file '/var/lib/worker/data/gc.log': Permission denied
The EIC pods can read the shared volume (shared-pvc in the edge-icell namespace) but cannot write to it. The EIC deployment in SAP Edge Lifecycle Management (ELM) can report the worker release as failed.
Resolution
Choose one of the following options.
Option 1: Set the permissions of the shared volume once (workaround)
Make the root of the share and the directories already on it writable for all users (777). Directories created later inherit this mode. Do this once per EIC deployment: every EIC deployment creates a new file share. It needs a cluster administrator, for restricted-access and cluster-admin deployments alike.
-
Enable the IBM Cloud File Storage for VPC add-on if it is not enabled yet:
ibmcloud ks cluster addon enable vpc-file-csi-driver --cluster <cluster> -
Deploy EIC in ELM with:
| Property | Setting |
|---|---|
| Enable Shared File System | yes |
| Shared File System Storage Class | ibmc-vpc-file-500-iops |
Use a storage class with volumeBindingMode: Immediate, see the note below.
-
When
shared-pvcisBound, save the following pod aseic-shared-fs-permissions.yaml. It does not matter whether the EIC pods already exist.apiVersion: v1 kind: Pod metadata: name: eic-shared-fs-permissions namespace: edge-icell annotations: openshift.io/required-scc: anyuid spec: restartPolicy: Never securityContext: runAsUser: 0 # mapped to the share's anonymous owner by the NFS server containers: - name: fix image: registry.access.redhat.com/ubi9/ubi-minimal command: - sh - -c - | set -e for d in /share /share/*/; do if [ -d "$d" ]; then chmod 0777 "$d"; echo "chmod 777 ${d%/}"; fi done ls -ln /share securityContext: allowPrivilegeEscalation: false volumeMounts: - { name: share, mountPath: /share } volumes: - name: share persistentVolumeClaim: { claimName: shared-pvc }The pod runs as root, which the NFS server maps to the anonymous owner of the share. Only that identity may change the permissions; a pod running as UID
99getsOperation not permitted. -
Create the pod as a cluster administrator, check its log and delete it:
oc get pvc shared-pvc -n edge-icell oc apply -f eic-shared-fs-permissions.yaml oc wait -n edge-icell pod/eic-shared-fs-permissions --for=jsonpath='{.status.phase}'=Succeeded --timeout=180s oc logs -n edge-icell eic-shared-fs-permissions oc delete pod -n edge-icell eic-shared-fs-permissionsThe log lists the directories on the share as
drwxrwxrwx. It is a plain pod, not a Job, so that OpenShift checks theanyuidSCC against your permissions rather than those of a service account. -
Check that all pods in
edge-icellbecome ready:oc get pods -n edge-icellA crashing
workerstarts at its next restart, after at most five minutes of back-off. No Deployment has to be restarted. If ELM reports theworkerrelease as failed, retry the EIC deployment in ELM.
Mode 777 lets every pod that mounts shared-pvc write to the share. The claim belongs to the edge-icell namespace, so only pods in that namespace can mount it.
[!IMPORTANT]
Do not use a storage class withvolumeBindingMode: WaitForFirstConsumer, such asibmc-vpc-file-metro-*, for the shared file system. EIC createsshared-pvcin its first Helm chart and waits for it to be bound; the pods that use it are created by later charts. With such a class the claim never binds and the installation fails withfailed to install release: context deadline exceeded. Check a class withoc get storageclass <name> -o jsonpath='{.volumeBindingMode}'; it must beImmediate.The storage class of an existing claim cannot be changed. If you deployed with the wrong class, undeploy EIC in ELM, delete
shared-pvcif it is still there (oc delete pvc shared-pvc -n edge-icell) and deploy again.
Option 2: Use OpenShift Data Foundation (ODF)
Use CephFS from Red Hat OpenShift Data Foundation (ODF) instead of IBM Cloud File Storage for VPC. On ROKS, ODF is available as a cluster add-on; see IBM Cloud: Deploying OpenShift Data Foundation on VPC clusters.
Deploy EIC in ELM with:
| Property | Setting |
|---|---|
| Enable Shared File System | yes |
| Shared File System Storage Class | ocs-storagecluster-cephfs |
CephFS volumes need no permission workaround. For an EIC deployment with a cluster-admin kubeconfig, use the storage class described in SAP Edge Integration Cell (EIC) - "Permission Denied" on ODF CephFS RWX Shared Volumes instead of ocs-storagecluster-cephfs.
Root Cause
EIC mounts sub-directories of the shared volume: one per pod (named after the pod) and a common diagnostics directory. The kubelet creates these directories as root. The NFS server of IBM Cloud File Storage for VPC maps root to an anonymous user (UID 99), so the directories belong to that user and get the permissions of the share's root directory (775).
The EIC containers run as UID 10000 and GID 1000. They can read the directories but cannot write to them:
- Kubernetes does not correct the ownership: the IBM Cloud File Storage for VPC CSI driver does not apply
fsGroupto ReadWriteMany volumes. - The storage class parameters
uidandgidset only the owner of the share's root directory, not of the sub-directories the kubelet creates, so a storage class withuid: "10000"andgid: "1000"does not resolve the issue. - A cluster-admin deployment does not avoid it either: the EIC pods then run under the
privilegedSCC, but the EIC charts still run the containers as UID10000and GID1000.
Diagnostic Steps
-
Check the pods and the
workerlog:oc get pods -n edge-icell oc logs -n edge-icell worker-xxx --previous | grep -i 'permission denied' -
Check that
shared-pvcuses an IBM Cloud File Storage for VPC class:oc get pvc shared-pvc -n edge-icell -o jsonpath='{.spec.storageClassName}{"\n"}' -
Check the owner and mode of the directories on the share from a running EIC pod that mounts it, for example
edge-api:oc exec -n edge-icell edge-api-xxx -- sh -c 'id; ls -ln /mnt'The directories belong to UID
99with modedrwxrwxr-xwhile the pod runs as UID10000.
This solution is part of Red Hat's fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.