-
Notifications
You must be signed in to change notification settings - Fork 334
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
Delete local PV If directory not found #6
Comments
@msau42: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind bug |
Thinking more about this (previous thoughts). It's hard to see delete local PV if directory not found is a good idea. Possible scenarios when the volume is not found on deletion:
If we deleted PVs in these cases in provisioner, users are in charge of cleaning up volumes themselves which is a burden, and if users forgot to clean, data in volumes may be leaked to other programs in the future. Instead of letting users clean up volumes, I think the best practice is to delete PV objects if users know volumes of these PVs are already cleaned or deleted and they want to clean these stale PV objects. And it's totally ok to not delete them if they are not sure. When a node gets recreated, users can delete all local PVs on it which is required too when a node is deleted. (Updated: You can set owner references on PV objects, then they can be deleted when node objects are deleted) Conversely, I think we should check mount point existence on deletion because if no mount point exists on the directory, we actually didn't clean local volume and should not delete PV objects. With this change, volumes are not able to be deleted if they are not mounted on reboot. When disks are mounted again, data can be cleaned and PV objects will be recycled by provisioner. |
/assign |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
Migrating issue from: kubernetes-retired/external-storage#1052
/help
The text was updated successfully, but these errors were encountered: