Description of problem: Same volume mounted to multiple pvc's when pvc's are created through template. Also, the volume shows bound to only one claim while the other volume is available. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. create new project 2. In the project, execute oc new-app -f template.json. Template has section as below : "objects": [ { "kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": { "name": "aem-author-data-pvc" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "3Gi" } } } }, { "kind": "PersistentVolumeClaim", "apiVersion": "v1", "metadata": { "name": "aem-author-logs-pvc" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "3Gi" } } } }, 3. Persistent volume claim shows as below : [chris@master ~]$ oc get pvc NAME LABELS STATUS VOLUME aem-author-data-pvc map[application:aem-author createdBy:template] Bound phpvolume aem-author-logs-pvc map[application:aem-author createdBy:template] Bound phpvolume 4. Persistent volume shows bound to only one volume claim. oc get pv NAME LABELS CAPACITY ACCESSMODES STATUS CLAIM REASON newvolume <none> 5368709120 RWO Available phpvolume <none> 5368709120 RWO Bound persistent/aem-author-data-pvc Actual results: The volume is bound to only one claim while the claim both are bound to same volume Expected results: The two pvc's should get bound to different volumes. Additional info:
Upstream fix to patch into Origin: https://github.com/kubernetes/kubernetes/pull/16432
The fix merged into Origin yesterday: https://github.com/openshift/origin/pull/5467
Test scenario: 1. Create a PV, and then 5 PVCs at the same time(via template). 2. Create the PVCs, then create a PV. Verified that only one PVC bound to the PV. # openshift version openshift v3.1.0.0 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4 etcd 2.1.2