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: release claims via csi_hook postrun unpublish RPC #8580

Merged
merged 4 commits into from
Aug 6, 2020

Conversation

tgross
Copy link
Member

@tgross tgross commented Jul 31, 2020

Part of a fix for #8080, #8100, #8232 as summarized in #8232 (comment). Will help mitigate #8285, #8145, #8057. (4 of 4 PRs)

Add a Postrun hook to send the CSIVolume.Unpublish RPC to the server. This
may forward client RPCs to the node plugins or to the controller plugins,
depending on whether other allocations on this node have claims on this
volume.

@tgross tgross force-pushed the b-csi-node-drain branch 2 times, most recently from ad7cbca to 0356e51 Compare July 31, 2020 13:50
@tgross tgross marked this pull request as ready for review July 31, 2020 17:18
@tgross tgross requested a review from langmartin July 31, 2020 17:18
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.

lgtm

WriteRequest: structs.WriteRequest{
Region: c.alloc.Job.Region, Namespace: c.alloc.Job.Namespace},
}
err := c.rpcClient.RPC("CSIVolume.Unpublish",
Copy link
Contributor

Choose a reason for hiding this comment

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

Summary of side discussion: retries here are optional, and at best might speed up some cases of releasing the claim. A failure here will be retried in volume GC, when the terminal (or already GC'd nil) alloc is observed in the volume & claims. So this is cool

Add a Postrun hook to send the `CSIVolume.Unpublish` RPC to the server. This
may forward client RPCs to the node plugins or to the controller plugins,
depending on whether other allocations on this node have claims on this
volume.
By making clients responsible for running the `CSIVolume.Unpublish` RPC (and
making the RPC available to a `nomad volume detach` command), the
volumewatcher becomes only used by the core GC job.
@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 27, 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.

None yet

2 participants