File with exec perms is not executable on OpenShift persistent volume on GlusterFS

Solution Verified - Updated -

Issue

When mounting the glusterfs storage to OpenShift's pod, the executable files are not executable due to the selinux policy issues. It will result in 'Permissions Denied' even if the '+x' permissions are set to the file.

# oc rsh pod_mount-1-4rshd

sh-4.2$ ls -lZ /mount/glusterfs/binary
-rwxr-xr-x. 1001 root system_u:object_r:fusefs_t:s0    /mount/glusterfs/binary

sh-4.2$ /mount/glusterfs/binary
sh: /mount/glusterfs/binary: Permission denied

Environment

OpenShift Container Platform 3.3
OpenShift Container Platform 3.4
OpenShift Container Platform 3.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content