Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

[efs-provisioner] Fails to delete "saved" volume #1314

Closed
Nuru opened this issue May 2, 2020 · 3 comments
Closed

[efs-provisioner] Fails to delete "saved" volume #1314

Nuru opened this issue May 2, 2020 · 3 comments

Comments

@Nuru
Copy link

Nuru commented May 2, 2020

Using efs-provisioner v2.4.0 on Kubernetes 1.15.10, I noticed it fails to delete the storage for a PersistentVolume if the PersistentVolume was previously "saved" after being deleted externally.

Using efs StorageClass with

reclaimPolicy: Delete
volumeBindingMode: Immediate

When a PersistentVolumeClaim (pvc) is created using the efs storage class, efs-provisioner creates a PersistentVolume (pv) and stores the data on the EFS file system in a directory named /efs-provisioner/{pvc-name}-{pv-name}. When the PersistentVolumeClaim is deleted and the reclaimPolicy is "Delete", efs-provisioner deletes its PersistentVolume and removes the /efs-provisioner/{pvc-name}-{pv-name} directory and all the data in it from the EFS file system.

If the PersistentVolume Kubernetes resource is deleted, for example via kubectl delete, efs-provisioner will attempt to "save" it and the logs will show something like:

Trying to save persistentvolume "pvc-bbe5e4fa-d9e3-4a43-aed7-d9f3a4f31cfe"
persistentvolume "pvc-bbe5e4fa-d9e3-4a43-aed7-d9f3a4f31cfe" saved

The bug is that after saving a PersistentVolume this way, if you then immediately (and maybe later) delete the PersistentVolumeClaim, efs-provisioner deletes the PersistentVolume Kubernetes resource, but it does not remove the data from EFS. It is abandoned there and difficult to notice or clean up using standard Kubernetes tools. Since EFS storage is relatively expensive, this can be a significant problem.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 31, 2020
@Nuru
Copy link
Author

Nuru commented Aug 2, 2020

/remove-lifecycle stale

Can someone please look into this?

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 2, 2020
@nikhita
Copy link
Member

nikhita commented Aug 7, 2020

Thanks for reporting the issue!

This repo is no longer being maintained and we are in the process of archiving this repo. Please see kubernetes/org#1563 for more details.

If your issue relates to nfs provisioners, please create a new issue in https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner or https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner.

Going to close this issue in order to archive this repo. Apologies for the churn and thanks for your patience! 🙏

@nikhita nikhita closed this as completed Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants