Description of problem: PV could not be deleted with Default reclaim Policy Version-Release number of selected component (if applicable): oc v3.3.1.36 kubernetes v1.3.0+52492b4 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://ip-172-18-5-58.ec2.internal:8443 openshift v3.3.1.36 kubernetes v1.3.0+52492b4 How reproducible: Always Steps to Reproduce: 1.Create a pv with default policy 2.Create a pvc ,then pvc and pv is bound 3.Create a pod using above pvc 4.After pod is running, delete pod, pvc and pv 5.PV is in "Failed" status. [root@ip-172-18-5-58 ~]# oc get pv NAME CAPACITY ACCESSMODES STATUS CLAIM REASON AGE pv-hzeg3 1Gi RWO Failed hzeg3/pvc-hzeg3 12m pvc-bf89bf6d-50d8-11e7-9df5-0e85ed1a3866 1Gi RWO Bound hzeg3/hzeg3-28h9zrj6 13m regpv-volume 17G RWX Bound default/regpv-claim 5h [root@ip-172-18-5-58 ~]# oc describe pv pv-hzeg3 Name: pv-hzeg3 Labels: failure-domain.beta.kubernetes.io/region=us-east-1 failure-domain.beta.kubernetes.io/zone=us-east-1d type=local Status: Failed Claim: hzeg3/pvc-hzeg3 Reclaim Policy: Default Access Modes: RWO Capacity: 1Gi Message: Volume has unrecognized PersistentVolumeReclaimPolicy Source: Type: AWSElasticBlockStore (a Persistent Disk resource in AWS) VolumeID: aws://us-east-1d/vol-01e2636999315aa7f FSType: ext4 Partition: 0 ReadOnly: false Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 12m 12m 1 {persistentvolume-controller } Warning VolumeUnknownReclaimPolicy Volume has unrecognized PersistentVolumeReclaimPolicy Actual results: PV could not be deleted Expected results: PV should be deleted Master Log: Node Log (of failed PODs): PV Dump: PVC Dump: StorageClass Dump (if StorageClass used by PV/PVC): Additional info:
Can you show me yaml of your PV? "Default" is not a valid reclaim policy. (and it should not be possible to create a PV with it, unless we miss some check in validation)
Yaml file is like below: kind: PersistentVolume apiVersion: v1 metadata: name: ebs labels: type: local spec: capacity: storage: 1Gi accessModes: - ReadWriteOnce awsElasticBlockStore: volumeID: "aws://us-east-1d/vol-e69f0b1c" fsType: "ext4" persistentVolumeReclaimPolicy: "Default" And I also test this on the v3.6, it does not allow to create a pv with Default policy