-
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
fix empty linux kernel platform information #22139
Conversation
If github.com/shirou/gopsutil/v3 is used and a [/host]/etc/redhat-release file/dir exists but is empty, then it returns empty platform information. This affects helm-chart users who have kernel header downloading turned on, because it always mounts this file and k8s will create it even if it doesn't exist.
9c47a0f
to
fc0b024
Compare
Bloop Bleep... Dogbot HereRegression Detector ResultsRun ID: 98f716d5-ee8c-4e43-ab3a-ec80f046b2d9 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | idle | memory utilization | +0.31 | [+0.27, +0.35] |
➖ | file_tree | memory utilization | +0.27 | [+0.13, +0.40] |
➖ | file_to_blackhole | % cpu utilization | -0.62 | [-7.14, +5.90] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.65 | [-0.78, +2.07] |
➖ | process_agent_standard_check_with_stats | memory utilization | +0.52 | [+0.45, +0.59] |
➖ | process_agent_real_time_mode | memory utilization | +0.38 | [+0.34, +0.42] |
➖ | idle | memory utilization | +0.31 | [+0.27, +0.35] |
➖ | file_tree | memory utilization | +0.27 | [+0.13, +0.40] |
➖ | process_agent_standard_check | memory utilization | +0.08 | [+0.00, +0.15] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.06, +0.06] |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.00 | [-0.03, +0.03] |
➖ | trace_agent_json | ingress throughput | -0.07 | [-0.10, -0.05] |
➖ | trace_agent_msgpack | ingress throughput | -0.10 | [-0.12, -0.08] |
➖ | tcp_syslog_to_blackhole | ingress throughput | -0.29 | [-0.35, -0.22] |
➖ | file_to_blackhole | % cpu utilization | -0.62 | [-7.14, +5.90] |
➖ | otel_to_otel_logs | ingress throughput | -1.11 | [-1.80, -0.41] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
@@ -8,7 +8,7 @@ | |||
package kernel | |||
|
|||
import ( | |||
gopsutilhost "github.com/shirou/gopsutil/v3/host" |
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.
going back to our completely unmaintained fork feels like a mistake, what are we losing to fix the issue you found ? I would like to see an upstream PR fixing the issue so that we can go back to upstream ASAP
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.
Opened an upstream PR to fix this particular issue: shirou/gopsutil#1584
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.
We will need this change too, which might be more controversial: https://github.com/DataDog/gopsutil/pull/44/files
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.
/merge |
🚂 MergeQueue Pull request added to the queue. This build is going to start soon! (estimated merge in less than 46m) Use |
What does this PR do?
Uses
github.com/DataDog/gopsutil
instead ofgithub.com/shirou/gopsutil/v3
for getting kernel platform information.Motivation
If github.com/shirou/gopsutil/v3 is used and a [/host]/etc/redhat-release file/dir exists but is empty, then it returns empty platform information.
This affects helm-chart users who have kernel header downloading turned on, because it always mounts this file and k8s will create it even if it doesn't exist.
Additional Notes
This is because this line https://github.com/shirou/gopsutil/blob/83c941c791e7f294752b0cc98ba3059f63dd4f05/host/host_linux.go#L238 does not use
common.PathExistsWithContents
.Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
Reviewer's Checklist
Triage
milestone is set.major_change
label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.changelog/no-changelog
label has been applied.qa/skip-qa
label, with required eitherqa/done
orqa/no-code-change
labels, are applied.team/..
label has been applied, indicating the team(s) that should QA this change.need-change/operator
andneed-change/helm
labels have been applied.k8s/<min-version>
label, indicating the lowest Kubernetes version compatible with this feature.