Bug 1623234
Summary: | In v3.10, dynamic PV/PVC is now set to "Retain" instead of "Delete | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Øystein Bedin <obedin> |
Component: | Storage | Assignee: | Matthew Wong <mawong> |
Status: | CLOSED ERRATA | QA Contact: | Chao Yang <chaoyang> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.10.0 | CC: | aos-bugs, aos-storage-staff, bchilds, jhou, mawong |
Target Milestone: | --- | ||
Target Release: | 3.10.z | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Default storage class is installed with a reclaim policy set equal to "" (empty string)
Consequence: Dynamically provisioned PVs of the default storage class have "Retain" policy instead of the expected "Delete"
Fix: Install the default storage class with a nil reclaim policy
Result: Dynamically provisioned PVs of default storage class have the expected "Delete" policy
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-09-22 04:55:14 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: |
Description
Øystein Bedin
2018-08-28 19:50:35 UTC
Comparing the storageclass with a v3.9 storageclass, it looks like the reclaimPolicy: is set to "Delete" in v3.9 while the v3.10 is empty. the 3.11 version of this bug is at https://bugzilla.redhat.com/show_bug.cgi?id=1608537, these patches need to be cherry-picked https://github.com/openshift/openshift-ansible/pull/9752 https://github.com/openshift/openshift-ansible/pull/9781 cherry-picks: https://github.com/openshift/openshift-ansible/pull/9759 https://github.com/openshift/openshift-ansible/pull/9810 Tested on v3.10.44, the problem persists. Having the reclaimPolicy set to "", the PV is provisioned with "Retain" reclaimPolicy. # oc get storageclass -o yaml apiVersion: v1 items: - apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: storageclass.beta.kubernetes.io/is-default-class: "true" creationTimestamp: 2018-09-07T01:58:40Z name: standard namespace: "" resourceVersion: "2031" selfLink: /apis/storage.k8s.io/v1/storageclasses/standard uid: 8aa409ea-b241-11e8-8a48-42010af0006f parameters: type: pd-standard provisioner: kubernetes.io/gce-pd reclaimPolicy: "" volumeBindingMode: Immediate kind: List metadata: resourceVersion: "" selfLink: "" apiVersion: v1 kind: PersistentVolume metadata: annotations: kubernetes.io/createdby: gce-pd-dynamic-provisioner pv.kubernetes.io/bound-by-controller: "yes" pv.kubernetes.io/provisioned-by: kubernetes.io/gce-pd creationTimestamp: 2018-09-07T02:17:03Z finalizers: - kubernetes.io/pv-protection labels: failure-domain.beta.kubernetes.io/region: us-central1 failure-domain.beta.kubernetes.io/zone: us-central1-a name: pvc-196d4a7c-b244-11e8-8a48-42010af0006f resourceVersion: "5766" selfLink: /api/v1/persistentvolumes/pvc-196d4a7c-b244-11e8-8a48-42010af0006f uid: 1c16be39-b244-11e8-8a48-42010af0006f spec: accessModes: - ReadWriteOnce capacity: storage: 6G claimRef: apiVersion: v1 kind: PersistentVolumeClaim name: gcec namespace: jhou resourceVersion: "5754" uid: 196d4a7c-b244-11e8-8a48-42010af0006f gcePersistentDisk: fsType: ext4 pdName: kubernetes-dynamic-pvc-196d4a7c-b244-11e8-8a48-42010af0006f persistentVolumeReclaimPolicy: Retain storageClassName: standard status: phase: Bound Verified on v3.10.45. Without setting a value for reclaimPolicy, the reclaim policy is 'Delete'. Setup a new cluster with ansible, the created storageclass has 'Delete' reclaim policy. Passed on v3.10.45 [root@ip-172-18-7-127 ~]# oc get sc -o yaml apiVersion: v1 items: - apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: storageclass.beta.kubernetes.io/is-default-class: "true" creationTimestamp: 2018-09-11T06:09:10Z name: gp2 namespace: "" resourceVersion: "1935" selfLink: /apis/storage.k8s.io/v1/storageclasses/gp2 uid: 32dd07a9-b589-11e8-acf4-0e7d41ec4926 parameters: encrypted: "false" kmsKeyId: "" type: gp2 provisioner: kubernetes.io/aws-ebs reclaimPolicy: Delete volumeBindingMode: Immediate kind: List metadata: resourceVersion: "" selfLink: "" Create dynamic pvc, persistentVolumeReclaimPolicy is Delete 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-2018:2660 |