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 Orphaned Volumes on a timer #724

Merged
merged 4 commits into from
Jan 24, 2024
Merged

Conversation

tiagolobocastro
Copy link
Contributor

@tiagolobocastro tiagolobocastro commented Jan 23, 2024

fix(csi-controller/gc): list volumes with pagination

Signed-off-by: Tiago Castro <[email protected]>

chore: correct typo in the plaftform code

Signed-off-by: Tiago Castro <[email protected]>

refactor(csi-controller/gc): reduce excessive unwrap and nesting

Signed-off-by: Tiago Castro <[email protected]>

feat(csi-controller/orphaned-vols): gc orphaned volumes on a timer

Due to a k8s bug, when pv deletion is attempted before pvc deletion, we may not
receive the delete request, and thus leaking volumes, which cannot be deleted
through any user facing api.

Existing code to clean up orphaned volumes was being made use for the case when
certain pv events might be missed.
Therefore current WA is to delete the csi-controller pod.
This change makes use of this existing logic but runs it on a given time period
which is by default 5 minutes, which  allows us to automatically WA the bug.

Signed-off-by: Tiago Castro <[email protected]>

@tiagolobocastro
Copy link
Contributor Author

Resolves openebs/mayastor#1269

Due to a k8s bug, when pv deletion is attempted before pvc deletion, we may not
receive the delete request, and thus leaking volumes, which cannot be deleted
through any user facing api.

Existing code to clean up orphaned volumes was being made use for the case when
certain pv events might be missed.
Therefore current WA is to delete the csi-controller pod.
This change makes use of this existing logic but runs it on a given time period
which is by default 5 minutes, which  allows us to automatically WA the bug.

Signed-off-by: Tiago Castro <[email protected]>
@tiagolobocastro
Copy link
Contributor Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

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

Successfully merging this pull request may close these issues.

2 participants