Bug 1663147 - [3.11] Recycler refuses to recycle PVs when a pod has a different PV using the same PVC
Summary: [3.11] Recycler refuses to recycle PVs when a pod has a different PV using th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.11.z
Assignee: Tomas Smetana
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On: 1663149
Blocks: 1663145
TreeView+ depends on / blocked
 
Reported: 2019-01-03 10:05 UTC by Tomas Smetana
Modified: 2019-01-30 15:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 1663145
: 1663149 (view as bug list)
Environment:
Last Closed: 2019-01-30 15:19:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0096 None None None 2019-01-30 15:19:34 UTC

Comment 1 Tomas Smetana 2019-01-03 11:36:49 UTC
https://github.com/openshift/origin/pull/21721

Comment 3 Chao Yang 2019-01-07 08:19:40 UTC
This is verified on 
oc v3.11.66
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-12-68.ec2.internal:8443
openshift v3.11.66
kubernetes v1.11.0+d4cacc0

1.Create two nfs recyled pv
[root@ip-172-18-12-68 ~]# oc get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                  STORAGECLASS   REASON    AGE
nfs-1                                      5Gi        RWX            Recycle          Available                                                   2m
nfs-2                                      5Gi        RWX            Recycle          Available                                                          
2.Create a pvc nfsc-1, and bound to one pv nfs-1
[root@ip-172-18-12-68 ~]# oc get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                  STORAGECLASS   REASON    AGE
nfs-1                                      5Gi        RWX            Recycle          Bound       s4l93/nfsc-1                                    9m
nfs-2                                      5Gi        RWX            Recycle          Available                                                   10m
3.Create pod nfs-1, using pvc nfsc-1

4.Prepare the pvc yaml file, make the pvc nfs-1 bound to pv nfs-2
{
    "apiVersion": "v1",
    "kind": "PersistentVolumeClaim",
    "metadata": {
        "name": "nfsc-1"
    },
    "spec": {
        "volumeName": "nfs-2",
        "accessModes": [ "ReadWriteMany" ],
        "resources": {
            "requests": {
                "storage": "5Gi"
            }
        }
    }
}
~   
5.Re-create pvc nfsc-1
[root@ip-172-18-12-68 ~]# ./test.sh 
pod "nfs-1" deleted
persistentvolumeclaim "nfsc-1" deleted
persistentvolumeclaim/nfsc-1 created
pod/nfs-1 created
6.Check pv status
[root@ip-172-18-12-68 ~]# oc get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                  STORAGECLASS   REASON    AGE
nfs-1                                      5Gi        RWX            Recycle          Available                                                   12m
nfs-2                                      5Gi        RWX            Recycle          Bound       s4l93/nfsc-1

Comment 5 errata-xmlrpc 2019-01-30 15:19:31 UTC
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-2019:0096


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