aws / efs-utils

Utilities for Amazon Elastic File System (EFS)
MIT License
301 stars 192 forks source link

PV won’t erase. #227

Closed mint8846 closed 4 months ago

mint8846 commented 4 months ago

PV won’t delete and is blocked with a status of ‘Released’, with no connected pod EFS CSI driver version: v2.0.5-eksbuild.1

Name:            
Labels:          app.kubernetes.io/managed-by=Helm
                 k8slens-edit-resource-version=v1
Annotations:     meta.helm.sh/release-name: janusync
                 meta.helm.sh/release-namespace: test
                 pv.kubernetes.io/bound-by-controller: yes
Finalizers:      [external-provisioner.volume.kubernetes.io/finalizer]
StorageClass:    efs-janusync-test
Status:          Terminating (lasts 19h)
Claim:           
Reclaim Policy:  Delete
Access Modes:    RWX
VolumeMode:      Filesystem
Capacity:        50Gi
Node Affinity:   <none>
Message:         
Source:
    Type:              CSI (a Container Storage Interface (CSI) volume source)
    Driver:            efs.csi.aws.com
    FSType:            
    VolumeHandle:      fs-008cdfe0d80407469
    ReadOnly:          false
    VolumeAttributes:  <none>
Events:
  Type     Reason              Age                 From                                                                                      Message
  ----     ------              ----                ----                                                                                      -------
  Warning  VolumeFailedDelete  51s (x23 over 59m)  efs.csi.aws.com_efs-csi-controller-5889c6cd74-8nmtc_68ead1cb-4f72-47d0-a76a-c96f7e4dfe12  rpc error: code = NotFound desc = Failed to find access point for volume: fs-008cdfe0d80407469

efs-csi-controller csi-provisioner log

E0724 01:52:09.237181       1 controller.go:1558] "Volume deletion failed" err="rpc error: code = NotFound desc = Failed to find access point for volume: fs-008cdfe0d80407469" PV="dtx-report-efs-pv-test"
I0724 01:52:09.237218       1 controller.go:1007] "Retrying syncing volume" key="dtx-report-efs-pv-test" failures=23
E0724 01:52:09.237316       1 controller.go:1025] error syncing volume "dtx-report-efs-pv-test": rpc error: code = NotFound desc = Failed to find access point for volume: fs-008cdfe0d80407469
E0724 01:52:09.237423       1 controller.go:1558] "Volume deletion failed" err="rpc error: code = NotFound desc = Failed to find access point for volume: fs-0107356ab415951a7" PV="dtx-report-efs-pv-test2"
I0724 01:52:09.237485       1 controller.go:1007] "Retrying syncing volume" key="dtx-report-efs-pv-test2" failures=23
E0724 01:52:09.237506       1 controller.go:1025] error syncing volume "dtx-report-efs-pv-test2": rpc error: code = NotFound desc = Failed to find access point for volume: fs-0107356ab415951a7
I0724 01:52:09.237974       1 event.go:389] "Event occurred" object="dtx-report-efs-pv-test" fieldPath="" kind="PersistentVolume" apiVersion="v1" type="Warning" reason="VolumeFailedDelete" message="rpc error: code = NotFound desc = Failed to find access point for volume: fs-008cdfe0d80407469"
I0724 01:52:09.237999       1 event.go:389] "Event occurred" object="dtx-report-efs-pv-test2" fieldPath="" kind="PersistentVolume" apiVersion="v1" type="Warning" reason="VolumeFailedDelete" message="rpc error: code = NotFound desc = Failed to find access point for volume: fs-0107356ab415951a7
seanzatzdev-amazon commented 4 months ago

Can you upload this to the CSI Driver repo? Closing this for now as this is not the correct repo.

mint8846 commented 4 months ago

Can you upload this to the CSI Driver repo? Closing this for now as this is not the correct repo.

Two EFS filesystem IDs are causing issues: • Deleted EFS • EFS that can be accessed normally If you create new PV (Persistent Volume) and PVC (Persistent Volume Claim) for the EFS (filesystem-id) that can be accessed normally, it works fine.

PV that are not being deleted can be deleted by setting the finalizers of the PV to null. kubectl patch pv -p '{"metadata": {"finalizers": null}}'