Bug 1366500
| Summary: | Prebound pv should be bound to pvc and ignore of mismatched accessmode | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Chao Yang <chaoyang> |
| Component: | Storage | Assignee: | Matthew Wong <mawong> |
| Status: | CLOSED NOTABUG | QA Contact: | Jianwei Hou <jhou> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.3.0 | CC: | aos-bugs, eboyd, eparis, jsafrane, mawong |
| Target Milestone: | --- | ||
| 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: | 2016-08-16 17:18:58 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: | |||
pr created here https://github.com/kubernetes/kubernetes/pull/30522 Do we actually want this behavior? I disagree with the whole concept predicating this BZ. I believe that if you 'pre-bind' but the binding is invalid you should stay pending. If I create a PVC with size=1T and PV=1G but the PV says it is 'pre-bound' I think it should fail/pending. pre-binding needs to work, but not when you are trying to make an illegal/invalid binding. erin? I had no input to how this should function. I will yield to the architect (@eparis) on the 'correct' behavior for this. However you decide it should work, I will happily document in a PR I already have opened for pre-binding. It's been decided that this is correct behavior, so I will try to fix https://bugzilla.redhat.com/show_bug.cgi?id=1360171 instead so that behavior is consistent for size & modes. pr for that is here https://github.com/kubernetes/kubernetes/pull/30690 |
Description of problem: If a PV contains a ClaimRef, accessmode should be ignored Version-Release number of selected component (if applicable): openshift v3.3.0.18 kubernetes v1.3.0+507d3a7 etcd 2.3.0+git How reproducible: Always Steps to Reproduce: 1.Create a pv with accessmode RWO prebound to pvc 2.Create a pvc with accessmode RWX 3.Check pv and pvc status oc get pv nfs1 -o yaml apiVersion: v1 kind: PersistentVolume metadata: creationTimestamp: 2016-08-12T05:44:03Z name: nfs1 resourceVersion: "6187" selfLink: /api/v1/persistentvolumes/nfs1 uid: c6f2f30e-604f-11e6-8d03-fa163e2d8f92 spec: accessModes: - ReadWriteOnce capacity: storage: 1Gi claimRef: name: nfsclaim1 namespace: default nfs: path: /chaotest server: 10.14.6.144 persistentVolumeReclaimPolicy: Retain status: phase: Available oc get pvc nfsclaim1 -o yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: creationTimestamp: 2016-08-12T05:44:09Z name: nfsclaim1 namespace: default resourceVersion: "6218" selfLink: /api/v1/namespaces/default/persistentvolumeclaims/nfsclaim1 uid: ca399877-604f-11e6-8d03-fa163e2d8f92 spec: accessModes: - ReadWriteMany resources: requests: storage: 1Gi status: phase: Pending Actual results: PV is available, pvc is pending Expected results: PV and PVC should be bound Additional info: According to https://bugzilla.redhat.com/show_bug.cgi?id=1360171#c3 , PV and PVC should be bound even if the access mode is mismatch