+++ This bug was initially created as a clone of Bug #1555910 +++ Description of problem: Originally reported bug : https://github.com/kubernetes/kubernetes/issues/61178 By creating a deployment where an init container creates a file in an emptydir and then the container tries to mount this file as a subpath will reproduce it. --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: subpath namespace: kube-system spec: replicas: 1 template: metadata: labels: app: subpath spec: initContainers: - name: init image: busybox command: - touch - /mount/test volumeMounts: - name: mount mountPath: /mount containers: - name: subtest image: busybox command: - ls - -l - /mount/test volumeMounts: - name: mount mountPath: /mount/test subPath: test volumes: - name: mount emptyDir: {} Version-Release number of selected component (if applicable): 3.9 Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info:
We need to cherry-pick upstream fix https://github.com/kubernetes/kubernetes/pull/61193
https://github.com/openshift/ose/pull/1136
Tested on below version: openshift v3.8.36 kubernetes v1.8.5+440f8d36da This bug is fixed on 3.8 # oc get pods -n kube-system NAME READY STATUS RESTARTS AGE subpath-6cc544864b-8b2wf 0/1 CrashLoopBackOff 1 22m # oc describe pods subpath-6cc544864b-8b2wf -n kube-system Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 22m default-scheduler Successfully assigned subpath-6cc544864b-8b2wf to wehe-master-etcd-nfs-1 Normal SuccessfulMountVolume 22m kubelet, wehe-master-etcd-nfs-1 MountVolume.SetUp succeeded for volume "mount" Normal SuccessfulMountVolume 22m kubelet, wehe-master-etcd-nfs-1 MountVolume.SetUp succeeded for volume "default-token-jfd5w" Normal Pulling 22m kubelet, wehe-master-etcd-nfs-1 pulling image "busybox" Normal Pulled 22m kubelet, wehe-master-etcd-nfs-1 Successfully pulled image "busybox" Normal Created 22m kubelet, wehe-master-etcd-nfs-1 Created container Normal Started 22m kubelet, wehe-master-etcd-nfs-1 Started container