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

Backport of csi: prevent panic on volume delete into release/1.4.x #18242

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #18234 to be assessed for backporting due to the inclusion of the label backport/1.4.x.

The below text is copied from the body of the original PR.


When a CSI volume is deleted when its plugin is not running, the function volAndPluginLookup returns a nil plugin value resulting a panic in the request handler.

Note to reviewers: the other place where volAndPluginLookup is used already checks for a nil plugin.

nomad/nomad/csi_endpoint.go

Lines 513 to 518 in e21ab7d

// Some plugins support controllers for create/snapshot but not attach. So
// if there's no plugin or the plugin doesn't attach volumes, then we can
// skip the controller publish workflow and return nil.
if plug == nil || !plug.HasControllerCapability(structs.CSIControllerSupportsAttachDetach) {
return nil
}

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-fix-csi-panic/socially-primary-dog branch from 554079a to 060dacb Compare August 17, 2023 13:48
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit fc624ca into release/1.4.x Aug 17, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-fix-csi-panic/socially-primary-dog branch 2 times, most recently from 9620441 to 7e99f3f Compare August 17, 2023 13:48
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/b-fix-csi-panic/socially-primary-dog branch August 17, 2023 13:48
@vercel vercel bot temporarily deployed to Preview – nomad August 17, 2023 13:52 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui August 17, 2023 13:56 Inactive
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.

None yet

2 participants