Bug 1298813 - [RFE] Persistent Volume with recycle policy becomes 'FAILED' immediately after claim is deleted if the volume plugin does not support recycling
[RFE] Persistent Volume with recycle policy becomes 'FAILED' immediately afte...
Status: ASSIGNED
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.1.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Erin Boyd
Jianwei Hou
:
Depends On:
Blocks: 1267746
  Show dependency treegraph
 
Reported: 2016-01-15 02:01 EST by Jianwei Hou
Modified: 2016-06-09 19:39 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jianwei Hou 2016-01-15 02:01:28 EST
Description of problem:
Given a persistent volume has 'recycle' reclaim policy, and it is bound to a claim. When the claim is deleted, the persistent volume status becomes 'FAILED' immediately

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


How reproducible:
openshift v3.1.1.2
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

Steps to Reproduce:
1. Create a PV with reclaim policy set as 'recycle'
oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/persistent-volumes/iscsi/pv-rwx.json
2. Create a PVC
oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/persistent-volumes/iscsi/pvc-rwx.json
3. When PV and PVC are bound, delete this PVC
4. Get PV status

Actual results:
After step 4:
# oc get pv 
NAME      LABELS    CAPACITY   ACCESSMODES   STATUS    CLAIM         REASON    AGE
iscsi     <none>    5Gi        RWX           Failed    jhou/iscsic             5m

# oc describe pv iscsi
Name:		iscsi
Labels:		<none>
Status:		Failed
Claim:		jhou/iscsic
Reclaim Policy:	Recycle
Access Modes:	RWX
Capacity:	5Gi
Message:	no volume plugin matched
Source:
    Type:		ISCSI (an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod)
    TargetPortal:	192.168.0.225:3260
    IQN:		iqn.2015-06.world.server:storage.target00
    Lun:		0
    FSType:		ext4
    ReadOnly:		false

Logs:
```
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.151773   38864 persistentvolume_claim_binder_controller.go:196] Synchronizing PersistentVolume[iscsi], current phase: Bound
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.167844   38864 persistentvolume_claim_binder_controller.go:313] PersistentVolume[iscsi] changing phase from Bound to Released
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.177292   38864 persistentvolume_recycler_controller.go:101] Reclaiming PersistentVolume[iscsi]
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.179403   38864 persistentvolume_claim_binder_controller.go:196] Synchronizing PersistentVolume[iscsi], current phase: Released
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.188287   38864 persistentvolume_recycler_controller.go:133] Recycling PersistentVolume[iscsi]
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.188328   38864 persistentvolume_recycler_controller.go:165] PersistentVolume[iscsi] changing phase from Released to Failed
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.414246   38864 persistentvolume_claim_binder_controller.go:196] Synchronizing PersistentVolume[iscsi], current phase: Failed
Jan 15 14:32:38 openshift-115.lab.eng.nay.redhat.com atomic-openshift-master[38864]: I0115 14:32:38.414298   38864 persistentvolume_claim_binder_controller.go:304] PersistentVolume[iscsi] previously failed recycling.  Skipping.
```

Expected results:
Not sure if this is our expected behavior, since recycle policy now only supports hostpath and nfs.

Additional info:
Comment 1 Bradley Childs 2016-01-26 10:55:44 EST
this is not a bug- iscsi has no recycler. Marking as feature request.
Comment 2 Steve Watt 2016-02-01 12:13:35 EST
Yes, The ISCSI volume plugin does not support Recycle Operations on a claim release.

However, I think we should throw an intuitive error & description when someone attempts to create a PV where the the PV definition specifies something that the underlying volume type does not support.  

Assigning to Brad Childs (Dev Lead) so that he can re-assign to a member of the dev team.
Comment 3 Jianwei Hou 2016-03-10 21:50:09 EST
Only NFS and hostPath support recycle, any PV with recycle policy and other volume plugins will reproduce this issue.

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