Bug 1265187 - Same volume mounted to multiple pvc's when pvc's are created through template
Summary: Same volume mounted to multiple pvc's when pvc's are created through template
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Mark Turansky
QA Contact: Liang Xia
URL:
Whiteboard:
Depends On:
Blocks: 1267746
TreeView+ depends on / blocked
 
Reported: 2015-09-22 10:53 UTC by Jaspreet Kaur
Modified: 2019-09-12 08:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 14:43:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jaspreet Kaur 2015-09-22 10:53:23 UTC
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:

Comment 1 Mark Turansky 2015-10-28 15:12:47 UTC
Upstream fix to patch into Origin: https://github.com/kubernetes/kubernetes/pull/16432

Comment 3 Mark Turansky 2015-11-05 14:28:14 UTC
The fix merged into Origin yesterday: https://github.com/openshift/origin/pull/5467

Comment 4 Liang Xia 2015-11-06 04:42:42 UTC
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


Note You need to log in before you can comment on or make changes to this bug.