Bug 1388311

Summary: PV is not annotated with its provisioner, thus can't be automatically deleted when StorageClass is gone
Product: OpenShift Container Platform Reporter: Jianwei Hou <jhou>
Component: StorageAssignee: Bradley Childs <bchilds>
Status: CLOSED NOTABUG QA Contact: Jianwei Hou <jhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, jsafrane
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-10-25 08:38:09 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 Jianwei Hou 2016-10-25 05:45:40 UTC
Description of problem:
The provisioned PV is not annotated with its provisioner, therefore if its StorageClass is deleted, it can not be automatically deleted by deleting its bound PVC.

Version-Release number of selected component (if applicable):
openshift v3.4.0.15+9c963ec
kubernetes v1.4.0+776c994
etcd 3.1.0-alpha.1

How reproducible:
Always

Steps to Reproduce:
1. Prepare GlusterFS cluster and heketi
2. Create StorageClass, then create a PVC, a PV is automatically provisioned and bounds to the PVC
3. oc get pv -o yaml, 
4. Delete the StorageClass
5. Delete the PVC

Actual results:
After step 3: PV is not annotated with the GlusterFS parameters

After step 5: PV becomes 'Failed'

Expected results:
After step 5: PV should be deleted.

Additional info:

Comment 1 Jan Safranek 2016-10-25 08:38:09 UTC
As result of https://github.com/kubernetes/kubernetes/issues/34822, StorageClass now needs to be present at the point when Gluster volume is being deleted.

Passing references to secrets via PV annotations is not secure.