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

Add stage_publish_dir field to csi_plugin stanza of a job #13919

Merged
merged 7 commits into from
Aug 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions client/allocrunner/taskrunner/plugin_supervisor_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,16 @@ func newCSIPluginSupervisorHook(config *csiPluginSupervisorHookConfig) *csiPlugi
socketMountPoint := filepath.Join(config.clientStateDirPath, "csi",
"plugins", config.runner.Alloc().ID)

// In v1.3.0, Nomad started instructing CSI plugins to stage and publish
// within /csi/local. Plugins deployed after the introduction of
Copy link
Member

Choose a reason for hiding this comment

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

The code is right but this comment has swapped the path ordering. It's /local/csi.

// StagePublishDir default to StagePublishDir = /csi/local. However,
// plugins deployed between v1.3.0 and the introduction of
// StagePublishDir have StagePublishDir = "". Default to /csi/local here
// to avoid breaking plugins that aren't redeployed.
if task.CSIPluginConfig.StagePublishDir == "" {
task.CSIPluginConfig.StagePublishDir = filepath.Join("/local", "csi")
}
tgross marked this conversation as resolved.
Show resolved Hide resolved

if task.CSIPluginConfig.HealthTimeout == 0 {
task.CSIPluginConfig.HealthTimeout = 30 * time.Second
}
Expand Down