0

We have OpenShift 3.9 running in our Cluster. I currently am trying out the Pipeline capabilities of OpenShift. It turns out the default recipies for Jenkins are not working. The problem is that the volumeMount specified in the dc leads to a noexec mount in the Container. When the Jenkins git plugin is then trying to execute its ssh wrapper in /var/lib/jenkins it of course fails.

The config they use in the dc is:

  volumes:
    - emptyDir: {}
      name: jenkins-data

and then mount it via:

      volumeMounts:
        - mountPath: /var/lib/jenkins
          name: jenkins-data

I could not find any option to configure which mount options are to be used in the container. Is there any way to work around that?

abergmeier
  • 13,224
  • 13
  • 64
  • 120
  • My suggestion would be to look at a persistent volume instead of emptyDir, at least see if that solves the issue. I didn't see anything obviosiy about `noexec` when looking at the api docs for emptyDir. – Will Gordon Nov 09 '18 at 13:19
  • I also `PV` is good idea than `emptyDir`, because `emptyDir` can not adjust the mount option, refer [emptyDir with medium: Memory mounts a tmpfs volume without nosuid,nodev,noexec](https://github.com/kubernetes/kubernetes/issues/48912) at now. – Daein Park Nov 10 '18 at 12:58

0 Answers0