SAP Edge Integration Cell (EIC) - "Permission Denied" on IBM Cloud File Storage for VPC Shared Volumes (ROKS)

Solution verified - Updated on

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.

Submit request

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.

  1. 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>
    
  2. 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.

  1. When shared-pvc is Bound, save the following pod as eic-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 99 gets Operation not permitted.

  2. 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-permissions
    

    The log lists the directories on the share as drwxrwxrwx. It is a plain pod, not a Job, so that OpenShift checks the anyuid SCC against your permissions rather than those of a service account.

  3. Check that all pods in edge-icell become ready:

    oc get pods -n edge-icell
    

    A crashing worker starts at its next restart, after at most five minutes of back-off. No Deployment has to be restarted. If ELM reports the worker release 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 with volumeBindingMode: WaitForFirstConsumer, such as ibmc-vpc-file-metro-*, for the shared file system. EIC creates shared-pvc in 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 with failed to install release: context deadline exceeded. Check a class with oc get storageclass <name> -o jsonpath='{.volumeBindingMode}'; it must be Immediate.

The storage class of an existing claim cannot be changed. If you deployed with the wrong class, undeploy EIC in ELM, delete shared-pvc if 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 fsGroup to ReadWriteMany volumes.
  • The storage class parameters uid and gid set only the owner of the share's root directory, not of the sub-directories the kubelet creates, so a storage class with uid: "10000" and gid: "1000" does not resolve the issue.
  • A cluster-admin deployment does not avoid it either: the EIC pods then run under the privileged SCC, but the EIC charts still run the containers as UID 10000 and GID 1000.

Diagnostic Steps

  1. Check the pods and the worker log:

    oc get pods -n edge-icell
    oc logs -n edge-icell worker-xxx --previous | grep -i 'permission denied'
    
  2. Check that shared-pvc uses an IBM Cloud File Storage for VPC class:

    oc get pvc shared-pvc -n edge-icell -o jsonpath='{.spec.storageClassName}{"\n"}'
    
  3. 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 99 with mode drwxrwxr-x while the pod runs as UID 10000.

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.