+++ This bug was initially created as a clone of Bug #1451007 +++ Description of problem: Pods fail to start if they specify a file as a volume subPath to mount Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a pod that mounts a volume's file using subPath Actual results: Pod reports "mkdir" error and fails to start Expected results: Pod enters Running state --- Additional comment from Matthew Wong on 2017-05-15 10:44:19 EDT --- https://github.com/openshift/origin/pull/14193
PR: https://github.com/openshift/origin/pull/14193
Tested on below version: openshift v3.6.105 kubernetes v1.6.1+5115d708d7 The pod could be started with subpath: $ cat pod.json { "apiVersion": "v1", "kind": "Pod", "metadata": { "name": "mypod1", "labels": { "name": "frontendhttp" } }, "spec": { "containers": [{ "name": "myfrontend", "image": "jhou/hello-openshift", "imagePullPolicy": "IfNotPresent", "ports": [{ "containerPort": 80, "name": "http-server" }], "volumeMounts": [{ "mountPath": "/opt/wehe", "subPath": "wehe", "name": "pvol" }] }], "volumes": [{ "name": "pvol", "nfs": { "server": "XXX", "path": "/", "readOnly": false } }] } } $ oc get pods mypod1 1/1 Running 0 1m [root@mypod1 opt]# ll total 0 drwxrwxrwx. 2 root root 6 Jun 13 07:31 wehe
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1716