Bug 1392530

Summary: After removing NFS pvc, the pv stays Released and can't be reclaimed
Product: OpenShift Container Platform Reporter: Vladislav Walek <vwalek>
Component: StorageAssignee: Bradley Childs <bchilds>
Status: CLOSED NOTABUG QA Contact: Jianwei Hou <jhou>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: aos-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 18:24:16 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:

Description Vladislav Walek 2016-11-07 16:55:37 UTC
Description of problem:

Hi, customer created pv and pvc and attached the claim to his dc. After removing the dc and pvc, the pv is switched to status "Released" and can't be reclaimed again. 
The policy is set to Retain on pv, due the data must stay in pv.

Version-Release number of selected component (if applicable):

OpenShift Container Platform 3.3.0

How reproducible:

Creating the NFS pv and pvc and setting it to policy Retain. Removing the volume from dc and remove the PVC.

Steps to Reproduce:
1. Create NFS pv with policy Retain, bound to pvc. 
2. Remove PVC and PV will be in Released
3. Try to reclaim by creating new PVC. Will be in status Pending

Actual results:

The PV is in Released and PVC in Pending if recreating the claim.

Expected results:

Able to recreate the PVC on existing PV.

Additional info:

Comment 1 Bradley Childs 2016-11-07 18:24:16 UTC
Even if a PV has a reclaim policy of "retain", its not reclaimable.  It's meant for "manual reclamation", which means the admin should a) handle the data on the device and b) delete re/create the PV if it needs to be re-used.

The PV is not available to re-claim even if policy is set to "retain".  The only time a PV is available to be reclaimed after its released is with policy "Recycle".  When using recycle the data is deleted before it is placed back in the pool.