-
Notifications
You must be signed in to change notification settings - Fork 31
Deleting PV on vSphereVolume does not remove files from datastore #340
Comments
@snsumner Can you share yaml files you have used for provisioning PV. You can change reclaim policy of PV from Steps are available at https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/#changing-the-reclaim-policy-of-a-persistentvolume Can you try out this? CC: @BaluDontu @tusharnt |
@snsumner Just noticed you have already tried out changing policy from 'Retain' to 'Delete'. |
The PV are automatically getting generated by the Elasticsearch Operator. Here is the YAML of one of those PV that is getting created:
For more details about Elasticsearch Operator refer to here: https://github.com/upmc-enterprises/elasticsearch-operator I created a helm chart to deploy Elasticsearch Operator on Tectonic using vSphereVolume which is located here: https://github.com/snsumner/elasticsearch-operator-helm This is the storage class I used for vSphereVolumes:
|
Thanks @snsumner for sharing the yaml file. We will verify and update here. |
@snsumner This is not an issue. You should try to delete the PVC instead of the PV. Kubernetes should prevent user from deleting a PV that is bound to a PVC - see kubernetes/enhancements#499. I'm closing this issue. |
Fixes #340 Adds functionality to see logs with various level of verbosity. Currently there are two verbosity levels: 0 and 1
/kind bug
What happened: When deleting a persistent volume with retain policy of retain it did not remove the files on the datastore.
What you expected to happen: I expect the associated vmdk file of the PV to be removed.
How to reproduce it (as minimally and precisely as possible):
I co-worker of mine pointed out this snippet:
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#retaining
I the PV was originally created with RetainPolicy of Retain. I ran this kubectl command:
kubectl patch pv pvc-04d10f5b-b8fa-11e7-958b-005056a6bd8e -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}}'
But I noticed that the PV was still set to Retain. Perhaps this is just my lack of knowledge around k8s but shouldn't it have changed it to Delete and then once it set to Delete and you delete the PV the provisioner will delete the files for you automatically?
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: