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

Delete local PV If directory not found #1052

Closed
msau42 opened this issue Nov 8, 2018 · 5 comments
Closed

Delete local PV If directory not found #1052

msau42 opened this issue Nov 8, 2018 · 5 comments

Comments

@msau42
Copy link
Contributor

msau42 commented Nov 8, 2018

A use case is for cloud environments where the node can get recreated with the same name, but the disks are gone. User can delete the PVC, and the PV will become Released. However, PV cleanup will return an error if the path doesn't exist. What do you think of allowing PV deletion to proceed in this case?

cc @cofyc @lbernail

@msau42
Copy link
Contributor Author

msau42 commented Nov 8, 2018

/area local-volume

@cofyc
Copy link
Contributor

cofyc commented Nov 8, 2018

When users recreated a node, they deleted (at least detached) all storage devices from it. Users also may remove devices or filesystems before deleting PVCs. When users reattach these storage devices to new node, they must clean up old devices if they don't want old contents to be used, whether new node shares same name with old node or not. I think they are in charge of cleaning up all devices and filesystems on old node, so it's right to proceed when path doesn't exist.

My only concern is when device has hardware problem, it may disappear and reappear again to be discovered as new PV. To prevent this, we can add node uuid into PV annotation, and expect PV's path must exist if deletion happens on its node. But it's rare and unlikely its PVC has been deleted in the meantime. IMO we don't need consider it now.

@msau42
Copy link
Contributor Author

msau42 commented Dec 19, 2018

Moving issue to the new repo: kubernetes-sigs/sig-storage-local-static-provisioner#6

@msau42
Copy link
Contributor Author

msau42 commented Dec 19, 2018

/close

@k8s-ci-robot
Copy link
Contributor

@msau42: Closing this issue.

In response to this:

/close

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants