Skip to content
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

Open
msau42 opened this issue Dec 19, 2018 · 7 comments
Open

Delete local PV If directory not found #6

msau42 opened this issue Dec 19, 2018 · 7 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@msau42
Copy link
Contributor

msau42 commented Dec 19, 2018

Migrating issue from: kubernetes-retired/external-storage#1052

/help

@k8s-ci-robot
Copy link
Contributor

@msau42:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

Migrating issue from: kubernetes-retired/external-storage#1052

/help

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.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Dec 19, 2018
@msau42
Copy link
Contributor Author

msau42 commented Dec 19, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 19, 2018
@cofyc
Copy link
Member

cofyc commented Apr 17, 2019

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.

@cofyc
Copy link
Member

cofyc commented Apr 17, 2019

/assign

@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 16, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 15, 2019
@cofyc
Copy link
Member

cofyc commented Sep 1, 2019

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

4 participants