Skip to content

Is there support for force deleting persistent volumes? #62

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

Closed
Azuka opened this issue Aug 22, 2018 · 4 comments
Closed

Is there support for force deleting persistent volumes? #62

Azuka opened this issue Aug 22, 2018 · 4 comments

Comments

@Azuka
Copy link

Azuka commented Aug 22, 2018

I'm experiencing #32 on only one pod (a similar one works), so I tried to delete the persistent volume claim, then force delete the persistent volume itself (a manual delete didn't work and it's been stuck Terminating for more than an hour).

From the logs I see:

si-provisioner-doplugin-0 csi-provisioner I0822 18:57:53.526521       1 reflector.go:286] github.com/kubernetes-csi/external-provisioner/vendor/github.com/kubernetes-incubator/external-storage/lib/controller/controller.go:498: forcing resync
csi-provisioner-doplugin-0 csi-provisioner I0822 18:57:53.529329       1 reflector.go:286] github.com/kubernetes-csi/external-provisioner/vendor/github.com/kubernetes-incubator/external-storage/lib/controller/controller.go:497: forcing resync
csi-provisioner-doplugin-0 csi-provisioner E0822 18:57:53.529400       1 controller.go:685] Exceeded failedDeleteThreshold threshold: 15, for volume "pvc-b154104f-a4e7-11e8-b870-16ebc57da236", provisioner will not attempt retries for this volume
csi-provisioner-doplugin-0 csi-provisioner I0822 18:57:54.111269       1 reflector.go:286] github.com/kubernetes-csi/external-provisioner/vendor/github.com/kubernetes-incubator/external-storage/lib/controller/controller.go:496: forcing resync

which stays in place even when I detach the volume and delete manually. Is there any way to "purge" a persistent volume? Thanks!

@fatih
Copy link
Contributor

fatih commented Aug 22, 2018

You can do a kubectl edit resource and then remove any finalizers. It's probably stuck at that level.

@Azuka
Copy link
Author

Azuka commented Aug 22, 2018

Thanks, that worked!

@Azuka Azuka closed this as completed Aug 22, 2018
@yvan
Copy link

yvan commented Jan 28, 2019

This works great. It clears out the PV but how can we prevent this from happening in the future? This seems a bit hacky.

@ankilosaurus
Copy link

I ran into same issue and tried to force delete PVC and PV as both were stuck into Terminating state for a while. I don't have feature-gate PVCprotection enabled still "Finalizers: [kubernetes.io/pvc-protection]" got added to PVC/PV config. Is that a bug ?

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

4 participants