Bug 1482450

Summary: [online-int]When adding subdirectory as Mount Path on web console, the directory is not created successfully in container
Product: OpenShift Online Reporter: xipang
Component: PodAssignee: Seth Jennings <sjenning>
Status: CLOSED DUPLICATE QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: abhgupta, aos-bugs, decarr, jokerman, mmccomas
Target Milestone: ---Keywords: OnlinePro, UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-25 14:24:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xipang 2017-08-17 10:02:08 UTC
Description of problem:
Adding subdirectory as Mount Path, although it shows (both on web & CLI) path is added, actually the path/files was not created successfully

Version-Release number of selected component (if applicable):
OpenShift Master: v3.6.171 (online version 3.5.1.79)
Kubernetes Master: v1.6.1+5115d708d7 

How reproducible:
Always

Steps to Reproduce:
1.Login and create a project
2.Create ConfigMap
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/configmap/configmap-example.yaml
3.Create DC
$ oc run myrun --image=aosqe/hello-openshift
4.Go to dc/myrun -> Configuration tab -> Add config files -> "Mount Path: /data" -> Click Add
5. Add another one, go to dc/myrun -> Configuration tab -> Add config files -> "Mount Path: /data/configmap" -> Click Add

6 Check volume in pod
$ oc exec myrun-x-xx ls /data
$ oc exec myrun-x-xx ls /data/configmap

Actual results:
6 Only show the files where key be exposed
6.1 $ oc exec <pod_name> ls /data
example.property.1
example.property.2
example.property.file
6.2 $ oc exec <pod_name> ls /data/configmap
ls: /data/configmap: No such file or directory
command terminated with exit code 1

Expected results:
6.2 files should be created under /data/configmap path and output should be:
$ oc exec <pod_name> ls /data/configmap
example.property.1
example.property.2
example.property.file

Additional info

Comment 1 Seth Jennings 2017-08-22 19:42:29 UTC
This is a known limitation.  There is a PR to add validation to check for overlapping mount points to avoid user confusion:
https://github.com/kubernetes/kubernetes/pull/47456

Comment 2 Abhishek Gupta 2017-08-23 16:40:36 UTC
Pushing out of the blocker list based on the comment above.

Comment 3 Seth Jennings 2017-08-25 03:09:40 UTC
I don't think we have a bz tracking that upstream PR so this is as good as any.

Comment 4 Seth Jennings 2017-08-25 14:24:05 UTC
Actually there is a bz tracking this already.
https://bugzilla.redhat.com/show_bug.cgi?id=1430322

*** This bug has been marked as a duplicate of bug 1430322 ***