Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSI driver does not work with Retain Policy DELETE on static PV #98

Closed
przem123 opened this issue Dec 9, 2019 · 2 comments
Closed

CSI driver does not work with Retain Policy DELETE on static PV #98

przem123 opened this issue Dec 9, 2019 · 2 comments

Comments

@przem123
Copy link

przem123 commented Dec 9, 2019

I have reclaim policy DELETE on my directory from a remote fs:

[root@worker01 tools]# oc describe pv pv-images
Name:            pv-images
Labels:          id=test1
Annotations:     kubectl.kubernetes.io/last-applied-configuration:
                   {"apiVersion":"v1","kind":"PersistentVolume","metadata":{"annotations":{},"labels":{"id":"test1"},"name":"pv-images"},"spec":{"accessModes...
                 pv.kubernetes.io/bound-by-controller: yes
Finalizers:      [kubernetes.io/pv-protection]
StorageClass:    
Status:          Bound
Claim:           default/test3
Reclaim Policy:  Delete
Access Modes:    RWX
VolumeMode:      Filesystem
Capacity:        10Gi
Node Affinity:   <none>
Message:         
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            ibm-spectrum-scale-csi
    VolumeHandle:      17399599334479190260;099B6A42:5DC52700;path=/mnt/remote_fs0_1m/static/images
    ReadOnly:          false
    VolumeAttributes:  <none>
Events:                <none>

When I remove the corresponding PVC, then the PV goes into a failed state. Nothing will be removed.

status:
  phase: Failed
  message: >-
    Error getting deleter volume plugin for volume "pv-images": no volume plugin
    matched

Please fix it so that I can use reclaim policy DELETE on static PVs so that the data is then removed automatically.

@yadaven
Copy link
Contributor

yadaven commented Dec 9, 2019

For static PV, CSI driver hasn't provisioned the volume so PV doesn't have information of the provisioner and that's the reason we get "no volume plugin matched". Since CSI driver didn't created the volume hence delete will also not be called. For Static volume end user has to manually delete the PV.

However there are certain ways to accomplish delete by updating static pv yaml with provisioner name something as below

metadata:
name: mystaticpv
annotations:
pv.kubernetes.io/provisioned-by: spectrumscale.csi.ibm.com

@deeghuge
Copy link
Member

This is working as per design for IBM Spectrum Scale CSI Driver. The statically provisioned pv will not get deleted by deleting the pvc.

@deeghuge deeghuge transferred this issue from IBM/ibm-spectrum-scale-csi-driver Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants