Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1360171 - Prebound pv is bound to request pvc with mismatched volume size
Prebound pv is bound to request pvc with mismatched volume size
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
chaoyang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-26 03:18 EDT by chaoyang
Modified: 2017-03-08 13 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
this bug was not in any public OpenShift release.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-27 05:41:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Origin (Github) 10522 None None None 2016-08-19 08:52 EDT
Github kubernetes/kubernetes/pull/30690 None None None 2016-08-18 15:55 EDT
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description chaoyang 2016-07-26 03:18:03 EDT
Description of problem:
Prebound pv is bound to the request pvc with mismatched volume size

Version-Release number of selected component (if applicable):
openshift v3.3.0.10
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1.Create a prebound pv with volume size is 1Gi
apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs1
spec:
  capacity:
    storage: 1Gi
  accessModes:
     - ReadWriteOnce
  nfs:
    path: /chaotest
    server: 10.14.6.144
  claimRef:
    namespace: default
    name: nfsclaim1

2. Create a pvc with request volume size is 2Gi

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfsclaim1
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 2Gi

3.Check the PV and PVC status
[root@ip-172-18-5-166 ~]# oc get pvc
NAME          STATUS    VOLUME         CAPACITY   ACCESSMODES   AGE
nfsclaim1     Bound     nfs1           0                        2s


Actual results:
PV and PVC is bound

Expected results:
PVC is pending
PV is available

Additional info:
Comment 1 Bradley Childs 2016-08-03 09:54:04 EDT
This may be one of the unfortunate side-effects of allowing "pre-bound" volumes.  We would like to deprecate this (unintentional) feature at some point.

In your case, are you specifying the claim in the PV, or the PV in the claim? Please provide the yaml for PV and PVC.

Assigning to jsafrane for further investigation.
Comment 2 Jan Safranek 2016-08-04 05:35:23 EDT
In current implementation, pre-binding volume to a claim (and claim to a volume) trumps everything, including label checks, size, access modes and storage class in future. User wants a specific volume/claim and he gets it.

Erin, is this common understanding or should we do something about it.
Comment 3 Erin Boyd 2016-08-11 14:58:50 EDT
This is worked as expected. If a PV contains a ClaimRef, access and size should be ignored.
Comment 4 chaoyang 2016-08-11 23:32:16 EDT
Thanks, will udpate the test case
Comment 5 chaoyang 2016-08-18 02:03:13 EDT
re-open this bug according to https://bugzilla.redhat.com/show_bug.cgi?id=1366500#c4
Comment 6 Bradley Childs 2016-08-18 09:04:05 EDT
Ok, per the two BZs the updated behavior is here: https://github.com/kubernetes/kubernetes/pull/30690 

marking as 'post' while we backport & merge into openshift.
Comment 7 Eric Paris 2016-08-18 15:56:13 EDT
Need origin PR...
Comment 8 Andy Goldstein 2016-08-19 08:52:12 EDT
https://github.com/openshift/origin/pull/10522
Comment 9 chaoyang 2016-08-22 22:28:49 EDT
This is passed on
openshift v3.3.0.24-dirty
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

After create pv and pvc using https://bugzilla.redhat.com/show_bug.cgi?id=1360171#c0
pv is avaiable and pvc is pending
Comment 11 errata-xmlrpc 2016-09-27 05:41:46 EDT
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/RHBA-2016:1933

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