-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
ad7cbca
to
0356e51
Compare
There was a problem hiding this 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", |
There was a problem hiding this comment.
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.
0356e51
to
08aaed8
Compare
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. |
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. Thismay 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.