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: plugin supervisor prestart should not mark itself done #12752

Merged
merged 2 commits into from
Apr 22, 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
12 changes: 7 additions & 5 deletions client/allocrunner/taskrunner/plugin_supervisor_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ func (*csiPluginSupervisorHook) Name() string {
}

// Prestart is called before the task is started including after every
// restart (but not after restore). This requires that the mount paths
// for a plugin be idempotent, despite us not knowing the name of the
// plugin ahead of time. Because of this, we use the allocid_taskname
// as the unique identifier for a plugin on the filesystem.
// restart. This requires that the mount paths for a plugin be
// idempotent, despite us not knowing the name of the plugin ahead of
// time. Because of this, we use the allocid_taskname as the unique
// identifier for a plugin on the filesystem.
func (h *csiPluginSupervisorHook) Prestart(ctx context.Context,
req *interfaces.TaskPrestartRequest, resp *interfaces.TaskPrestartResponse) error {

Expand Down Expand Up @@ -191,9 +191,11 @@ func (h *csiPluginSupervisorHook) Prestart(ctx context.Context,
mounts = ensureMountpointInserted(mounts, volumeStagingMounts)
mounts = ensureMountpointInserted(mounts, devMount)

// we normally would set resp.Mounts here but without setting the
// hookResources before returning we can get a postrun hook that's
// missing resources.
h.runner.hookResources.setMounts(mounts)

resp.Done = true
return nil
}

Expand Down