Bug 1461361 - [3.3] PV could not be deleted with Default reclaim Policy
Summary: [3.3] PV could not be deleted with Default reclaim Policy
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jan Safranek
QA Contact: Jianwei Hou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-14 09:56 UTC by Chao Yang
Modified: 2017-06-20 13:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-20 13:27:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chao Yang 2017-06-14 09:56:07 UTC
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:

Comment 1 Jan Safranek 2017-06-15 06:31:02 UTC
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)

Comment 2 Chao Yang 2017-06-16 02:51:13 UTC
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


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