Skip to content

Commit

Permalink
csi: fix incorrect comment on csi_hook context lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross authored and fredrikhgrelland committed Oct 22, 2020
1 parent 4fa2553 commit d60cb3c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions client/allocrunner/csi_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ func (c *csiHook) Prerun() error {
return nil
}

// TODO(tgross): the contexts for the CSI RPC calls made during
// mounting can have very long timeouts. Until these are better
// tuned, there's not a good value to put here for a WithCancel
// without risking conflicts with the grpc retries/timeouts in the
// pluginmanager package.
ctx := context.TODO()
// We use this context only to attach hclog to the gRPC context. The
// lifetime is the lifetime of the gRPC stream, not specific RPC timeouts,
// but we manage the stream lifetime via Close in the pluginmanager.
ctx := context.Background()

volumes, err := c.claimVolumesFromAlloc()
if err != nil {
Expand Down

0 comments on commit d60cb3c

Please sign in to comment.