-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Do not memoize system-probe sock path error #32728
Conversation
The system-probe socket may not exist temporarily due to expected races during startup. This error should not be memoized. This restores the behaviour to how it was before #31150.
sysProbeUtil := newSystemProbe(path) | ||
err = sysProbeUtil.initRetry.SetupRetrier(&retry.Config{ //nolint:errcheck | ||
err := sysProbeUtil.initRetry.SetupRetrier(&retry.Config{ //nolint:errcheck |
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.
if we get an error (a temporary error) here, we will still memoize it
I don't think the memoize is a good idea here
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.
The error returning from this function is just for configuration issues of the retrier https://github.com/DataDog/datadog-agent/blob/7.61.x/pkg/util/retry/retrier.go#L30
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.
And before the PR this was done in a sync.Once
and the error was ignored: https://github.com/DataDog/datadog-agent/blob/7.60.1/pkg/process/net/common.go#L78-L88
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=52329758 --os-family=ubuntu Note: This applies to commit 77f1d59 |
/merge |
Devflow running:
|
/trigger-ci --variable RUN_ALL_BUILDS=true --variable RUN_KITCHEN_TESTS=true --variable RUN_E2E_TESTS=on --variable RUN_UNIT_TESTS=on --variable RUN_KMT_TESTS=on |
Devflow running:
|
What does this PR do?
Do not memoize system-probe sock path error
The system-probe socket may not exist temporarily due to expected races
during startup. This error should not be memoized.
This restores the behaviour to how it was before #31150.
Motivation
Incident
Describe how you validated your changes
Tested manually by starting the agent first and then system-probe later. The service discovery check initially
fails but then succeeds on later runs after system-probe has been started. Without this PR it always fails even after system-probe starts.
Possible Drawbacks / Trade-offs
Additional Notes