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

csi: add -force flag to volume deregister #8295

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

tgross
Copy link
Member

@tgross tgross commented Jun 26, 2020

Fixes #8251

The nomad volume deregister command currently returns an error if the volume has any claims, but in cases where the claims can't be dropped because of plugin errors, providing a -force flag gives the operator an escape hatch.

If the volume has no allocations or if they are all terminal, this flag deletes the volume from the state store, immediately and implicitly dropping all claims without further CSI RPCs. Note that this will not also unmount/detach the volume, which we'll make the responsibility of a separate nomad volume detach command (see #8252)

@tgross tgross added this to the 0.12.0 milestone Jun 26, 2020
@tgross tgross force-pushed the f-csi-volume-deregister-force branch 3 times, most recently from 249bcdd to 37114a9 Compare June 26, 2020 15:39
The `nomad volume deregister` command currently returns an error if the volume
has any claims, but in cases where the claims can't be dropped because of
plugin errors, providing a `-force` flag gives the operator an escape hatch.

If the volume has no allocations or if they are all terminal, this flag
deletes the volume from the state store, immediately and implicitly dropping
all claims without further CSI RPCs. Note that this will not also
unmount/detach the volume, which we'll make the responsibility of a separate
`nomad volume detach` command.
@tgross tgross force-pushed the f-csi-volume-deregister-force branch from 37114a9 to da7681e Compare June 26, 2020 15:43
@tgross tgross marked this pull request as ready for review June 26, 2020 16:11
@tgross tgross requested a review from langmartin June 26, 2020 16:11
Copy link
Contributor

@langmartin langmartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, makes sense!

@tgross
Copy link
Member Author

tgross commented Jun 26, 2020

Going to hold off on merging this until the 0.12.0-beta2 is released.

@tgross tgross merged commit 9579966 into master Jul 1, 2020
@tgross tgross deleted the f-csi-volume-deregister-force branch July 1, 2020 16:17
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSI: add -force flag to volume deregister
2 participants