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

reordering fixes #34305

Merged
merged 2 commits into from
Feb 26, 2025
Merged

reordering fixes #34305

merged 2 commits into from
Feb 26, 2025

Conversation

raphaelgavache
Copy link
Member

@raphaelgavache raphaelgavache commented Feb 21, 2025

What does this PR do?

Important fixes

  • fixed an issue where a recursive chown command incorrectly set dd-agent ownership in /etc/datadog-agent. Ownership is now correctly enforced after file creation, preventing accidental permission changes. Check config file ownership when installing version 7.63 RPM to confirm the fix.
  • enablement of services is completed at the end, to avoid a host restart triggering starts of an unfinished install agent

Reordering rpm posttrans & dpkg postinst to match the following behaviour

  1. user/group creation
  2. installation metadate
    (rpm only) 3. SE Linux
  3. fips/python postinst
  4. change in ownership
  5. enablement of services to work on host restart
  6. start of services

Side fixes

  • no need to enable all systemd services in dpkg, the datadog-agent one is enough as the others get started by it. This is already the case in rpm and in OCI agent code
  • added missing system-probe enablement on upstart, I didn't check but probably enabling all other services than datadog-agent can also be skipped on upstart, adding it for completion

Motivation

Preparing convergence of postinst (oci/deb/rpm)

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

@github-actions github-actions bot added short review PR is simple enough to be reviewed quickly team/agent-delivery labels Feb 21, 2025
@@ -188,10 +139,57 @@ if [ ! -f "$CONFIG_DIR/install.json" ]; then
install_time=$(date +%s)
install_signature=$(generate_install_signature "$install_id" "$install_type" "$install_time")
echo "$install_signature" >$CONFIG_DIR/install.json
chown -R dd-agent:dd-agent ${CONFIG_DIR}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately set dd-agent in too many places

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol nice find

@github-actions github-actions bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Feb 21, 2025
@raphaelgavache raphaelgavache added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests labels Feb 21, 2025
@raphaelgavache
Copy link
Member Author

/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

@dd-devflow
Copy link

dd-devflow bot commented Feb 21, 2025

View all feedbacks in Devflow UI.
2025-02-21 13:54:32 UTC ℹ️ Start processing command /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


2025-02-21 13:55:09 UTC ℹ️ Gitlab pipeline started

Started pipeline #56560249

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 21, 2025

Uncompressed package size comparison

Comparison with ancestor c5df27ac14f10564900d0d5a28381f632775b8ff

Diff per package
package diff status size ancestor threshold
datadog-agent-aarch64-rpm 0.00MB 868.32MB 868.32MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 879.02MB 879.02MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 879.02MB 879.02MB 0.50MB
datadog-agent-amd64-deb 0.00MB 869.25MB 869.25MB 0.50MB
datadog-agent-arm64-deb 0.00MB 858.57MB 858.57MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 41.40MB 41.40MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 41.48MB 41.48MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 41.48MB 41.48MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 39.66MB 39.66MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 446.32MB 446.32MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 62.02MB 62.02MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 62.09MB 62.09MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 62.09MB 62.09MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 59.26MB 59.26MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 59.33MB 59.33MB 0.50MB

Decision

✅ Passed

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 21, 2025

Static quality checks ✅

Please find below the results from static quality gates

Successful checks

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 840.75MiB 847.49MiB 203.05MiB 212.33MiB
static_quality_gate_agent_deb_arm64 830.62MiB 836.66MiB 183.51MiB 192.5MiB
static_quality_gate_agent_rpm_amd64 840.89MiB 847.82MiB 205.97MiB 215.76MiB
static_quality_gate_agent_rpm_arm64 830.67MiB 836.66MiB 185.44MiB 194.24MiB
static_quality_gate_agent_suse_amd64 840.83MiB 847.82MiB 205.97MiB 215.76MiB
static_quality_gate_agent_suse_arm64 830.52MiB 836.66MiB 185.44MiB 194.24MiB
static_quality_gate_dogstatsd_deb_amd64 39.56MiB 49.7MiB 10.55MiB 20.6MiB
static_quality_gate_dogstatsd_deb_arm64 37.9MiB 48.1MiB 9.13MiB 19.1MiB
static_quality_gate_dogstatsd_rpm_amd64 39.56MiB 49.7MiB 10.56MiB 20.6MiB
static_quality_gate_dogstatsd_suse_amd64 39.56MiB 49.7MiB 10.56MiB 20.6MiB
static_quality_gate_iot_agent_deb_amd64 59.23MiB 69.0MiB 14.88MiB 24.8MiB
static_quality_gate_iot_agent_deb_arm64 56.59MiB 66.4MiB 12.84MiB 22.8MiB
static_quality_gate_iot_agent_rpm_amd64 59.23MiB 69.0MiB 14.9MiB 24.8MiB
static_quality_gate_iot_agent_rpm_arm64 56.59MiB 66.4MiB 12.85MiB 22.8MiB
static_quality_gate_iot_agent_suse_amd64 59.23MiB 69.0MiB 14.9MiB 24.8MiB
static_quality_gate_docker_agent_amd64 925.11MiB 931.7MiB 309.15MiB 318.67MiB
static_quality_gate_docker_agent_arm64 938.18MiB 944.08MiB 294.15MiB 303.0MiB
static_quality_gate_docker_agent_jmx_amd64 1.1GiB 1.1GiB 384.27MiB 393.75MiB
static_quality_gate_docker_agent_jmx_arm64 1.1GiB 1.1GiB 365.22MiB 373.71MiB
static_quality_gate_docker_dogstatsd_amd64 47.7MiB 57.88MiB 18.26MiB 28.29MiB
static_quality_gate_docker_dogstatsd_arm64 46.09MiB 56.27MiB 17.02MiB 27.06MiB
static_quality_gate_docker_cluster_agent_amd64 264.95MiB 274.78MiB 106.33MiB 116.28MiB
static_quality_gate_docker_cluster_agent_arm64 280.91MiB 290.82MiB 101.19MiB 111.12MiB

Copy link

cit-pr-commenter bot commented Feb 21, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 101d0806-712e-443c-9f76-fba66857f955

Baseline: c5df27a
Comparison: b56ae3c
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
uds_dogstatsd_to_api_cpu % cpu utilization +1.49 [+0.60, +2.39] 1 Logs
quality_gate_logs % cpu utilization +0.26 [-2.72, +3.24] 1 Logs
quality_gate_idle memory utilization +0.25 [+0.22, +0.28] 1 Logs bounds checks dashboard
file_to_blackhole_500ms_latency egress throughput +0.08 [-0.71, +0.87] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.04 [-0.80, +0.87] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.01 [-0.63, +0.65] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.01 [-0.28, +0.29] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.01 [-0.01, +0.02] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.00 [-0.63, +0.63] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.00 [-0.82, +0.82] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.00 [-0.07, +0.06] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.01 [-0.81, +0.78] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.18 [-0.96, +0.60] 1 Logs
quality_gate_idle_all_features memory utilization -0.23 [-0.28, -0.17] 1 Logs bounds checks dashboard
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.23 [-0.70, +0.23] 1 Logs
file_tree memory utilization -0.28 [-0.33, -0.23] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10
quality_gate_logs lost_bytes 10/10
quality_gate_logs memory_usage 10/10

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

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:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. 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.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@raphaelgavache raphaelgavache marked this pull request as ready for review February 21, 2025 14:44
@raphaelgavache raphaelgavache requested a review from a team as a code owner February 21, 2025 14:44
Copy link
Member

@arbll arbll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📦

@raphaelgavache
Copy link
Member Author

/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

@dd-devflow
Copy link

dd-devflow bot commented Feb 21, 2025

View all feedbacks in Devflow UI.
2025-02-21 14:57:01 UTC ℹ️ Start processing command /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


2025-02-21 14:57:44 UTC ℹ️ Gitlab pipeline started

Started pipeline #56569323

@arbll
Copy link
Member

arbll commented Feb 26, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Feb 26, 2025

View all feedbacks in Devflow UI.
2025-02-26 13:00:22 UTC ℹ️ Start processing command /merge


2025-02-26 13:00:32 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 29m.


2025-02-26 14:17:45 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 2135b77 into main Feb 26, 2025
458 of 459 checks passed
@dd-mergequeue dd-mergequeue bot deleted the raphael/reordering branch February 26, 2025 14:17
@github-actions github-actions bot added this to the 7.65.0 milestone Feb 26, 2025
purple4reina added a commit that referenced this pull request Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/agent-delivery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants