-
Notifications
You must be signed in to change notification settings - Fork 260
fix: Adding a defer func to connecttoTelemetryservice() to prevent CNI fro… #1800
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
Conversation
| func (tb *TelemetryBuffer) ConnectCNIToTelemetryServiceAttempt(telemetryNumRetries, telemetryWaitTimeInMilliseconds int, netPlugin *cni.Plugin, path string, args []string) error { | ||
| if err := tb.Connect(); err != nil { | ||
| log.Logf("Connection to telemetry socket failed: %v", err) | ||
| if runtime.GOOS == "windows" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also place defer under this if..so no need to check if windows in 2 places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in the new commit
telemetry/telemetrybuffer.go
Outdated
| } | ||
| if err = StartTelemetryService(path, args); err != nil { | ||
| return errors.Wrap(err, "StartTelemetryService failed") | ||
| if err := tb.ConnectCNIToTelemetryServiceAttempt(telemetryNumRetries, telemetryWaitTimeInMilliseconds, netPlugin, path, args); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we rename this as startAndConnectTelemetryService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in the new commit.
cb9e27c to
08b5782
Compare
tamilmani1989
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…m stucking in case of telemetry service failure.
14400ef to
606431f
Compare
…I fro… (#1800) * Adding a defer func to connecttoTelemetryservice() to prevent CNI from stucking in case of telemetry service failure. * fix: addressing the comments for telemetry defer function. * fix: addressing the comments for telemetry defer func.
Adding a defer func to connecttoTelemetryservice()
Reason for Change:
to prevent CNI from stucking when the telemetry service is unable to start.