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

Fix timeout on short CSI calls during attacher initialization #561

Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion cmd/csi-attacher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ func main() {
}
logger = klog.LoggerWithValues(logger, "driver", csiAttacher)
logger.V(2).Info("CSI driver name")
cancelationCtx = klog.NewContext(cancelationCtx, logger)

translator := csitrans.New()
if translator.IsMigratedCSIDriverByName(csiAttacher) {
Expand Down Expand Up @@ -202,6 +201,9 @@ func main() {
}()
}

cancelationCtx, cancel = context.WithTimeout(ctx, csiTimeout)
cancelationCtx = klog.NewContext(cancelationCtx, logger)
defer cancel()
supportsService, err := supportsPluginControllerService(cancelationCtx, csiConn)
if err != nil {
logger.Error(err, "Failed to check if the CSI Driver supports the CONTROLLER_SERVICE")
Expand Down